Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2072

Servlets in WEB-INF/lib/xxx.jar cannot be loaded from web.xml

XMLWordPrintable

      1) Put servlet class in a jar residing in WEB-INF/lib
      2) Map servlet in web.xml

      Deployment of this WAR produces ClassNotFoundException. It works fine in 4.0.3RC1, but is broken in jboss-head.

      Here is the stack trace:

      2005-08-02 17:26:28,256 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/java/jboss-5.0.0alpha/server/default/deploy/ContainerTest.war
      java.lang.IllegalStateException: java.lang.ClassNotFoundException: test.jarred.FooServlet
      at org.jboss.ws.server.WebServiceDeployerJSE.isWebserviceDeployment(WebServiceDeployerJSE.java:166)
      at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:86)
      at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:49)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:160)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:77)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:76)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:247)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:653)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy33.create(Unknown Source)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:772)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:736)
      at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:143)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:82)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:123)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:76)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:125)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:76)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:247)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:653)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:317)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:487)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
      Caused by: java.lang.ClassNotFoundException: test.jarred.FooServlet
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.jboss.ws.server.WebServiceDeployerJSE.isWebserviceDeployment(WebServiceDeployerJSE.java:156)
      ... 30 more

              starksm64 Scott Stark (Inactive)
              lhoriman_jira Robert Dobbs (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: