com.tc.object.tx.UnlockedSharedObjectException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Re:Hashtable UnlockedSharedObjectException
    via by dondragon2,
  • 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)
    via by Tim Eck,
  • Lock problem
    via by safarje,
  • UnlockedSharedObjectException problem
    via by sirode,
  • How can I resolve this issue?
    via by ancong20,
  • 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)
    via by Tim Eck,
  • Re:Troubleshooting: Leaking Locks
    via by fuzy,
    • 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. Caused by Thread: pool-3-thread-1 in VM(0) Shared Object Type: java.util.Hashtable The cause may be one or more of the following: * Terracotta locking was not configured for the shared code. * The code itself does not have synchronization that Terracotta can use as a boundary. * The class doing the locking must be included for instrumentation. * The object was first locked, then shared. For more information on how to solve this issue, see: http://www.terracotta.org/usoe ********************************************************************* at com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:365) at com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:378) at com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:755) at com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:397) at java.util.Hashtable.put(Hashtable.java) at com.gcomp.common.api.MessageObject.setMessageString(MessageObject.java:40) at com.gcomp.server.process.PromptNode.execute(PromptNode.java:60) at com.gcomp.server.executors.NodeExecutor.transition(NodeExecutor.java:51) at com.gcomp.server.executors.NodeExecutor.transition(NodeExecutor.java:81) at com.gcomp.server.executors.NodeExecutor.transition(NodeExecutor.java:81) at com.gcomp.server.executors.NodeExecutor.processNode(NodeExecutor.java:43) at com.gcomp.server.executors.ProcessExecutor.run(ProcessExecutor.java:98) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
    No Bugmate found.