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

Exception converting SVG to PDF - NoClassDefFoundError org/apache/batik/dom/svg/SVGDOMImplementation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.9
    • Component/s: SVG Rasterizer
    • Labels:
      None
    • Environment:
      Windows 7, Java version "1.8.0_45"

      Description

      I am attempting to convert SVG files to PDF using Batik-1.8. The command below works using 1.7.1, but not in 1.8.

      I assume it is related to the changes referenced in http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/201503.mbox/%3C5515BC93.90402@ptc.com%3E.

      c:\temp>java -jar batik-1.8\batik-rasterizer-1.8.jar -scriptSecurityOff -d outputs -m application/pdf "empty.svg"

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/batik/dom/
      svg/SVGDOMImplementation
      at org.apache.fop.svg.AbstractFOPTranscoder.<init>(AbstractFOPTranscoder.java:107)
      at org.apache.fop.svg.PDFTranscoder.<init>(PDFTranscoder.java:84)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at java.lang.Class.newInstance(Unknown Source)
      at org.apache.batik.apps.rasterizer.DestinationType.getTranscoder(Unknown Source)
      at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source)
      at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
      at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: org.apache.batik.dom.svg.SVGDOMImplementation
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 11 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              middleto Phil Middleton
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: