1 Reply Latest reply on Aug 22, 2002 7:54 AM by adrian.brock

    Dependencies satisfied but EJBs not fully deployed...

    bmacy

      This problem is perplexing me. I have an MBean that depends on 2 EJBs as noted but this *-service.xml (it's in a sar):



      AlertAggregator
      jboss.j2ee:service=EJB,jndiName=com/pany/AlertGroup
      jboss.j2ee:service=EJB,jndiName=com/pany/AlertEngine



      As soon as the MBean is deployed it starts attempting to use the EJBs it depends on. The problem is the EJBs are "deployed" before they are ready to be used... they haven't even checked to see if their associate DB tables (they are CMPs) exist. So as soon as I try to use AlertGroup I get:
      10:29:37,491 ERROR [LogInterceptor] RuntimeException:
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createBeanClassInstance(JDBCStoreManager.java:513)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createBeanClassInstance(CMPPersistenceManager.java:165)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createBeanClassInstance(CachedConnectionInterceptor.java:251)
      at org.jboss.ejb.EntityContainer.createBeanClassInstance(EntityContainer.java:294)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:209)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:76)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy30.findByName(Unknown Source)
      at com.pany.aggregator.AlertAggregator.startService(AlertAggregator.java:85)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)


      Once the EJBs completely deploy completely the thing starts working but I have some code that needs to execute once when the MBean starts up. Any help would be appreciated.... this is highly annoying.

      Brian Macy