com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: Thread-14 in VM(0) *******************************************************************************

Terracotta | horkhe | 8 years ago
  1. 0

    IllegalMonitorStateException but everything seems synchronized

    Terracotta | 8 years ago | horkhe
    com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: Thread-14 in VM(0) *******************************************************************************
  2. 0

    source: http://forums.terracotta.org/forums/posts/list/723.page If one takes a clustered ehcache CacheManager instance and try to register it with an MBeanServer, you'll get an UnlockedSharedObjectException. Making a call like this (passing a shared cacheManager) should produce the issue net.sf.ehcache.management.ManagementService.registerMBeans(cacheManager, ManagementFactory.getPlatformMBeanServer(), true, true, true, true); It looks like an attempt was made to make this transient since "net.sf.ehcache.CacheManager.cacheManagerEventListener" is declared transient in terracotta.xml in both the 1.2.4 and 1.3.0 modules. Unfortunately that field does not exist. Correcting the field name will just lead to an NPE on other nodes. This is the exception text: com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: main in VM(0) Shared Object Type: java.util.HashSet ******************************************************************************* at com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:278) at com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:291) at com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:662) at com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:364) at java.util.HashSet.add(HashSet.java) at net.sf.ehcache.event.CacheManagerEventListenerRegistry.registerListener(CacheManagerEventListenerRegistry.java:65) at net.sf.ehcache.management.ManagementService.init(ManagementService.java:137) at net.sf.ehcache.management.ManagementService.registerMBeans(ManagementService.java:110) at Foo.main(Foo.java:11)

    Terracotta Project Issue Tracker | 9 years ago | Tim Eck
    com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: main in VM(0) Shared Object Type: java.util.HashSet *******************************************************************************
  3. 0

    source: http://forums.terracotta.org/forums/posts/list/723.page If one takes a clustered ehcache CacheManager instance and try to register it with an MBeanServer, you'll get an UnlockedSharedObjectException. Making a call like this (passing a shared cacheManager) should produce the issue net.sf.ehcache.management.ManagementService.registerMBeans(cacheManager, ManagementFactory.getPlatformMBeanServer(), true, true, true, true); It looks like an attempt was made to make this transient since "net.sf.ehcache.CacheManager.cacheManagerEventListener" is declared transient in terracotta.xml in both the 1.2.4 and 1.3.0 modules. Unfortunately that field does not exist. Correcting the field name will just lead to an NPE on other nodes. This is the exception text: com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: main in VM(0) Shared Object Type: java.util.HashSet ******************************************************************************* at com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:278) at com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:291) at com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:662) at com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:364) at java.util.HashSet.add(HashSet.java) at net.sf.ehcache.event.CacheManagerEventListenerRegistry.registerListener(CacheManagerEventListenerRegistry.java:65) at net.sf.ehcache.management.ManagementService.init(ManagementService.java:137) at net.sf.ehcache.management.ManagementService.registerMBeans(ManagementService.java:110) at Foo.main(Foo.java:11)

    Terracotta Project Issue Tracker | 9 years ago | Tim Eck
    com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: main in VM(0) Shared Object Type: java.util.HashSet *******************************************************************************
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    source: http://forums.terracotta.org/forums/posts/list/723.page If one takes a clustered ehcache CacheManager instance and try to register it with an MBeanServer, you'll get an UnlockedSharedObjectException. Making a call like this (passing a shared cacheManager) should produce the issue net.sf.ehcache.management.ManagementService.registerMBeans(cacheManager, ManagementFactory.getPlatformMBeanServer(), true, true, true, true); It looks like an attempt was made to make this transient since "net.sf.ehcache.CacheManager.cacheManagerEventListener" is declared transient in terracotta.xml in both the 1.2.4 and 1.3.0 modules. Unfortunately that field does not exist. Correcting the field name will just lead to an NPE on other nodes. This is the exception text: com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: main in VM(0) Shared Object Type: java.util.HashSet ******************************************************************************* at com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:278) at com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:291) at com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:662) at com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:364) at java.util.HashSet.add(HashSet.java) at net.sf.ehcache.event.CacheManagerEventListenerRegistry.registerListener(CacheManagerEventListenerRegistry.java:65) at net.sf.ehcache.management.ManagementService.init(ManagementService.java:137) at net.sf.ehcache.management.ManagementService.registerMBeans(ManagementService.java:110) at Foo.main(Foo.java:11)

    Terracotta Project Issue Tracker | 9 years ago | Tim Eck
    com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: main in VM(0) Shared Object Type: java.util.HashSet *******************************************************************************
  6. 0

    unexpected handling of volatile

    Terracotta | 8 years ago | hmak
    com.tc.object.tx.UnlockedSharedObjectException: ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: main in VM(3) Shared Object Type: TCVolatile *******************************************************************************

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.tc.object.tx.UnlockedSharedObjectException

      ******************************************************************************* Attempt to access a shared object outside the scope of a shared lock. All access to shared objects must be within the scope of one or more shared locks defined in your Terracotta configuration. Please alter the locks section of your Terracotta configuration so that this access is auto-locked or protected by a named lock. For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting Caused by Thread: Thread-14 in VM(0) *******************************************************************************

      at com.tc.object.tx.ClientTransactionManagerImpl.getTransaction()
    2. com.tc.object
      ManagerUtil.monitorExit
      1. com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:303)
      2. com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:286)
      3. com.tc.object.tx.ClientTransactionManagerImpl.commit(ClientTransactionManagerImpl.java:355)
      4. com.tc.object.bytecode.ManagerImpl.monitorExit(ManagerImpl.java:520)
      5. com.tc.object.bytecode.ManagerUtil.monitorExit(ManagerUtil.java:478)
      5 frames
    3. com.synapsense.avrorati
      Simulator$1.run
      1. com.synapsense.avrorati.sync.Simulator.workerThreadLogic(Simulator.java)
      2. com.synapsense.avrorati.sync.Simulator.access$0(Simulator.java:147)
      3. com.synapsense.avrorati.sync.Simulator$1.run(Simulator.java:65)
      3 frames
    4. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame