Java - Got java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SAXSVGDocumentFactory when using Interleaved2Of5 Barcode format
I am trying to print a list of barcodes, data for which which will be sent to the JasperReports jrxml in a List of Strings.
I am successful in printing the barcodes using barbeque format, but now I have to change the format of barcode to barcode4j Interleaved2Of5. I have added the following dependencies in my pom.xml:
<dependency> <groupId>net.sf.barcode4j</groupId> <artifactId>barcode4j</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>org.apache.xmlgraphics</groupId> <artifactId>batik-bridge</artifactId> <version>1.11</version> </dependency>
But still getting the below error while running the code:
Can any one tell me if there is any issue with the dependecies added or I need to add any other dependecies?
There are 1 suggested solutions here and each one has been listed below with a detailed description. The following topics have been covered briefly such as Java, Jasper Reports, Batik, Noclassdeffounderror. These have been categorized in sections for a clear and precise explanation.