czupe
czupe

Reputation: 4919

Tomcat after undeploy/deploy a war makes NoClassDefFoundError: org.apache.xml.serializer.TreeWalker

After deploying the same war which was perfectly OK before the deploy. I got this exception:

java.lang.NoClassDefFoundError: org/apache/xml/serializer/utils/DOM2Helper
        at org.apache.xml.serializer.TreeWalker.<init>(TreeWalker.java:121)

It is the part of serializer-2.7.1.jar and managed by maven.

It seems somehow the undeploy/deploy proccess screw the libs. Any idea how to get rid of this exception? Now the workaround just to restart the server after every deploy, but it is not nice. Maybe i should add the lib to tomcat lib, or new JRE/JDK can do the job?

Update: tomcat/lib:

annotations-api.jar  catalina-storeconfig.jar  ecj-P20140317-1600.jar  jasper.jar       tomcat-api.jar     tomcat-i18n-es.jar  tomcat-jdbc.jar  tomcat-util-scan.jar  websocket-api.jar
catalina-ant.jar     catalina-tribes.jar       el-api.jar              jsp-api.jar      tomcat-coyote.jar  tomcat-i18n-fr.jar  tomcat-jni.jar   tomcat-util.jar
catalina-ha.jar      catalina.jar              jasper-el.jar           servlet-api.jar  tomcat-dbcp.jar    tomcat-i18n-ja.jar  tomcat-spdy.jar  tomcat-websocket.jar

Anyone has experience with this problem?

Upvotes: 0

Views: 7908

Answers (2)

czupe
czupe

Reputation: 4919

serializer-2.7.1.jar contains this class. Simply putting it to tomcat/lib and restart the the tomcat application server -> solved this issue. Do not really understand why the application/lib was not capable of doing this, but this other way it is works!

Upvotes: 1

sanjay pandey
sanjay pandey

Reputation: 81

Please check your application lib and tomcat lib. It seems that you have the same jar with different version at two places.

Upvotes: 1

Related Questions