0 Replies Latest reply on Oct 12, 2006 4:56 PM by Adam Loggins

    Error during hot redeployment when trying to use dependecies

    Adam Loggins Newbie

      I am trying to use the depends tag in the jboss.xml to handle deployment dependecies.
      I have 3 EJBs TESTA, TESTB, and TESTC. TESTB and TESTC have the depends tag in the jboss.xml. If I deploy them first then they wait before trying to deploy like they are supposed to. Once TESTA is deployed both deploy and work properly. The problem occurs if I try and undeploy TESTA and then redeploy it. When undeploying the following appears in the log file which makes sense.

      2006-10-12 15:37:05,950 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.j2ee:service=EjbModule,module=TESTA.jar dependent services are: [ObjectName: jboss.j2ee:jndiName=local/testBBean@33317701,service=EJB
       State: STOPPED
       I Depend On:
       jboss.j2ee:module=TESTA.jar,service=EjbModule
      , ObjectName: jboss.j2ee:jndiName=testCBean,service=EJB
       State: STOPPED
       I Depend On:
       jboss.j2ee:module=TESTA.jar,service=EjbModule
      ]
      



      Likewise on the redeploy a similar log comes up
      2006-10-12 15:37:26,903 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EjbModule,module=TESTA.jar dependents are: [ObjectName: jboss.j2ee:jndiName=local/testBBean@33317701,service=EJB
       State: DESTROYED
       I Depend On:
       jboss.j2ee:module=TESTA.jar,service=EjbModule
      , ObjectName: jboss.j2ee:jndiName=testCBean,service=EJB
       State: DESTROYED
       I Depend On:
       jboss.j2ee:module=TESTA.jar,service=EjbModule
      ]
      


      this is where the problem occurs, when it tries to bring the other 2 dependants up the following errors are thrown:
      TESTB:
      2006-10-12 15:37:26,903 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:jndiName=local/testBBean@33317701,service=EJB
      2006-10-12 15:37:26,903 DEBUG [org.jboss.ejb.MessageDrivenContainer] Creating jboss.j2ee:jndiName=local/testBBean@33317701,service=EJB
      2006-10-12 15:37:26,908 DEBUG [org.jboss.ejb.MessageDrivenContainer] Mapped onMessage 1175993645 to public void com.test.b.testBBean.onMessage(javax.jms.Message)
      2006-10-12 15:37:26,914 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EJB,plugin=pool,jndiName=local/testBBean@33317701
      2006-10-12 15:37:26,914 DEBUG [org.jboss.ejb.plugins.MessageDrivenInstancePool] Creating jboss.j2ee:service=EJB,plugin=pool,jndiName=local/testBBean@33317701
      2006-10-12 15:37:26,915 DEBUG [org.jboss.ejb.plugins.MessageDrivenInstancePool] Created jboss.j2ee:service=EJB,plugin=pool,jndiName=local/testBBean@33317701
      2006-10-12 15:37:26,915 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EJB,plugin=pool,jndiName=local/testBBean@33317701 dependents are: []
      2006-10-12 15:37:26,925 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/testBBean@33317701
      2006-10-12 15:37:26,926 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Creating jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/testBBean@33317701
      2006-10-12 15:37:26,926 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Created jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/testBBean@33317701
      2006-10-12 15:37:26,927 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/testBBean@33317701 dependents are: []
      2006-10-12 15:37:26,927 DEBUG [org.jboss.ejb.MessageDrivenContainer] Created jboss.j2ee:jndiName=local/testBBean@33317701,service=EJB
      2006-10-12 15:37:26,927 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:jndiName=local/testBBean@33317701,service=EJB dependents are: []
      2006-10-12 15:37:26,928 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:jndiName=testCBean,service=EJB
      2006-10-12 15:37:26,930 DEBUG [org.jboss.ejb.StatelessSessionContainer] Creating jboss.j2ee:jndiName=testCBean,service=EJB
      2006-10-12 15:37:26,936 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method remove HASH -1842617161
      2006-10-12 15:37:26,936 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method isIdentical HASH 285457048
      2006-10-12 15:37:26,937 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method getHandle HASH 1182305581
      2006-10-12 15:37:26,937 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method getEJBHome HASH -993218923
      2006-10-12 15:37:26,937 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method getPrimaryKey HASH -131865408
      2006-10-12 15:37:26,937 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method remove HASH 2137066130
      2006-10-12 15:37:26,938 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method isIdentical HASH -62303043
      2006-10-12 15:37:26,938 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method getEJBLocalHome HASH 696357781
      2006-10-12 15:37:26,938 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapped Container method getPrimaryKey HASH 359205605
      2006-10-12 15:37:26,938 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapping create
      2006-10-12 15:37:26,938 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapping remove
      2006-10-12 15:37:26,938 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapping remove
      2006-10-12 15:37:26,939 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapping getEJBMetaData
      2006-10-12 15:37:26,939 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapping getHomeHandle
      2006-10-12 15:37:26,939 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapping create
      2006-10-12 15:37:26,939 DEBUG [org.jboss.ejb.StatelessSessionContainer] Mapping remove
      2006-10-12 15:37:26,941 DEBUG [org.jboss.ejb.StatelessSessionContainer] Initialization failed jboss.j2ee:jndiName=testCBean,service=EJB
      java.lang.NullPointerException
       at org.jboss.proxy.ejb.ProxyFactory.create(ProxyFactory.java:146)
       at org.jboss.ejb.SessionContainer.createInvokers(SessionContainer.java:349)
       at org.jboss.ejb.SessionContainer.createService(SessionContainer.java:158)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
       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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
       at $Proxy0.create(Unknown Source)
       at org.jboss.system.ServiceController.create(ServiceController.java:341)
       at org.jboss.system.ServiceController.create(ServiceController.java:284)
       at org.jboss.system.ServiceController.create(ServiceController.java:360)
       at org.jboss.system.ServiceController.create(ServiceController.java:284)
       at sun.reflect.GeneratedMethodAccessor4.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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy23.create(Unknown Source)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:606)
       at sun.reflect.GeneratedMethodAccessor142.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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy24.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
       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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
       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)
      


      TESTC:
      2006-10-12 15:37:26,944 WARN [org.jboss.system.ServiceController] Problem creating service jboss.j2ee:jndiName=testCBean,service=EJB
      java.lang.NullPointerException
       at org.jboss.proxy.ejb.ProxyFactory.create(ProxyFactory.java:146)
       at org.jboss.ejb.SessionContainer.createInvokers(SessionContainer.java:349)
       at org.jboss.ejb.SessionContainer.createService(SessionContainer.java:158)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
       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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
       at $Proxy0.create(Unknown Source)
       at org.jboss.system.ServiceController.create(ServiceController.java:341)
       at org.jboss.system.ServiceController.create(ServiceController.java:284)
       at org.jboss.system.ServiceController.create(ServiceController.java:360)
       at org.jboss.system.ServiceController.create(ServiceController.java:284)
       at sun.reflect.GeneratedMethodAccessor4.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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy23.create(Unknown Source)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:606)
       at sun.reflect.GeneratedMethodAccessor142.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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy24.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
       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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
       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)
      


      Then TESTA finishes its deployment.

      I am trying to figure out if this is the proper way to use the depends and if depends is supposed to work for redeployments.

      For completeness here are the 2 jboss.xml files for the dependent beans.
      <jboss>
       <enterprise-beans>
       <message-driven>
       <ejb-name>testBBean</ejb-name>
       <!--<destination-jndi-name>java:comp/resource/testAQ/Queues/ADAMSTESTQUEUE</destination-jndi-name>-->
       <!-- remote beans only -->
       <depends>jboss.j2ee:module=TESTA.jar,service=EjbModule</depends>
       </message-driven>
       </enterprise-beans>
      </jboss>
      
      
      <jboss>
       <enterprise-beans>
       <session>
       <ejb-name>testCBean</ejb-name>
       <!--<destination-jndi-name>java:comp/resource/testAQ/Queues/ADAMSTESTQUEUE</destination-jndi-name>-->
       <!-- remote beans only -->
       <depends>jboss.j2ee:module=TESTA.jar,service=EjbModule</depends>
       </session>
       </enterprise-beans>
      </jboss>
      



      Adam Loggins