[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1157) threads using one ruleset throws exception
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Wed Sep 5 21:21:11 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1157?page=all ]
Mark Proctor closed JBRULES-1157.
---------------------------------
Fix Version/s: 4.0.2
Resolution: Done
Noticed this method is not thread safe:
org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode
So now it syncrhoniseson rulebase.pkgs, which is what other dynamic rule addition stuff does. Let me know if this doesn't fix the problem.
> threads using one ruleset throws exception
> ------------------------------------------
>
> Key: JBRULES-1157
> URL: http://jira.jboss.com/jira/browse/JBRULES-1157
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.1
> Environment: Windows XP, Eclipse 3.2
> Reporter: Markus Fromme
> Assigned To: Mark Proctor
> Priority: Critical
> Fix For: 4.0.2
>
>
> one ruleset for two threads using their own statefulsession and data results in this error:
> Exception in thread "Thread-1" java.lang.ArrayIndexOutOfBoundsException: 17
> at org.drools.util.AbstractHashTable$HashTableIterator.next(AbstractHashTable.java:257)
> at org.drools.util.AbstractHashTable$HashTableIterator.next(AbstractHashTable.java:262)
> at org.drools.util.ObjectHashSet.toArray(ObjectHashSet.java:130)
> at org.drools.common.AbstractRuleBase.getWorkingMemories(AbstractRuleBase.java:605)
> at org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:157)
> at org.drools.reteoo.Rete$ClassObjectTypeConf.<init>(Rete.java:418)
> at org.drools.reteoo.Rete.assertObject(Rete.java:153)
> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
> at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:164)
> at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1260)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:826)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:627)
> at eu.cewe.drools.Client.run(Client.java:22)
> Exception in thread "Thread-0" java.lang.NullPointerException
> at org.drools.reteoo.ObjectTypeNode.attach(ObjectTypeNode.java:220)
> at org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:158)
> at org.drools.reteoo.Rete$ClassObjectTypeConf.<init>(Rete.java:418)
> at org.drools.reteoo.Rete.assertObject(Rete.java:153)
> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
> at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:164)
> at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1260)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:826)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:627)
> at eu.cewe.drools.Client.run(Client.java:22)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list