Ok , Thank you for the response.
Also when using barcode component with constant expression, instead of previous method I am getting below error when running with jri
Exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Root Cause
java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:818)
net.sf.jasperreports.components.barcode4j.BarcodeSVGImageProducer.createImage(BarcodeSVGImageProducer.java:74)
net.sf.jasperreports.components.barcode4j.AbstractBarcodeEvaluator.evaluateBarcodeRenderable(AbstractBarcodeEvaluator.java:98)
net.sf.jasperreports.components.barcode4j.AbstractBarcodeEvaluator.visitCodabar(AbstractBarcodeEvaluator.java:194)
net.sf.jasperreports.components.barcode4j.CodabarComponent.receive(CodabarComponent.java:44)
net.sf.jasperreports.components.barcode4j.AbstractBarcodeEvaluator.evaluateBarcode(AbstractBarcodeEvaluator.java:85)
net.sf.jasperreports.components.barcode4j.BarcodeFillComponent.evaluateBarcode(BarcodeFillComponent.java:83)
net.sf.jasperreports.components.barcode4j.BarcodeFillComponent.evaluate(BarcodeFillComponent.java:70)
net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:110)
net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:381)
net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2022)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:582)
net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)
net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:90)
net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:286)
de.oc.integration.jasper.webapp.ReportWrapper.service(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Root Cause
java.lang.ClassNotFoundException: org.apache.xml.serializer.TreeWalker
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1352)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:818)
net.sf.jasperreports.components.barcode4j.BarcodeSVGImageProducer.createImage(BarcodeSVGImageProducer.java:74)
net.sf.jasperreports.components.barcode4j.AbstractBarcodeEvaluator.evaluateBarcodeRenderable(AbstractBarcodeEvaluator.java:98)
net.sf.jasperreports.components.barcode4j.AbstractBarcodeEvaluator.visitCodabar(AbstractBarcodeEvaluator.java:194)
net.sf.jasperreports.components.barcode4j.CodabarComponent.receive(CodabarComponent.java:44)
net.sf.jasperreports.components.barcode4j.AbstractBarcodeEvaluator.evaluateBarcode(AbstractBarcodeEvaluator.java:85)
net.sf.jasperreports.components.barcode4j.BarcodeFillComponent.evaluateBarcode(BarcodeFillComponent.java:83)
net.sf.jasperreports.components.barcode4j.BarcodeFillComponent.evaluate(BarcodeFillComponent.java:70)
net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:110)
net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:381)
net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2022)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:582)
net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)
net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:90)
net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:286)
de.oc.integration.jasper.webapp.ReportWrapper.service(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)