[jboss-user] [JBossCache] - Re: NPE when using optimistic locking with JbossCache 1.4.0.

rkrol do-not-reply at jboss.com
Tue Jan 9 12:39:34 EST 2007


To return on my problem with org.hibernate.cache.OptimisticTreeCache$DataVersionAdapter and org.hibernate.cache.OptimisticTreeCache$NonLockingDataVersion on delete operation...
Everthing is ok if I modify the class org.jboss.cache.interceptors.OptimisticValidatorInterceptor to delete an if statement that generate the DataVersioningException : if(!realNode.getVersion().getClass().equals(workspaceNode.getVersion().getClass())) line 142.

The problem is that Hibernate considers that the DataVersion can change from a type to an other (NonLockingDataVersion to DataVersionAdapter), but it's not the idea on JBC.
So my question : Is it important to have the same type before and after the update of the node ? Does the "newerThan(DataVersion)" method not supposed to manage the different type to be able to compare him to an other kind of DataVersion ?

Rudy KROL

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999568



More information about the jboss-user mailing list