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 ***

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 14/Apr/10 07:23 PM
Works for me with SVN trunk

Marco Schulze added a comment - 15/Apr/10 07:12 PM
Thanks a lot for fixing this! Works here, too.