xmltomcattreexmlspy

ClassNotFoundException: org.apache.xml.serializer.TreeWalker


I wrote a simple app with xml database & appache tomcat. I worked fine, till I tried to zip the workspace while it was open. After that anytime I try to create tomcat server promptly I get this error:

ClassNotFoundException: org.apache.xml.serializer.TreeWalker

So I left this. Now I was working on xmlspy, trying to generate a pdf file using tomcat FO engine. I installed new tomcat & pointed to this in the xmlspy. Now when I try to run fo in xmlspy I get the following error.

Note: The serializer.jar & xalan jar files are already in lib folder.

log4j:WARN No appenders could be found for logger (org.apache.fop.util.ContentHandlerFactoryRegistry).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
  at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:823)
  at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:278)
  at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
  at org.apache.fop.cli.Main.startFOP(Main.java:174)
  at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: java.lang.ClassNotFoundException: org.apache.xml.serializer.TreeWalker
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
  ... 5 more

Solution

  • Okay I resolved the issue. There was a problem with xiling package( If I am right with the name) in JRE. Installed new JRE and it works fine now. Thanks.