3 Replies Latest reply on Oct 2, 2007 9:54 AM by stumbav

    Deploying web application

    hariharanrk

      Hi All,

      I am running into a peculiar problem while deploying multiple web applications(.war) in JBoss 3.2.5. I have two war files using the same class library and the same set of API but with some minor changes between the two applications. The problem I am running into is that JBoss uses the same class loader for both the applications. This has been explained in http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration. I followed the steps posted in the website at the above mentioned url without any sucess.

      To overcome this issue, I added the following code in jboss-web.xml

      <class-loading java2ClassLoadingCompliance="false">
      <loader-repository>
      com.peo:loader=peo.war
      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
      </class-loading>

      but this is not deploying the application itself. I have made sure that I removed all classes that might be duplicated from the application. ie made sure that there are no jar files/ class files in the WEB-INF/classes or WEB-INF/lib folders that are available in {jboss_home}\lib & {jboss_home}\server\default\lib.

      Secondly I even tried setting the following properties to false in {jboss_home}\server\default\deploy\jbossweb-tomcat50.sar\META-INF folder.

      true
      true

      I am having to run 2 instances of JBoss to overcome this issue. Please help me out of this issue.


      Thanks,
      Hariharan.

        • 1. Re: Deploying web application
          starksm64

          I can't help you with the details you have provided. What does it mean for the app to start not when using the scoped class loading configuration. Show the exceptions.

          • 2. Re: Deploying web application
            hariharanrk

            Hi Scott,

            Here is the stacktrace of the exception I got when <class-loading > tag is included in jbossweb.xml

            org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (ReflectionException: Cannot find setter method setLoader StandardContext[null]
            Cause: java.lang.NoSuchMethodException: org.apache.catalina.core.StandardContext.setLoader(org.apache.catalina.Loader))
            at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:315)
            at org.jboss.web.WebModule.startModule(WebModule.java:62)
            at org.jboss.web.WebModule.startService(WebModule.java:40)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
            at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
            at $Proxy17.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:367)
            at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy31.start(Unknown Source)
            at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:313)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
            at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy7.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
            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.jbossInternalStart(ServiceMBeanSupport.java:271)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
            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.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:367)
            at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy4.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
            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.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy5.deploy(Unknown Source)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
            at org.jboss.Main.boot(Main.java:145)
            at org.jboss.Main$1.run(Main.java:399)
            at java.lang.Thread.run(Thread.java:534)
            ... 94 more



            Thanks,
            Hariharan.

            • 3. Re: Deploying web application
              stumbav

              I encountered similar problem, solved it and it might be of some help to someone else.
              The cause was gwt-dev-linux jar deployed with the problematic war.
              gwt-dev-linux contains some of catalina classes which were out of version for my jboss instance. So grep the libs deployed with your war on the catalina classes and get all the junk out of your war :-).


              Vasek