Reputation: 11
i have created a dynamic web page for a servlet. When i try run the project i get the following error:
http starus 500
javax.servlet.ServletException: Error instantiating servlet class ch.uzh.ifi.attempto.aceeditor.MyMainServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Unknown Source)
how can i fix this?
Upvotes: 1
Views: 1935
Reputation: 18344
Can you check the following: Are the servlet entries proper in web.xml? (no spelling errors, correct package,...)
Is the servlet class is in classpath, in the same path as given in web.xml?
Looks like one of these.
What server are you using?
Upvotes: 0
Reputation: 11
I found that a basic test servlet is working. The basic servlet extends the class HttpServlet.
The servlet i want to run extends the WebContainerServlet class, so i believe that this is the source of the error.
The error i get now is
javax.servlet.ServletException: Error allocating a servlet instance org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) ... do you need me to post all the stack trace?
Upvotes: 0
Reputation: 308733
Can't tell from the stack trace - could be any number of things:
I'd recommend starting with this and carefully reviewing what you've done, step by step.
Upvotes: 1