简体   繁体   English

取消部署/部署战争后的Tomcat使NoClassDefFoundError:org.apache.xml.serializer.TreeWalker

[英]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. 它是serializer-2.7.1.jar的一部分,由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? 也许我应该将lib添加到tomcat lib,或者新的JRE / JDK可以完成这项工作?

Update: tomcat/lib: 更新: 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? 任何人都有这个问题的经验吗?

Please check your application lib and tomcat lib. 请检查您的应用程序库和tomcat库。 It seems that you have the same jar with different version at two places. 看来您在两个地方都有相同版本的jar,但版本不同。

serializer-2.7.1.jar contains this class. serializer-2.7.1.jar包含此类。 Simply putting it to tomcat/lib and restart the the tomcat application server -> solved this issue. 只需将其放入tomcat / lib并重新启动tomcat应用程序服务器->解决了此问题。 Do not really understand why the application/lib was not capable of doing this, but this other way it is works! 不太了解为什么应用程序/ lib无法执行此操作,但是通过其他方式可以正常工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM