开发者

Tomcat 6.0 classes on system classpath cannot access the classes from the application

I am running a web application in tomcat6.0 . My problem is that while starting the Tomcat I need classes from commons-lang.jar. And I need the commons-lang.jar also in my web-app. I placed thic jar in the system classpath of Tomcat. Now I get the SerializationException from SerializationUtils. It tries to find a class which is present in the web-inf/lib directory. I saw the Tom开发者_如何学运维cat documentation for the classloaders. looks like the classes on system classpath cannot see the classes from the application.

What can i do to resolve this problem?


Put the commons-lang.jar in the Tomcat /lib directory and remove it from your application's WEB-INF/lib.


I had to create a class com.SerializationUtils and use this class in the application instead of the SerializationUtils from commons-lang. After this fix, everything works fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜