2 Replies Latest reply on Feb 15, 2002 2:56 AM by Carlo de Wolf

    Synchronization of the entity cache

    Carlo de Wolf Master

      I'm running Jboss 2.2.2 for some time now. Recently traffic has increased after which I started to get a lot of the following exceptions. I looked through the source of 2.2.2 and 2.4.3 and it looks like the entity cache is not thread safe (enough). Can anybody confirm or deny this?

      TRANSACTION ROLLBACK EXCEPTION:null; nested exception is: javax.ejb.EJBException
      java.lang.IllegalArgumentException: Requesting an object using a null key
      at org.jboss.util.LRUCachePolicy.peek(LRUCachePolicy.java:133)
      at org.jboss.ejb.plugins.AbstractInstanceCache.release(AbstractInstanceCache.java:222)
      at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy.ageOut(LRUEnterpriseContextCachePolicy.java:234)
      at org.jboss.util.LRUCachePolicy$LRUList.demote(LRUCachePolicy.java:337)
      at org.jboss.util.LRUCachePolicy.insert(LRUCachePolicy.java:153)
      at org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCache.java:200)
      at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:165)
      at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:87)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:164)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:436)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212)
      at $Proxy128.create(Unknown Source)
      at com. .ejbCreate( .java:49)

      [Container factory] java.lang.IllegalStateException: Cache synchronization bug
      [Container factory] at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.execute(LRUEnterpriseContextCachePolicy.java:384)
      [Container factory] at org.jboss.util.TimerQueue$TimerTaskLoop.run(TimerQueue.java:164)
      [Container factory] at java.lang.Thread.run(Thread.java:484)

      [Container factory] java.lang.IllegalStateException: Attempt to put a new cache entry on a full cache
      [Container factory] at org.jboss.util.LRUCachePolicy$LRUList.promote(LRUCachePolicy.java:295)
      [Container factory] at org.jboss.util.LRUCachePolicy.insert(LRUCachePolicy.java:155)
      [Container factory] at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java:648)
      [Container factory] at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:199)
      [Container factory] at java.lang.Thread.run(Thread.java:484)