5 Replies Latest reply on May 14, 2002 4:19 AM by morten Matras

    NullPointerException in ContainerInterceptor.invokeHome for

    Alexander Newbie

      After successful deployment on jboss(3.0.0-CR1)-tomcat(...) of j2ee (1.3) application with one ejb (2.0) module and one web module I'm getting java.rmi.ServerException("null; nested exception is: java.lang.NullPointerException"), executing code like this :

      ...
      user = userHome.findByPrimaryKey(new Integer(0));
      ...

      where userHome is remote home interface for CMP entity bean, and code is invoked from web module.
      I have not used any jboss specific customization (jboss.xml, jaws.xml, jbosscmp-jdbc.xml, etc.), but according to logs all CMP and EJB-QL related stuff was mapped properly. All CMP entities are configured with "unchecked" security flag and "Required" tranasaction attribute for all methods.

      Any guess ?

      Thanks a lot in advance.

      Here is cut from server.log related to this matter.

      <!-- Invocation Log Trace -->
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@499f7d
      TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=findByPrimaryKey
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@5e155
      TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@cd4db
      TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for findByPrimaryKey
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@6a8dbd
      TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@7f83a9
      TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=IBM-THINK-PAD//1, BranchQual=]
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@1cfd7c
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Get instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#false#class com.alazarllc.cmm.common.ejb.provider.bean.NamedEntityBean
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@45d7f2
      TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@1fe666#org.jboss.ejb.EntityEnterpriseContext@1c15d2
      TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=findByPrimaryKey
      ..............................

      <!-- Exception Stack Trace -->
      INFO [STDOUT] java.lang.NullPointerException
      INFO [STDOUT] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1107)
      INFO [STDOUT] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      INFO [STDOUT] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:230)
      INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:176)
      INFO [STDOUT] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
      INFO [STDOUT] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      INFO [STDOUT] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
      INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
      INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
      INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
      INFO [STDOUT] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:727)
      INFO [STDOUT] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      INFO [STDOUT] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      INFO [STDOUT] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      INFO [STDOUT] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
      INFO [STDOUT] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:96)
      INFO [STDOUT] at $Proxy156.findByPrimaryKey(Unknown Source)
      ..............................