DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Marco Schulze
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

java.lang.IndexOutOfBoundsException with query involving interface

Created: 13/Apr/10 07:41 PM   Updated: 15/Apr/10 07:12 PM   Resolved: 14/Apr/10 07:23 PM
Component/s: ORM
Affects Version/s: None
Fix Version/s: 2.1.0.m2

Forum Thread URL:,6062
Datastore: MySQL
Severity: Development

 Description  « Hide
*** Scenario ***

interface MyInterface { }

class A implements MyInterface {
  // some stuff

class B implements MyInterface {
  // some stuff

class Link {
  private MyInterface from;
  private MyInterface to;

  // some more stuff

Querying for all Link instances that point to a certain "from" cause an exception.

*** Exception ***
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
        at java.util.ArrayList.RangeCheck(
        at java.util.ArrayList.get(
        at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileRelationalExpression(AbstractExpr
        at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileOrAndExpression(AbstractExpressio
        at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.evaluate(AbstractExpressionEvaluator.jav
        at org.datanucleus.query.expression.Expression.evaluate(
        at org.datanucleus.query.expression.DyadicExpression.evaluate(
        at org.datanucleus.jdo.JDOQuery.executeWithMap(
        at org.datanucleus.test.Main$
        at org.datanucleus.test.Main.executeInTransaction(
        at org.datanucleus.test.Main.main(

*** Test ***

Andy Jefferson made changes - 14/Apr/10 05:39 AM
Field Original Value New Value
Affects Version/s 2.1.0.m2 [ 10912 ]
Andy Jefferson added a comment - 14/Apr/10 07:23 PM
Works for me with SVN trunk

Andy Jefferson made changes - 14/Apr/10 07:23 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.1.0.m2 [ 10912 ]
Resolution Fixed [ 1 ]
Marco Schulze added a comment - 15/Apr/10 07:12 PM
Thanks a lot for fixing this! Works here, too.

Marco Schulze made changes - 15/Apr/10 07:12 PM
Status Resolved [ 5 ] Closed [ 6 ]