xxjjnn
xxjjnn

Reputation: 15239

Eclipse Tomcat SEVERE: Error loading WebappClassLoader

Tomcat starts on Eclipse successfully, however any action involving the Servlet gives the error below.

I suspect the problem is that TomCat is looking in the WEB-INF folder for classes, though I have no idea where Eclipse has compiled and hidden them (not there for sure). How do I fix?

SEVERE: Error loading WebappClassLoader
  context: /MyEclipseProject
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@3344c133
 servlet.StartServlet
java.lang.ClassNotFoundException: servlet.StartServlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Unknown Source)

Have already read:

Error loading WebappClassLoader in Tomcat

eclipse exception thrown

Upvotes: 1

Views: 13666

Answers (4)

senior
senior

Reputation: 2266

  • Clean your project
  • Refresh it
  • redeploy it

I tried these steps and my app works :)

Upvotes: 0

vijay M
vijay M

Reputation: 23

I also got the same problem, after adding all the jars in "lib" folder now it's working properly

Upvotes: 0

duzhiweibe
duzhiweibe

Reputation: 21

The compiled class files are under $user.dir/webContent/WEB_INF/classes folder. If there are no classes there, I suggest you remove the project from the tomcat server, then clean your current project. Finally, run your porject(jsp etc) on the server again. I hope this will help.

Upvotes: 2

apurva.nandan
apurva.nandan

Reputation: 1101

Please remove the tomcat server runtime library from your project build path and then add the tomcat server again. Run now, it should solve your problem I guess.

Upvotes: 0

Related Questions