3 Replies Latest reply on May 11, 2009 4:44 AM by Anders Andersen

    Runtime classloader cannot be null

    Gerald Turner Newbie

      I have a JAX-WS 2.0 RI based project deployed on JBoss 4.0.4.GA that I am upgrading to JBoss 4.2.1.GA with JBossWS 2.0.1.GA.

      Deployment of the .war fails with the following stacktrace:

      2007-10-17 09:31:32,361 ERROR [org.jboss.deployment.MainDeployer] (main:) Could not start deployment: file:/home/jboss/jboss-4.2.1.GA/server/jboss2/farm/HVODImportWebService.war
      java.lang.IllegalArgumentException: Runtime classloader cannot be null
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:55)
       at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeploymentAspect.java:66)
       at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
       at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
       at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy55.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor28.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy67.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.ha.framework.server.FarmMemberService.deploy(FarmMemberService.java:412)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.ha.framework.server.FarmMemberService.startService(FarmMemberService.java:212)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor6.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor11.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoke.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor28.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy10.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor6.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor11.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
       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:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
       at org.jboss.Main.boot(Main.java:200)
       at org.jboss.Main$1.run(Main.java:508)
       at java.lang.Thread.run(Thread.java:595)
      


      The war file contains the following jboss-web.xml:

      <?xml version="1.0" encoding="iso-8859-1"?>
      <!DOCTYPE jboss-web
       PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
      <!-- $Id: jboss-web-import.xml,v 1.4 2007/05/16 21:39:57 gturner Exp $ -->
      <jboss-web>
       <class-loading>
       <loader-repository>
       xo.loaders:loader=HVODImportWebService.war
       </loader-repository>
       </class-loading>
      
       <security-domain>java:/jaas/LDAP</security-domain>
      
       <context-root>/HVODWebService/Import</context-root>
      
       <use-session-cookies>false</use-session-cookies>
      
       <depends>xo.services:service=ConfigurationManager</depends>
      </jboss-web>
      


      When I remove the loader-repository configuration, deployment is successful. I'm not entirely sure why I have a habit of declaring loader-repository for all my deployments, it definitely began with my quest for isolated-classloaders, but is probably superfluous now that I have isolated classloaders properly configured in conf/jboss-service.xml, deploy/ear-deployer.xml, and deploy/jboss-web.deployer/META-INF/jboss-service.xml server configuration files.

        • 1. Re: Runtime classloader cannot be null
          Steve Jackson Newbie

          I have the same issue using jboss-4.2.2.GA and JBossWS2.0.1SP2 or JBossWS2.0.3.

          I need to make my .war dependent on the service that provides the data being served by the web service. My .war contains a single class; it uses @WebService and @WebMethod to tag what needs to be exposed to the wsdl.

          I used a < depends > element in jboss-web.xml to make the .war dependent on the service. Unfortunately it appears that the DeploymentAspectManagerImpl is executing despite the .war still waiting for creation/startup. My guess is that JAXWSMetaDataBuilderJSE then tries to pull the classloader while the .war is in this state and receives null.

          Is there another way to accomplish this dependency?

          Here's a snippet of the log after the interceptors have been set up:

          2008-03-05 10:08:22,953 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying TEST.war
          2008-03-05 10:08:22,953 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/C:/jboss-4.2.2.GA/server/default/deploy/TEST.war/
          2008-03-05 10:08:22,953 DEBUG [org.jboss.system.ServiceController] starting service jboss.web.deployment:war=TEST.war,id=-1578707402
          2008-03-05 10:08:22,953 DEBUG [org.jboss.system.ServiceController] Start requested before create, calling create now for service: jboss.web.deployment:war=TEST.war,id=-1578707402
          2008-03-05 10:08:22,953 DEBUG [org.jboss.system.ServiceController] Creating service jboss.web.deployment:war=TEST.war,id=-1578707402
          2008-03-05 10:08:22,953 DEBUG [org.jboss.system.ServiceController] waiting in create of jboss.web.deployment:war=TEST.war,id=-1578707402 waiting on test.test:service=TEST.0
          2008-03-05 10:08:22,953 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.web.deployment:war=TEST.war,id=-1578707402 on test.test:service=TEST.0
          2008-03-05 10:08:22,953 DEBUG [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPostJSE] deploy: TEST.war
          2008-03-05 10:08:22,953 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] provide SPI 'class org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory'
          2008-03-05 10:08:22,953 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] class org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory Implementation: org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory@709366
          2008-03-05 10:08:22,953 DEBUG [org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory] DeploymentAspectManager for: WSDeploymentAspectManagerPostJSE
          2008-03-05 10:08:22,953 DEBUG [org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl] RuntimeLoaderDeploymentAspect:Create
          2008-03-05 10:08:22,953 DEBUG [org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl] JAXBIntroDeploymentAspect:Create
          2008-03-05 10:08:22,953 DEBUG [org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl] UnifiedMetaDataDeploymentAspect:Create
          2008-03-05 10:08:22,953 DEBUG [org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE] START buildMetaData: [name=TEST.war]
          2008-03-05 10:08:22,953 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/C:/jboss-4.2.2.GA/server/default/deploy/TEST.war/
          


          • 2. Re: Runtime classloader cannot be null
            Steve Jackson Newbie

            I forgot to mention I'm not using a loader-repository. My jboss-web.xml looks like this:

            <?xml version="1.0" encoding="UTF-8"?>
            
            <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
            
            
            <jboss-web>
            
             <depends>test.test:service=TEST.0</depends>
            
            </jboss-web>
            


            • 3. Re: Runtime classloader cannot be null
              Anders Andersen Newbie

              Hi,

              We have the exact same problem with jbossws-native-2.0.1.SP2_CP03 (included with the jboss-soa-p-standalone.4.3.0). Has anyone found a solution to this issue?


              Kind regards,

              Anders.