-
SEVERE: Allocate exception for servlet ocs
I have been sucessful in getting our application going with Netbeans 4.0 IDE with the utilization of Tomcat 5.0.28. Now, I have migrated our application outside of the IDE using Tomcat 5.5.4. The applet that talks to the servlet via httpclient comes up fine within the Tomcat environment. However, it is the Servlet that cannot be instantiated. The Java console gives an error 404, but that really means that the resourse is unavailable as opposed to being not found, because our Servlet is being found. The parsed out trace is a copy of stdout from the Catalina logs. I have posted it here so that it may assist in debugging of the problem.
------------------------------------------------------------------------------- ----------------------
SEVERE: Allocate exception for servlet ocs
javax.servlet.ServletException: Error instantiating servlet class org.ocs.OCSServlet
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1020)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:711)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 131)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 7)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnecti on(Http11Protocol.java:731)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:5 26)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorke rThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:6 84)
at java.lang.Thread.run(Unknown Source)
------------------------------------------------------------------------------- ------------------------------
The modified Catalina server.xml looks like the following...
.
.
.
<Context path="/ESI" docbase="ESI" debug="10" reloadable="true"
crossContext="true">
</Context>
</Host>
</Engine>
</Service>
</Server>
------------------------------------------------------------------------------- ---------------------------
The web.xml file in the webapps for our application looks like the following....
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>
ESIServlet
</servlet-name>
<servlet-class>
org.ocs.OCSServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
ESIServlet
</servlet-name>
<url-pattern>
/ESI/org.ocs/*
</url-pattern>
</servlet-mapping>
</web-app>
Any assistance to help us solve this problem would be greatly appreciated! Thank you very much!
Eric.
esi-inc
-
Not sure, but you might have a web.xml issue. Here is a web.xml that worked for me in Tomcat with a similar configuration (two servlets defined in the same container):
Hope this helps-
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Tomcat Examples</display-name>
<description>
Tomcat Example servlets and JSP pages.
</description>
<servlet>
<servlet-name>AddressControllerServlet</servlet-name>
<servlet-class>AddressControllerServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ControllerServlet</servlet-name>
<servlet-class>ControllerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AddressControllerServlet</servlet-name>
<url-pattern>/AddressControllerServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ControllerServlet</servlet-name>
<url-pattern>/ControllerServlet</url-pattern>
</servlet-mapping>
</web-app>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks