1

When i run my grails application in tomcat i get the following error java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGOMDocument. But the batik-svg-dom.1.7.jar is packaged in the war and in the classpath.

I don't however get this error when i am running the application in debug mode in STS. I am using Grails 2.3 and building my war using maven. I am using FOP and have excluded the "xml-apis".

I have tried to place the batik-svg-dom.jar in the lib folder of tomcat, that did not work.

Thanks in advance.

dpcasady
  • 1,826
  • 12
  • 30
  • Did you try this fix: http://stackoverflow.com/questions/8434416/converting-svg-to-pdf-with-batik-not-working-on-ubuntu-11-10?rq=1 – GeraldScott Sep 27 '14 at 12:53
  • 1
    It's been a while but, I think batik 1.7 was being excluded by maven you will need to run a maven dependency tree command to make sure. Also did you exclude all the xml-API from fop, since these break grails. See this post [link](http://stackoverflow.com/questions/11822681/batik-with-grails-giving-sax-clash) – user1613401 Sep 28 '14 at 16:46
  • Had the same issue, Eclipse w/o Maven. Adding xml-apis-ext.jar and xml-apis-1.3.04.jar to the classpath explicitly resolved the issue for me. Weird, as SVGOMDocument seems to be contained in the batik jars... – RobertG Oct 14 '14 at 07:43
  • What would be a fix using grails? – fsi Jun 02 '15 at 16:57

0 Answers0