Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > javax.servlet.ServletException: Wrapper cannot find servlet class

Reply
Thread Tools

javax.servlet.ServletException: Wrapper cannot find servlet class

 
 
HARI OM
Guest
Posts: n/a
 
      05-04-2005
I am using JBoss 4.0.1sp1 on SuSE Linux 9.0 System.
I have a WEB APPLICATION and access it using
http://localhost:8080/mhin/admin.html and here is my Directory
structure...

/jboss/server/default/deploy/mhin.war --> this is a directory.
/jboss/server/default/deploy/mhin.war/admin.html
/jboss/server/default/deploy/mhin.war/WEB-INF/web.xml
/jboss/server/default/deploy/mhin.war/WEB-INF/classes/t1.class
/jboss/server/default/deploy/mhin.war/WEB-INF/classes/t2.class
/jboss/server/default/deploy/mhin.war/WEB-INF/classes/util/p6.class
/jboss/server/default/deploy/mhin.war/WEB-INF/classes/util/p9.class

When I click on http://localhost:8080/mhin/admin.html I get following
ERROR wonder why...
(this HTML calls t1.java file)

-------------------------------------------------------------------
javax.servlet.ServletException: Wrapper cannot find servlet class t2 or
a class it depends on

org.jboss.web.tomcat.security.CustomPrincipalValve .invoke(CustomPrincipalValve.java:66)

org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:150)

org.jboss.web.tomcat.security.JaccContextValve.inv oke(JaccContextValve.java:54)

org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:11

org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)

org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:300)

org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:374)

org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:743)

org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:675)

org.apache.jk.common.SocketConnection.runIt(Channe lSocket.java:866)

org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)
root cause
java.lang.ClassNotFoundException: t2
java.net.URLClassLoader$1.run(URLClassLoader.java: 199)
java.security.AccessController.doPrivileged(Native Method)
-------------------------------------------------------------------

My WEB.XML file is:
-------------------------------------------------------------------
<web-app>
<servlet>
<servlet-name>t1</servlet-name>
<servlet-class>t1</servlet-class>
</servlet>
<servlet>
<servlet-name>t2</servlet-name>
<servlet-class>t2</servlet-class>
</servlet>
<servlet>
<servlet-name>p6</servlet-name>
<servlet-class>p6</servlet-class>
</servlet>
<servlet>
<servlet-name>p9</servlet-name>
<servlet-class>p9</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>t1</servlet-name>
<url-pattern>/t1/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>t2</servlet-name>
<url-pattern>/t2/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>p6</servlet-name>
<url-pattern>/p6/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>p9</servlet-name>
<url-pattern>/p9/*</url-pattern>
</servlet-mapping>
-------------------------------------------------------------------
NOTE: t1.java and t2.java have "import util.*" in their declarations.
and p6.java and p9.java have "package util" in their declarations...

Questions:
Are all the classes in the right directory?
Am I using the right FQDN? Fully Qualified Domain Name? in my WEB.XML?
Any other hints/ relevant informaiton would be appreciated...

Sincerely,

HARI

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Servlet Error]- not a servlet class Jitender Java 2 10-17-2007 02:24 PM
URGENT: javax.servlet.ServletException: Wrapper cannot find servlet dami.gupta@gmail.com Java 5 04-03-2007 11:54 AM
Offending class: javax/servlet/Servlet.class chamikara Java 1 06-19-2004 05:42 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM



Advertisments