[jboss-user] [JBossCache] - Strange ClassCastException in OptimisticCreateIfNotExistsInt
spennec
do-not-reply at jboss.com
Fri Nov 2 05:45:01 EDT 2007
Hi all,
I'm experiencing a very strange problem, and would like some insight on what's really happening.
I am using TreeCache 2.0.0, under Weblogic 9.2.2. The app is deployed in a cluster with two members. The cache is configured with REPLY_ASYNC mode, and Optimistic Node Locking Scheme.
At some point, I would like to refresh completely the data that is present in a given node. Inside a transaction, I remove two data nodes and put new values with updated data. The data is pretty big. It is a SortedSet that holds around 140'000 value objects, each containing a few Strings.
When the transaction commit, an error is logged by CacheImpl, with the following stacktrace:
| java.lang.ClassCastException: com.myCompany.MyCachedValueObject
| at org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor.invoke(OptimisticCreateIfNotExistsInterceptor.java:57)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:67)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:99)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:137)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:511)
| at org.jboss.cache.interceptors.TxInterceptor.handleOptimisticPrepare(TxInterceptor.java:373)
| at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:250)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:100)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:123)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:62)
| at org.jboss.cache.CacheImpl.invokeMethod(CacheImpl.java:3939)
| at org.jboss.cache.CacheImpl._replicate(CacheImpl.java:2853)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
| at org.jboss.cache.interceptors.CallInterceptor.invoke(CallInterceptor.java:49)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.OptimisticNodeInterceptor.invoke(OptimisticNodeInterceptor.java:161)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
|
In the invoke method of OptimisticCreateIfNotExistsInterceptor, the code tries to cast an object into a FQN class.
The message accompagnying the log statement is as follows:
Message = replication failure with method_call MethodName: optimisticPrepare; MethodIdInteger: 18; Args:
(GlobalTransaction:<10.23.65.28:4691>:4, [MethodName: _remove; MethodIdInteger: 40; Args:
(GlobalTransaction:<10.23.65.28:4691>:4, /Node1/SubNode/SubSubNode1, true, Ver=2), MethodName: _remove;
MethodIdInteger: 40; Args: (GlobalTransaction:<10.23.65.28:4691>:4, /Node1/SubNode/SubSubNode2, true, Ver=2),
MethodName: _put; MethodIdInteger: 39; Args: (GlobalTransaction:<10.23.65.28:4691>:4,
/Node1/SubNode/SubSubNode1, Node_Key, {Whole_ToString()_Value_Of_SortedSet}
Could anybody help me out with this issue?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101192#4101192
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101192
More information about the jboss-user
mailing list