Yep, I meant explicit versioning, sorry about that...

What seems to happen (at least one case when this has occurred) is that a node 
gets added, causing an update of its father node. On that point (the put() ) 
the WorkspaceNode receives the correct version and the 'versioningImplicit' 
flag is correctly set to false.
However, on commit(), the same node is fetched, and while the version object 
remains the same (correct) one, the flag is reset to 'true'.

One simple example for a specific operation that causes this is adding a child 
node using Node.addChild() (to a node which happens to reside two levels under 
the root node). When working w/o an open transaction (e.g., in auto-transaction 
per operation mode), this operation fails with the following stack trace:

  | 2007-01-17 09:25:53,579 1728  WARN  
[org.jboss.cache.interceptors.TxInterceptor] (main:) Commit failed.  Clearing 
stale locks.
  | 2007-01-17 09:25:53,582 1731  ERROR 
[org.jboss.cache.interceptors.OrderedSynchronizationHandler] (main:) failed 
calling afterCompletion() on 
TxInterceptor.LocalSynchronizationHandler(gtx=GlobalTransaction:<null>:9, 
[EMAIL PROTECTED])
  | java.lang.RuntimeException: Commit failed.
  |     at 
org.jboss.cache.interceptors.TxInterceptor.runCommitPhase(TxInterceptor.java:712)
  |     at 
org.jboss.cache.interceptors.TxInterceptor$RemoteSynchronizationHandler.afterCompletion(TxInterceptor.java:996)
  |     at 
org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.afterCompletion(TxInterceptor.java:1092)
  |     at 
org.jboss.cache.interceptors.OrderedSynchronizationHandler.afterCompletion(OrderedSynchronizationHandler.java:82)
  |     at 
org.jboss.cache.transaction.DummyTransaction.notifyAfterCompletion(DummyTransaction.java:285)
  |     at 
org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:75)
  |     at 
org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:78)
  |     at 
org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:292)
  |     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:151)
  |     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:3750)
  |     at org.jboss.cache.CacheImpl.put(CacheImpl.java:1521)
  |     at org.jboss.cache.UnversionedNode.addChild(UnversionedNode.java:372)
  |     at 
com.mazeppa.yph.tests.CustomVersionTest.phaseIn(CustomVersionTest.java:31)
  | Caused by: java.lang.ClassCastException: 
com.mazeppa.yph.tests.CustomVersion cannot be cast to 
org.jboss.cache.optimistic.DefaultDataVersion
  |     at 
org.jboss.cache.interceptors.OptimisticValidatorInterceptor.commit(OptimisticValidatorInterceptor.java:212)
  |     at 
org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:68)
  |     at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
  |     at 
org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:105)
  |     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.handleCommitRollback(TxInterceptor.java:655)
  |     at 
org.jboss.cache.interceptors.TxInterceptor.runCommitPhase(TxInterceptor.java:698)
  |     ... 35 more
  | 2007-01-17 09:25:53,588 1737  WARN  
[org.jboss.cache.interceptors.TxInterceptor] (main:) Commit failed.  Clearing 
stale locks.
  | 2007-01-17 09:25:53,589 1738  ERROR 
[org.jboss.cache.interceptors.OrderedSynchronizationHandler] (main:) failed 
calling afterCompletion() on 
TxInterceptor.LocalSynchronizationHandler(gtx=GlobalTransaction:<null>:11, 
[EMAIL PROTECTED])
  | java.lang.RuntimeException: Commit failed.
  |     at 
org.jboss.cache.interceptors.TxInterceptor.runCommitPhase(TxInterceptor.java:712)
  |     at 
org.jboss.cache.interceptors.TxInterceptor$RemoteSynchronizationHandler.afterCompletion(TxInterceptor.java:996)
  |     at 
org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.afterCompletion(TxInterceptor.java:1092)
  |     at 
org.jboss.cache.interceptors.OrderedSynchronizationHandler.afterCompletion(OrderedSynchronizationHandler.java:82)
  |     at 
org.jboss.cache.transaction.DummyTransaction.notifyAfterCompletion(DummyTransaction.java:285)
  |     at 
org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:75)
  |     at 
org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:78)
  |     at 
org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:292)
  |     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:151)
  |     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:3750)
  |     at org.jboss.cache.CacheImpl.put(CacheImpl.java:1521)
  |     at org.jboss.cache.UnversionedNode.addChild(UnversionedNode.java:372)
  |     at 
com.mazeppa.yph.tests.CustomVersionTest.phaseIn(CustomVersionTest.java:31)
  | Caused by: java.lang.ClassCastException: 
com.mazeppa.yph.tests.CustomVersion cannot be cast to 
org.jboss.cache.optimistic.DefaultDataVersion
  |     at 
org.jboss.cache.interceptors.OptimisticValidatorInterceptor.commit(OptimisticValidatorInterceptor.java:212)
  |     at 
org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:68)
  |     at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
  |     at 
org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:105)
  |     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.handleCommitRollback(TxInterceptor.java:655)
  |     at 
org.jboss.cache.interceptors.TxInterceptor.runCommitPhase(TxInterceptor.java:698)
  |     ... 35 more
  | 
  | 

However, we've observed this on other cases as well, cases which involve 
transactions and are more difficult to reproduce.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002658#4002658

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002658
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to