CDV ❯ Read Only Exception doesn't have improved error message
-
Bug
-
Status: Closed
-
1 Critical
-
Resolution: Fixed
-
-
-
hhuynh
-
Reporter: tgautier
-
January 22, 2008
-
0
-
Watchers: 0
-
October 02, 2008
-
April 08, 2008
Description
com.tc.object.util.ReadOnlyException:
*******************************************************************************
Current transaction with read-only access attempted to modify a shared object.
Please alter the locks section of your Terracotta configuration so that the methods involved in this transaction have read/write access.
Caused by Thread: main in VM(3)
Failed To Modify Field: Main.foo in Main \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
This error needs to have the format that NonPortable and UnlockedSharedExceptions have.
Comments
Alex Miller 2008-01-22
Taylor Gautier 2008-01-23
Run this app: http://www.terracotta.org/confluence/display/howto/Recipe?recipe=readlock
But add a member variable say int foo = 0. increment foo in the method “enterMonitor”
Fiona OShea 2008-03-18
Add more details…
Taylor Gautier 2008-04-05
Message should look like this:
com.tc.object.util.ReadOnlyException: ******************************************************************************* Attempt to write to a shared object inside the scope of a lock declared as a read lock. All writes to shared objects must be within the scope of one or more shared locks with write access 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 with write access.
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: Main \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
{ stack trace }
Taylor Gautier 2008-04-05
(please note the line breaks, would like this message to have hard line breaks where new lines occur in the description above)
Alex Miller 2008-04-08
Fixed message, retested on cookbook example:
com.tc.object.util.ReadOnlyException: ****************************************************************************** Attempt to write to a shared object inside the scope of a lock declared as a read lock. All writes to shared objects must be within the scope of one or more shared locks with write access 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 with write access.
For more information on this issue, please visit our Troubleshooting Guide at: http://terracotta.org/kit/troubleshooting
Caused by Thread: Thread-21 in VM(0)
Failed To Modify Field: Main.foo in Main \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
at com.tc.object.tx.ClientTransactionManagerImpl.makeReadOnlyException(ClientTransactionManagerImpl.java:748)
at com.tc.object.tx.ClientTransactionManagerImpl.fieldChanged(ClientTransactionManagerImpl.java:590)
at com.tc.object.TCObjectImpl.objectFieldChanged(TCObjectImpl.java:297)
at com.tc.object.TCObjectImpl.intFieldChanged(TCObjectImpl.java:337)
at Main.__tc_setfoo(Main.java)
at Main.__tc_wrapped_enterMonitor(Main.java:21)
at Main.enterMonitor(Main.java)
at Main.run(Main.java:16)
at java.lang.Thread.run(Thread.java:613)
Version? Sample app?