1 Reply Latest reply on Feb 25, 2009 11:38 AM by Peter Johnson

    java.lang.ClassNotFoundException: org.UoD.Control.Servlet

    Amar Sibia Newbie

      Hi I'm trying to write an EJB application from scratch, and to be honest im kind of lost. I have created my EJB and it seems to be deployed ok and my client side app is deploying but throwing the following error

      INFO [[/UoD]] Marking servlet Servlet as unavailable
      ERROR [[/UoD]] Error loading WebappClassLoader
       delegate: false
       repositories:
      ----------> Parent Classloader:
      java.net.FactoryURLClassLoader@83dae1
       org.UoD.Control.Servlet
      java.lang.ClassNotFoundException: org.UoD.Control.Servlet
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
       at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
       at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      10:55:53,103 ERROR [[Servlet]] Allocate exception for servlet Servlet
      java.lang.ClassNotFoundException: org.UoD.Control.Servlet
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
       at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
       at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      


      I found online that maybe i should be building my src code into ../WEB-INF/classes/ so i tried that and the same still occurs.

      my servlet declaration in the web.xml is as such:

      <servlet>
       <servlet-name>Servlet</servlet-name>
       <servlet-class>org.UoD.Control.Servlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Servlet</servlet-name>
       <url-pattern>/servlet</url-pattern>
       </servlet-mapping>
      


      any advice on where to look or where i am going wrong would really help