[jboss-user] [JBossCache] - Re: Problems about updating an ArrayList in replicated TreeC
legolas
do-not-reply at jboss.com
Thu Jul 20 08:44:22 EDT 2006
I think it is a similar problem, so not exactly the same.
I have a couple of pojo's inserted in Lists, these lists are added to the cache.
One of these pojo's have a state implemented using the GoF state pattern, hence as pojo's theirselves.
Now when I change the state into a different state using
state = bindingFileState;
I get the following stack:
java.lang.RuntimeException: PojoCache.putObject(): fqn: /product/java/jboss/AMF/BindingManager/BindingFiles/0/state
| at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:478)
| at org.jboss.cache.aop.CacheInterceptor.invoke(CacheInterceptor.java:115)
| at org.jboss.aop.joinpoint.FieldWriteInvocation.invokeNext(FieldWriteInvocation.java:51)
| at org.epo.product.jboss.nodeagent.bindingmanager.BindingFile.state_w_$aop(BindingFile.java)
| at org.epo.product.jboss.nodeagent.bindingmanager.BindingFile.setState(BindingFile.java:42)
| at org.epo.product.jboss.nodeagent.bindingmanager.ApplicationPackage.releaseBindingfile(ApplicationPackage.java:143)
| at org.epo.product.jboss.nodeagent.bindingmanager.BindingManager.releaseBindingFile(BindingManager.java:296)
| at org.epo.product.jboss.nodeagent.bindingmanager.BindingManagerTest.testReleaseBindingFile(BindingManagerTest.java:239)
| 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 junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: java.lang.IllegalStateException: AOPInstance.incrementRefCount(): source fqn: /product/java/jboss/AMF/BindingManager/BindingFiles/0/state/appPackage is already present.
| at org.jboss.cache.aop.AOPInstance.incrementRefCount(AOPInstance.java:92)
| at org.jboss.cache.aop.InternalDelegate.incrementRefCount(InternalDelegate.java:98)
| at org.jboss.cache.aop.ObjectGraphHandler.incrementRefCount(ObjectGraphHandler.java:212)
| at org.jboss.cache.aop.ObjectGraphHandler.setupRefCounting(ObjectGraphHandler.java:192)
| at org.jboss.cache.aop.ObjectGraphHandler.objectGraphPut(ObjectGraphHandler.java:88)
| at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:197)
| at org.jboss.cache.aop.TreeCacheAopDelegate._regularPutObject(TreeCacheAopDelegate.java:462)
| at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:202)
| at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:731)
| at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:462)
| ... 22 more
|
|
I have changed my code to
| if (!state.equals(bindingFileState)) {
| state = bindingFileState;
| } else {
| System.out.println("It's equal");
| }
| Which circumvents the problem, but I expected that an assignment, whether or not with the same object would not case this stack trace.
Kind regards,
Marcel Dullaart
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959548#3959548
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959548
More information about the jboss-user
mailing list