|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
An error at java.util.HashSet.removeHi All
I am getting this error 009-05-12 05:56:53,448 [pool-1-thread-2] ERROR com.tc.object.bytecode.Manager - Exception thrown 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-1-thread-2 in VM(1) Shared Object Type: java.util.HashSet 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:360) at com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:373) at com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:743) at com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:354) at java.util.HashSet.remove(HashSet.java) I have added <locks> <autolock auto-synchronized="true"> <method-expression>* java.util.HashSet.remove(..)</method-expression> <lock-level>write</lock-level> </autolock> </locks> to tc-config file in client - but doesn't help. Please guide me regards Vinu -- ........................................ <signature> <full-name> Vinu Varghese </full-name> <company-email> vinu@... </company-email> <company-website> www.x-minds.org </company-website> <big-words> Success always occurs in private, and failure in full view. </big-words> <company-name-big> \/ ._ _ o ._ _| _ /\ ~~ | | | | | | (_| _\ </company-name-big> </signature> _______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users |
|
|
Re: An error at java.util.HashSet.removeHi Vinu,
This error message is saying that you have a HashSet instance that is part of the clustered graph. Modifications (like a remove()) to a clustered object must be done in the scope of a clustered lock. That is, you must be in a synchronized block/method, the object you are synchronizing on must be clustered, and your configuration must specify that synchronized block as a write lock. You attempted to fix the issue by making locks in HashSet.remove() into clustered locks, but that method does not contain any synchronized blocks. You could also use auto-synchronized="true" to make the method synchronized but that would affect HashSet.remove() calls in the VM and probably isn't what you want. It's more likely that the code calling HashSet.remove() should have a synchronized block (maybe it already does?) and the method containing that synchronized block should be configured as a write lock. Hope that helps. The link there might also be of use: http://www.terracotta.org/usoe Alex ----- Original Message ----- From: "Vinu Varghese" <vinu@...> To: tc-users@... Sent: Tuesday, May 12, 2009 5:31:19 AM GMT -06:00 US/Canada Central Subject: [tc-users] An error at java.util.HashSet.remove Hi All I am getting this error 009-05-12 05:56:53,448 [pool-1-thread-2] ERROR com.tc.object.bytecode.Manager - Exception thrown 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-1-thread-2 in VM(1) Shared Object Type: java.util.HashSet 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:360) at com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:373) at com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:743) at com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:354) at java.util.HashSet.remove(HashSet.java) I have added <locks> <autolock auto-synchronized="true"> <method-expression>* java.util.HashSet.remove(..)</method-expression> <lock-level>write</lock-level> </autolock> </locks> to tc-config file in client - but doesn't help. Please guide me regards Vinu -- ........................................ <signature> <full-name> Vinu Varghese </full-name> <company-email> vinu@... </company-email> <company-website> www.x-minds.org </company-website> <big-words> Success always occurs in private, and failure in full view. </big-words> <company-name-big> \/ ._ _ o ._ _| _ /\ ~~ | | | | | | (_| _\ </company-name-big> </signature> _______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users _______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users |
|
|
Re: An error at java.util.HashSet.removeMore specifically, if you aren't already providing a lock in regular Java around your HashSet remove() call you are using HashSet incorrectly - unless you have a single threaded program (which is not usually the case with Java). See here: http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashSet.html ----- Original Message ----- From: "Alex Miller" <amiller@...> To: tc-users@... Sent: Tuesday, May 12, 2009 6:42:37 AM GMT -08:00 US/Canada Pacific Subject: Re: [tc-users] An error at java.util.HashSet.remove Hi Vinu, This error message is saying that you have a HashSet instance that is part of the clustered graph. Modifications (like a remove()) to a clustered object must be done in the scope of a clustered lock. That is, you must be in a synchronized block/method, the object you are synchronizing on must be clustered, and your configuration must specify that synchronized block as a write lock. You attempted to fix the issue by making locks in HashSet.remove() into clustered locks, but that method does not contain any synchronized blocks. You could also use auto-synchronized="true" to make the method synchronized but that would affect HashSet.remove() calls in the VM and probably isn't what you want. It's more likely that the code calling HashSet.remove() should have a synchronized block (maybe it already does?) and the method containing that synchronized block should be configured as a write lock. Hope that helps. The link there might also be of use: http://www.terracotta.org/usoe Alex ----- Original Message ----- From: "Vinu Varghese" <vinu@...> To: tc-users@... Sent: Tuesday, May 12, 2009 5:31:19 AM GMT -06:00 US/Canada Central Subject: [tc-users] An error at java.util.HashSet.remove Hi All I am getting this error 009-05-12 05:56:53,448 [pool-1-thread-2] ERROR com.tc.object.bytecode.Manager - Exception thrown 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-1-thread-2 in VM(1) Shared Object Type: java.util.HashSet 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:360) at com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:373) at com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:743) at com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:354) at java.util.HashSet.remove(HashSet.java) I have added <locks> <autolock auto-synchronized="true"> <method-expression>* java.util.HashSet.remove(..)</method-expression> <lock-level>write</lock-level> </autolock> </locks> to tc-config file in client - but doesn't help. Please guide me regards Vinu -- ........................................ <signature> <full-name> Vinu Varghese </full-name> <company-email> vinu@... </company-email> <company-website> www.x-minds.org </company-website> <big-words> Success always occurs in private, and failure in full view. </big-words> <company-name-big> \/ ._ _ o ._ _| _ /\ ~~ | | | | | | (_| _\ </company-name-big> </signature> _______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users _______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users _______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users |
|
|
Re: An error at java.util.HashSet.removeThanks alot ........................................ <signature> <full-name> Vinu Varghese </full-name> <company-email> vinu@... </company-email> <company-website> www.x-minds.org </company-website> <big-words> Success always occurs in private, and failure in full view. </big-words> <company-name-big> \/ ._ _ o ._ _| _ /\ ~~ | | | | | | (_| _\ </company-name-big> </signature> Taylor Gautier wrote:
_______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users |
| Free embeddable forum powered by Nabble | Forum Help |