[rules-users] 5.1.1: ArrayIndexOutOfBoundsException in org.drools.core.util.AbstractHashTable

Lubos lpechac at pi-ag.com
Thu Oct 28 03:53:44 EDT 2010


Exception occures at:
org.drools.core.util.AbstractHashTable$HashTableIterator.next(AbstractHashTable.java:317)
in Drools 5.1.1 when calling insert() on just created
StatefulKnowledgeSession.

I found similar issues reported for LeftTupleIndexHashTable, it had to do
with initializing row to -1 instead of 0 or something similar. I see that
fixed in Left/RightTupleIndexHashTable but it seems to me like it is still
present in AbstractHashTable.

The bug occures randomly (inserting the same data), usualy under load. The
index is either -1 or too high. I create multiple sessions in threads from
one KnowledgeBase, sessions are not shared.

Stack trace I got is:
java.lang.ArrayIndexOutOfBoundsException: 16
                at
org.drools.core.util.AbstractHashTable$HashTableIterator.next(AbstractHashTable.java:317)
                at
org.drools.reteoo.EntryPointNode.updateSink(EntryPointNode.java:323)
                at
org.drools.reteoo.ObjectTypeNode.attach(ObjectTypeNode.java:303)
                at
org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:257)
                at
org.drools.reteoo.ClassObjectTypeConf.<init>(ClassObjectTypeConf.java:92)
                at
org.drools.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:68)
                at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:981)
                at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:917)
                at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:251)

I am not sure if this post belongs here, sorry if not.
Thanks for help/suggestions
Lubos
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/5-1-1-ArrayIndexOutOfBoundsException-in-org-drools-core-util-AbstractHashTable-tp1784932p1784932.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list