Uploaded image for project: 'JBoss Cache'
  1. JBoss Cache
  2. JBCACHE-927

Repeated remove and put under optimistic locking produces exception

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0.ALPHA1, 2.0.0.BETA1, 1.4.1.SP1, 1.4.1.SP2
    • Fix Version/s: 2.0.0.BETA2, 2.0.0.GA, 1.4.1.SP3
    • Component/s: None
    • Labels:
      None
    • Estimated Difficulty:
      High

      Description

      Manik, I am not assigning this Jira to any release. It is your call to fix it either in ALPHA2 or BETA1. Basically, my o.jo.c.pojo.optimistic.CachedListTest failure can be attributed to this test case:

      public void testFailure1() throws Exception

      { log.info("testFailure1() ...."); UserTransaction tx = getTransaction(); org.jboss.cache.Fqn f = new org.jboss.cache.Fqn("/person/test2"); tx.begin(); cache.getCache().put(f, "test", "test"); tx.commit(); tx.begin(); cache.getCache().removeNode(f); cache.getCache().put(f, "test", "test"); tx.commit(); }

      For optimistic locking and it produces the following error:

      org.jboss.cache.CacheException: Unable to set node version for //person/test2, node is null.
      at org.jboss.cache.interceptors.OptimisticNodeInterceptor.invoke(OptimisticNodeInterceptor.java:129)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
      at org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor.invoke(OptimisticCreateIfNotExistsInterceptor.java:64)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
      at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:74)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
      at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:124)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
      at org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:22)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
      at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:288)
      at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:126)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
      at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:141)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
      at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:66)
      at org.jboss.cache.CacheImpl.invokeMethod(CacheImpl.java:3758)
      at org.jboss.cache.CacheImpl.put(CacheImpl.java:1558)
      at org.jboss.cache.pojo.optimistic.LocalTxTest.testFailure1(LocalTxTest.java:151)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

      If you don't fix it in Alpha2, we will need to exclude my test case temporarily in CC then.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                galder.zamarreno Galder ZamarreƱo
                Reporter:
                ben.wang Ben Wang (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: