[rules-users] Possible bug
Greg Barton
greg_barton at yahoo.com
Mon Jun 28 10:28:07 EDT 2010
That will not guarentee that the exception will not be thrown:
http://java.sun.com/javase/6/docs/api/java/util/ConcurrentModificationException.html
Single thread modification can throw it.
GreG
On Jun 28, 2010, at 8:34 AM, "PAYET, Manuel" <manuel.payet at capgemini.com> wrote:
You should insert
Collections.synchronizedMap(new HashMap());
Instead of new HashMap()
This error is a java error, not a drools one, it only means that two threads are, at the same time, accessing/modifying the same Map.
The reason for this depends of your project
-----Message d'origine-----
De : rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] De la part de Pavel Tavoda
Envoyé : lundi 28 juin 2010 15:29
À : Rules Users List
Objet : [rules-users] Possible bug
Hello,
we are using official 5.0 release and sometimes (very rarely) we get following error:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at org.drools.reteoo.ClassObjectTypeConf.getMatchingObjectTypes(ClassObjectTypeConf.java:171)
at org.drools.reteoo.ClassObjectTypeConf.getObjectTypeNodes(ClassObjectTypeConf.java:163)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:143)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
at org.drools.process.command.InsertObjectCommand.execute(InsertObjectCommand.java:22)
at org.drools.process.command.InsertObjectCommand.execute(InsertObjectCommand.java:7)
at org.drools.runtime.impl.BatchExecutionImpl.execute(BatchExecutionImpl.java:23)
at org.drools.runtime.impl.BatchExecutionImpl.execute(BatchExecutionImpl.java:9)
at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:225)
at org.fornax.cartridges.sculptor.framework.drools.DroolsAdvice.applyCompanyPolicy(DroolsAdvice.java:150)
We are using AspectJ advice for starting rule evaluation for every service call. Hope we are doing everything right in code. Full source code of advice can be found at:
http://fisheye3.atlassian.com/browse/fornax/trunk/cartridges/sculptor/fornax-cartridges-sculptor-framework/src/main/java/org/fornax/cartridges/sculptor/framework/drools/DroolsAdvice.java?r=6407
Regards
Pavel
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list