开发者

How to resolve java.lang.NoClassDefFoundError?

I'm currently working on a simple web project, for which I am using the SDK of Polarion. When trying to work with the according *.jar-Files, Tomcat 7 throws the following error message on start-up:

SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: Lcom/polarion/alm/ws/client/session/SessionWebService;

According to the research I have undertaken, Java is trying to find an instance of com.polarion.ws.cl开发者_Python百科ient.session.SessionWebService (thus the leading L). I have checked the classpath for the needed entry - it's there.

C:\Polarion\polarion\SDK\lib\com.polarion.alm.ws.client\wsclient.jar

As of now, I've run out of ideas what could have gone wrong. Do you have any ideas?

Thanks a lot! Simon


You are not supposed to put libraries for use in webapps in the CLASSPATH. You are supposed to put them in WEB-INF/lib in your webapp.


Deployment and compilation are different processes. You should be aware of that, you can compile but if the necessary libraries are not accessible by the deployed application , you would get this exception.. As previous answer suggests, you should put necessary libraries WEB-INF/lib directory of your web application..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜