[
http://jira.jboss.com/jira/browse/JBRULES-904?page=comments#action_12366950 ]
Mark Proctor commented on JBRULES-904:
--------------------------------------
took me a while to remove all the threading from the system and DataSource stuff. so it
all ran in one method :) But once that was done I inserted the minimal information to make
it occur. Once I saw why it was happening, it was quick to fix, it wasn't iterating
the parent and child linkedlists in the toArray. So there was two bugs for this bug, but
this should hopefully be fixed now :)
ArrayIndexOutOfBoundsException in
org.drools.util.TupleIndexHashTable.toArray
-----------------------------------------------------------------------------
Key: JBRULES-904
URL:
http://jira.jboss.com/jira/browse/JBRULES-904
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.0.MR3
Environment: Java 1.5
Reporter: Dirk Bergstrom
Assigned To: Edson Tirelli
Fix For: 4.0.0.MR4
Attachments: real-testcase.tgz, testcase.tar.gz
When asserting a particular object type, I get the following stacktrace:
java.lang.ArrayIndexOutOfBoundsException: 26
at org.drools.util.TupleIndexHashTable.toArray(TupleIndexHashTable.java:178)
at org.drools.reteoo.CollectNode.assertObject(CollectNode.java:212)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:183)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:201)
at
org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:70)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:766)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:578)
at
net.juniper.dash.data.DataSource.reconcileAssertedRecords(DataSource.java:250)
at net.juniper.dash.data.DataSource.populateRecords(DataSource.java:193)
at net.juniper.dash.Updater$DataSourceProcessor.work(Updater.java:177)
at net.juniper.dash.Refresher.run(Refresher.java:69)
I added some println() statements, and it's not an off-by-one error, it's
something more serious. I changed the allocated size of the array to (this.size * 10),
and it *still* tried to overfill the array. The hashtable had 26 entries, but it tried to
add 261, and counting.
--
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