[jboss-jira] [JBoss JIRA] Created: (JBRULES-904) ArrayIndexOutOfBoundsException in org.drools.util.TupleIndexHashTable.toArray

Dirk Bergstrom (JIRA) jira-events at lists.jboss.org
Mon Jun 4 22:54:08 EDT 2007


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: Mark Proctor


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

        



More information about the jboss-jira mailing list