javax.servlet.ServletException: Wrapper cannot find servlet class

Discussion in 'Java' started by HARI OM, May 4, 2005.

  1. HARI OM

    HARI OM Guest

    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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:150)

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

    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

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

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

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

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

    org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)

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

    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.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
    HARI OM, May 4, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page