[ https://issues.apache.org/jira/browse/BATIK-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16388000#comment-16388000 ]
Pierre-Charles David commented on BATIK-1128: --------------------------------------------- Just had the same issue, and it turns out it was because the class-path contained a mix of Batik 1.9.1 and Batik 1.6.0 JARs, and for some reason the superclass of NamedProfileCache from 1.9 was looked up in batik-util 1.6 where the expected constructor did not exist. I'm not yet 100% sure of all the details, in our case this is in the context of an Eclipse application, so this is using OSGi-ified versions of the Batik JARs. Making sure the runtime context was pure Batik 1.9.1 fixed the issue. > NoClassDefFoundError Could not initialize class > org.apache.batik.ext.awt.color.NamedProfileCache > ------------------------------------------------------------------------------------------------ > > Key: BATIK-1128 > URL: https://issues.apache.org/jira/browse/BATIK-1128 > Project: Batik > Issue Type: Bug > Components: javadoc, Samples, Scripting, SVG DOM, Utilities > Affects Versions: 1.8 > Environment: Windows7, Maven 3.0, Batik 1.8 > Reporter: Chandra Sekhar Kakarla > Priority: Blocker > Labels: batik, java, png, svg > Original Estimate: 168h > Remaining Estimate: 168h > > Facing issue while using Batik 1.8(SVG to PNG Conversion using java) and > converting image from svg to png. > bq. Not sure what is the issue with NamedProfileCache classes initialization > My code is like below: > {code} > ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); > Reader stringReader = new StringReader(svgContent); > TranscoderInput inputSvgImage = new TranscoderInput(stringReader); > > TranscoderOutput outputPngImage = new > TranscoderOutput(byteArrayOutputStream); > PNGTranscoder pngTranscoder = new PNGTranscoder(); > pngTranscoder.transcode(inputSvgImage , outputPngImage); {code} > Maven Dependencies used: > {code} <dependency> > <groupId>org.apache.xmlgraphics</groupId> > <artifactId>batik-transcoder</artifactId> > <version>1.8</version> > </dependency> > <dependency> > <groupId>org.apache.xmlgraphics</groupId> > <artifactId>batik-codec</artifactId> > <version>1.8</version> > </dependency> {code} > Getting below errow message while converting from SVG to PNG: > {code}java.lang.NoClassDefFoundError: Could not initialize class > org.apache.batik.ext.awt.color.NamedProfileCache{code} > Please let me know what should we need to do to make it work properly... -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: batik-dev-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-dev-h...@xmlgraphics.apache.org