2 Replies Latest reply on Feb 14, 2004 6:57 PM by Christopher Rued

    Jboss 3.2.2RC2 Distributed Cache Invalidation Issue

    Robert Costanzo Newbie

      I am trying out JBoss 3.2.2RC2 and receiving a NullPointerException in the InvalidationsTxGrouper class whenever I update an EJB, triggering a cache invalidation event. My EJBs are configured to use the CMP 2.x with cache invalidation configuration. Note that these same EJBs work fine with cache invalidation on JBoss 3.2.1.

      I am using the 'all' server configuration without customizing it. So it's using the default JGCacheInvalidationBridge.

      After the exception, I get another about "negative lock reference count should never happen". But I think this is probably due to the original cache invalidation exception leaving the EJB in a bad state.

      Note that this is occuring when I'm running only one instance in the cluster (I haven't tried it with multiple). Is this a new bug introduced in 3.2.2RC2? Any ideas?


      2003-08-06 17:03:23,651 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException:
      java.lang.NullPointerException
      at org.jboss.cache.invalidation.InvalidationsTxGrouper.registerInvalidationSynchronization(InvalidationsTxGrouper.java:76)
      at org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor.invoke(EntityBeanCacheBatchInvalidatorInterceptor.java:106)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:328)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:56)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:174)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:273)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
      at org.jboss.ejb.plugins.LogInterceptor.invokeLogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:484)
      at org.jboss.ejb.Container.invoke(Container.java:700)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getRelatedEntityByFK(JDBCCMRFieldBridge.java:633)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getInstanceValue(JDBCCMRFieldBridge.java:572)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getValue(JDBCCMRFieldBridge.java:515)
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:124)
      at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      at mts.psp.campaign.entity.CampaignCMP$Proxy.getProduct()
      at mts.psp.campaign.entity.CampaignCMP.getCampaignValue(CampaignCMP.java:383)
      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.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1059)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95)
      at org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor.invoke(EntityBeanCacheBatchInvalidatorInterceptor.java:88)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:301)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:82)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:174)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:484)
      at org.jboss.ejb.Container.invoke(Container.java:700)
      at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
      at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

      at java.lang.Thread.run(Thread.java:536)
      2003-08-06 17:03:23,854 ERROR [org.jboss.ejb.BeanLock] negative lock reference count should never happen !

        • 1. Re: Jboss 3.2.2RC2 Distributed Cache Invalidation Issue
          Julien Dubois Newbie

          Hi,

          I'm having the same problem, and I found the cause. I posted an issue in the JBoss tacker :
          http://sourceforge.net/tracker/index.php?func=detail&aid=843675&group_id=22866&atid=376685

          HTH,

          Julien Dubois.

          • 2. Re: Jboss 3.2.2RC2 Distributed Cache Invalidation Issue
            Christopher Rued Newbie

            I can also verify that this bug exists when there is not transaction.
            InvalidationsTxGrouper seems to assume that tx cannot be null, even though
            EntityBeanCacheBatchInvalidatorInterceptor may pass it a null value (see like 106).

            19:05:13,249 ERROR [LogInterceptor] RuntimeException:
            java.lang.NullPointerException
            at org.jboss.cache.invalidation.InvalidationsTxGrouper.registerInvalidationSynchronization(InvalidationsTxGrouper.java:76)
            at org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor.invoke(EntityBeanCacheBatchInvalidatorInterceptor.java:106)
            at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:328)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
            at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:82)
            at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:174)
            at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
            at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:216)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
            at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
            at org.jboss.ejb.Container.invoke(Container.java:674)
            at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
            at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
            at $Proxy147.getXpdlPackage(Unknown Source)
            at org.obe.server.j2ee.repository.EJBProcessRepository.findWorkflowProcess(EJBProcessRepository.java:247)
            at org.obe.engine.WorkflowEngine.findWorkflow(WorkflowEngine.java:2892)
            at org.obe.engine.WorkflowEngine.startProcess(WorkflowEngine.java:625)
            at org.obe.engine.WorkflowEngine.startProcess(WorkflowEngine.java:612)
            at org.obe.server.j2ee.J2EEServerBean.startProcess(J2EEServerBean.java:187)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            [snip]...