Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1128

NoClassDefFoundError Could not initialize class org.apache.batik.ext.awt.color.NamedProfileCache

    XMLWordPrintableJSON

    Details

      Description

      Facing issue while using Batik 1.8(SVG to PNG Conversion using java) and converting image from svg to png.

      Not sure what is the issue with NamedProfileCache classes initialization

      My code is like below:

      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);	 

      Maven Dependencies used:

       <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> 

      Getting below errow message while converting from SVG to PNG:

      java.lang.NoClassDefFoundError: Could not initialize class org.apache.batik.ext.awt.color.NamedProfileCache

      Please let me know what should we need to do to make it work properly...

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chandrasekhar4u Chandra Sekhar Kakarla
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified