[jboss-user] [JBossCache] - Threading Bug in PojoCache?

vincent.marquez do-not-reply at jboss.com
Mon Apr 23 19:31:57 EDT 2007


I have strong reason to suspect a bug in jbossCache which can result in an exception being thrown when multiple threads are dealing with an object.  I discovered this when I was adding a pojo to a cached/advised ArrayList, and at the same time in another thread reading data from that pojo. 

The exception being thrown:

org.jboss.cache.pojo.PojoCacheException: PojoCacheDelegate.getObjectInternal(): null PojoInstance for fqn: /__JBossInternal__/cachedVars/class JoinPoint_w_clients_4clients/_ID_/a232u-bqwm2c-f0vhanwn-1-f0vhb667-h
	at org.jboss.cache.pojo.impl.PojoCacheDelegate.getObjectInternal(PojoCacheDelegate.java:341)
	at org.jboss.cache.pojo.impl.PojoCacheDelegate.getObject(PojoCacheDelegate.java:109)
	at org.jboss.cache.pojo.impl.PojoCacheImpl.getObject(PojoCacheImpl.java:203)
	at org.jboss.cache.pojo.interceptors.dynamic.CacheFieldInterceptor.invoke(CacheFieldInterceptor.java:165)
	at JoinPoint_r_user_48.invokeNext(JoinPoint_r_user_48.java)
	at JoinPoint_r_user_48.invokeJoinpoint(JoinPoint_r_user_48.java)
	at com.deltel.dtaf.core.services.network.test.irc.Client$ClientAdvisor.Client$ClientAdvisor$user_r_$aop(Client$ClientAdvisor.java)
	at com.deltel.dtaf.core.services.network.test.irc.Client$ClientInstanceAdvisor.Client$ClientAdvisor$user_r_$aop(Client$ClientInstanceAdvisor.java)
	at com.deltel.dtaf.core.services.network.test.irc.Client.user_r_$aop(Client.java)
	at com.deltel.dtaf.core.services.network.test.irc.Client.processData(Client.java:111)
	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 com.deltel.event.flex.FlexSignal.com$deltel$event$flex$FlexSignal$invokeMethod$aop(FlexSignal.java:204)
	at com.deltel.event.flex.FlexSignal$FlexSignalAdvisor.invokeMethod6497039208490023269(FlexSignal$FlexSignalAdvisor.java)
	at com.deltel.event.flex.FlexSignal.invokeMethod(FlexSignal.java)
	at com.deltel.dtaf.api.event.EventSignal.syncExecuteMatch(EventSignal.java:51)
	at com.deltel.dtaf.core.as.event.manager.EventProcessor.fireEvent(EventProcessor.java:64)
	at com.deltel.dtaf.core.as.event.manager.EventProcessor.run(EventProcessor.java:46)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Thread.java:595)
 

I've done some research, and the problem seems like it might be caused by the fact that the AdvisedPojoHandler object adds a CachedFieldInterceptor to the pojo, before it actually adds the pojo to the Cache.   This is a problem beacause CachedFieldInterceptor tries to pull field information out of the cache for a  FieldReadInvocation.   

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

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



More information about the jboss-user mailing list