14 Replies Latest reply on Jan 7, 2004 6:42 PM by jdavis

    UCL / Class Loading Prolems Deploying .war and .ear files

    jdavis

      I've recently started using JBoss, and have had a lot of difficulty with the Universal Class Loader. I have deployed a number of .war files that have been in use on our older system (Oracle.) I have changed "UseJBossWebLoader" in jboss-service.xml to "false," and have added jboss-app.xml files indicating "com.mycompany:loader=myapp_1_1_prod.ear."

      When I check the jmx-console/HtmlAdaptor it says that I have no instances of the classes that I look for. I had assumed that this was what I wanted.

      However, I am still experiencing lingering problems. Most recently an .ear file I have can't find the commons-validator classes for use with struts. This particular app uses an older version of struts, but it was my impression that this would not matter.

      Any advice on the proper way to deploy .war or .ear files would be greatly appreciated.

      Thanks.

        • 1. Re: UCL / Class Loading Prolems Deploying .war and .ear file

          Where do you have the validator classes in your EAR file? What version of JBoss?

          • 2. Re: UCL / Class Loading Prolems Deploying .war and .ear file
            jdavis

            Juha,

            Thanks for replying. I was out of the office last week for the holidays which is why I didn't respond.

            I'm using Jboss 3.2.2 and the validator is in my WEB-INF/lib folder in the war file. My structure is:
            ear --
            Manifest.mf
            application.xml
            jboss-app.xml
            program_name.war
            WEB-INF/lib
            WEB-INF/classes
            pages
            images

            I'm not packaging a jar file as this isn't an EJB app yet.

            My application.xml is:

            <display-name>App Name</display-name>


            <web-uri>appname_1_2.war</web-uri>
            <context-root>/</context-root>
            <virtual-host>appname.companyname.com</virtual-host>




            My jboss-app.xml is:
            <jboss-app>
            <loader-repository>appname.companyname.com:loader=appname_1_2.war</loader-repository>
            </jboss-app>

            Any advice is appreciated.

            Thanks!
            Jeremy

            • 3. Re: UCL / Class Loading Prolems Deploying .war and .ear file

              So validator.jar is under EAR/program_name.war/WEB-INF/lib ?

              And struts is loaded and used where? In the same WAR? A different WAR?

              Try setting UseJBossWebLoader = true.


              • 4. Re: UCL / Class Loading Prolems Deploying .war and .ear file
                jdavis

                commons-validator.jar is under appname.ear -> appname.war -> WEB-INF/lib

                struts.jar is in the same location, and this is on my local box where there are no other apps currently. Of course the production server will have other apps.

                I changed UseJBossWebLoader = true in the jboss-service.xml under the default instance which is the one I'm running. I don't see any errors related to the validator plugin, but now it throws:
                javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet...
                18:23:23,159 ERROR [Engine] ----- Root Cause -----
                java.lang.ExceptionInInitializerError
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
                at java.lang.Class.newInstance0(Class.java:306)
                at java.lang.Class.newInstance(Class.java:259)...
                Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log...

                Followed by a few more logging exceptions.

                Any help is greatly appreciated as I am completely lost :)

                Thanks,
                Jeremy

                • 5. Re: UCL / Class Loading Prolems Deploying .war and .ear file

                  Do you have commons-logging packaged somewhere inside struts or your app (you cut off the stack trace just where it started getting interesting)

                  • 6. Re: UCL / Class Loading Prolems Deploying .war and .ear file
                    jdavis

                    I did have commons-logging.jar in my classpath. I removed it since I'm not using it.

                    ActionServlet still won't load. The stack trace (hopefully including the interesting parts) is:

                    20:24:55,050 INFO [EmbeddedTomcatService] deploy, ctxPath=, warUrl=file:/C:/jboss/jboss-3.2.2/server/default/tmp/deploy/tmp43423appname.ear-contents/appname.war/
                    20:24:56,034 INFO [Engine] ContextConfig[]: Added certificates -> request attribute Valve
                    20:24:56,065 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@5b540e
                    20:24:56,065 INFO [Engine] StandardManager[]: Seeding random number generator class java.security.SecureRandom
                    20:24:56,065 INFO [Engine] StandardManager[]: Seeding of random number generator has been completed
                    20:24:56,206 INFO [Engine] StandardWrapper[:action]: Marking servlet action as unavailable
                    20:24:56,206 ERROR [Engine] StandardContext[]: Servlet threw load() exception
                    javax.servlet.ServletException: Class org.apache.struts.action.ActionServlet is not a Servlet
                    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:907)
                    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
                    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3421)
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3609)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:530)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309)
                    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy6.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy5.deploy(Unknown Source)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                    at org.jboss.Main.boot(Main.java:150)
                    at org.jboss.Main$1.run(Main.java:395)
                    at java.lang.Thread.run(Thread.java:536)
                    20:24:56,206 ERROR [Engine] ----- Root Cause -----
                    java.lang.ClassCastException
                    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:903)
                    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
                    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3421)
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3609)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:530)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309)
                    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy6.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy5.deploy(Unknown Source)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                    at org.jboss.Main.boot(Main.java:150)
                    at org.jboss.Main$1.run(Main.java:395)
                    at java.lang.Thread.run(Thread.java:536)

                    Essentially the same error with a home rolled servlet follows immediately:

                    20:24:56,206 INFO [Engine] StandardWrapper[:default]: Loading container servlet default
                    20:24:56,237 INFO [Engine] StandardWrapper[:invoker]: Loading container servlet invoker
                    20:24:56,237 INFO [Engine] StandardWrapper[:initializationservlet]: Marking servlet initializationservlet as unavailable
                    20:24:56,237 ERROR [Engine] StandardContext[]: Servlet threw load() exception
                    javax.servlet.ServletException: Class com.waca.nec.InitializationServlet is not a Servlet
                    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:907)
                    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
                    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3421)
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3609)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:530)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309)
                    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy6.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy5.deploy(Unknown Source)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                    at org.jboss.Main.boot(Main.java:150)
                    at org.jboss.Main$1.run(Main.java:395)
                    at java.lang.Thread.run(Thread.java:536)
                    20:24:56,253 ERROR [Engine] ----- Root Cause -----
                    java.lang.ClassCastException
                    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:903)
                    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
                    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3421)
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3609)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:530)
                    at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309)
                    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy6.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy5.deploy(Unknown Source)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                    at org.jboss.Main.boot(Main.java:150)
                    at org.jboss.Main$1.run(Main.java:395)
                    at java.lang.Thread.run(Thread.java:536)

                    Both of these servlets are loaded on startup which might have something to do with the problem.

                    Thanks again,
                    Jeremy

                    • 7. Re: UCL / Class Loading Prolems Deploying .war and .ear file

                      Hmm, well... you don't happen to have extra javax.servlet jars lying around somewhere in your classpath (or JDK lib/ext) also?

                      It would appear you're getting duplicate definitions of Servlet interface...

                      • 8. Re: UCL / Class Loading Prolems Deploying .war and .ear file
                        jdavis

                        I don't think so. I removed all other apps, and I have a jboss-app.xml.

                        I don't understand the class loading very well. Should I include all .jars that I want to use in my WEB-INF/lib, including servlet.jar, mail.jar, etc and completely ignore what's in the default/lib?

                        Thanks,
                        Jeremy

                        • 9. Re: UCL / Class Loading Prolems Deploying .war and .ear file

                           

                          "jdavis" wrote:
                          I don't think so. I removed all other apps, and I have a jboss-app.xml.


                          Ok, I meant your system classpath though, unrelated to your deployment.

                          "jdavis" wrote:

                          I don't understand the class loading very well. Should I include all .jars that I want to use in my WEB-INF/lib, including servlet.jar, mail.jar, etc and completely ignore what's in the default/lib?


                          No, that should not be necessary. I just found it curious that it appears Tomcat is getting a different javax.servlet.Servlet definition than the web deployment loader that loads your servlet instance.

                          What happens if you now switch UseJBossWebLoader back to false again?




                          • 10. Re: UCL / Class Loading Prolems Deploying .war and .ear file
                            jdavis

                            My system is WinXP, and I've got Java_Home and Path entries but no classpath set. I use Eclipse and set the classpath per project.

                            I made two changes and now it deploys fine. I changed UseJBossWebLoader to false as you suggested and updated the commons-validator.jar to the most recent.

                            However, if I change UseJBossWebLoader to true it won't run. This doesn't concern me immediately, but I want to follow best practices, which I assume means setting JBossWebLoader to true.

                            I'm guessing the problem might be that this app uses struts 1.0 , and the 2.3 servlet spec conflicts. Does that make sense?

                            Thanks for all your help. The ability to get answers directly from the program's developers was one of the biggest selling points we used to convince the higher ups to use JBoss in the first place.

                            Jeremy

                            • 11. Re: UCL / Class Loading Prolems Deploying .war and .ear file

                               

                              "jdavis" wrote:

                              I'm guessing the problem might be that this app uses struts 1.0 , and the 2.3 servlet spec conflicts. Does that make sense?


                              Something like the earlier ExceptionInInitializer maybe, but not the last ClassCastException, I would not expect to see that.

                              "jdavis" wrote:

                              Thanks for all your help. The ability to get answers directly from the program's developers was one of the biggest selling points we used to convince the higher ups to use JBoss in the first place.


                              Ok, now convince them to buy production support ;-)

                              Good luck,



                              • 12. Re: UCL / Class Loading Prolems Deploying .war and .ear file
                                jdavis

                                juha wrote:

                                now convince them to buy production support ;-)


                                They are looking at training packages at least. :)


                                • 13. Re: UCL / Class Loading Prolems Deploying .war and .ear file

                                  Do they need help? Ben or Wieland can give them a call and help them chooce...

                                  • 14. Re: UCL / Class Loading Prolems Deploying .war and .ear file
                                    jdavis

                                    I've been in correspondence with Mark Andres. He's been very helpful. Nobody was really in our office anyway for the past two weeks, and we decided on JBoss at the beginning of December. Our IT director and Internet manager are going over the material. I'm pretty sure we'll be signing up for something. I've also talked with Mark about a users' group here in Atlanta, which is where we're located as well, and I'd really like to be involved in one. Nothing beats experience :)

                                    Again, thanks for your help.
                                    Jeremy