You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Daryl Stultz (JIRA)" <ji...@apache.org> on 2009/12/10 19:34:18 UTC

[jira] Created: (OPENJPA-1424) Out of bounds exception using fetch plan

Out of bounds exception using fetch plan
----------------------------------------

                 Key: OPENJPA-1424
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1424
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.2.1
         Environment: Mac OSX, Java 1.5, Tomcat 5, PostgreSQL 8.4
            Reporter: Daryl Stultz


Hello, I'm getting the following:

java.lang.ArrayIndexOutOfBoundsException: 2
at org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
at org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)-- 

I've attached a unit test that exposes it. I've done my best to pare things down but it seems anything else I remove makes it go away (there are several things that could be removed to make it go away). The unit test passes when the exception is thrown. 

In short, this works:

Query query = em.createQuery("select o from Case as o" +
    " left join fetch o.scheduledAssignments" +
    " where o.scheduleDay = :sd");
query.setParameter("sd", sd);
List<Case> allCases = query.getResultList();

But this doesn't:

Query query = em.createQuery("select o from Case as o" +
    " where o.scheduleDay = :sd");
query.setParameter("sd", sd);
FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
fetchPlan.addField(Case.class, "scheduledAssignments");
List<Case> allCases = query.getResultList();

The test case runs against PostgreSQL. I would really appreciate it if someone could verify the test passes under some other database or if it fails, under PostgreSQL. Of course it would be even better if an OpenJPA expert could find the problem.

I will also accept suggestions for building a better unit test package.

Thanks for your help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1424) Out of bounds exception using fetch plan

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick updated OPENJPA-1424:
----------------------------------

    Fix Version/s: 1.3.0
                   1.2.3

Tentatively targeting for 1.3.0 and 1.2.3. 

> Out of bounds exception using fetch plan
> ----------------------------------------
>
>                 Key: OPENJPA-1424
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1424
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.1
>         Environment: Mac OSX, Java 1.5, Tomcat 5, PostgreSQL 8.4
>            Reporter: Daryl Stultz
>             Fix For: 1.2.3, 1.3.0
>
>         Attachments: test.zip
>
>
> Hello, I'm getting the following:
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
> at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
> at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
> at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
> at org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)-- 
> I've attached a unit test that exposes it. I've done my best to pare things down but it seems anything else I remove makes it go away (there are several things that could be removed to make it go away). The unit test passes when the exception is thrown. 
> In short, this works:
> Query query = em.createQuery("select o from Case as o" +
>     " left join fetch o.scheduledAssignments" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> List<Case> allCases = query.getResultList();
> But this doesn't:
> Query query = em.createQuery("select o from Case as o" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
> fetchPlan.addField(Case.class, "scheduledAssignments");
> List<Case> allCases = query.getResultList();
> The test case runs against PostgreSQL. I would really appreciate it if someone could verify the test passes under some other database or if it fails, under PostgreSQL. Of course it would be even better if an OpenJPA expert could find the problem.
> I will also accept suggestions for building a better unit test package.
> Thanks for your help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OPENJPA-1424) Out of bounds exception using fetch plan

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick reassigned OPENJPA-1424:
-------------------------------------

    Assignee: Michael Dick

> Out of bounds exception using fetch plan
> ----------------------------------------
>
>                 Key: OPENJPA-1424
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1424
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.1
>         Environment: Mac OSX, Java 1.5, Tomcat 5, PostgreSQL 8.4
>            Reporter: Daryl Stultz
>            Assignee: Michael Dick
>             Fix For: 1.2.3, 1.3.0, 2.0.1, 2.1.0
>
>         Attachments: OPENJPA-1424-1.2.x.patch.txt, test.zip
>
>
> Hello, I'm getting the following:
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
> at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
> at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
> at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
> at org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)-- 
> I've attached a unit test that exposes it. I've done my best to pare things down but it seems anything else I remove makes it go away (there are several things that could be removed to make it go away). The unit test passes when the exception is thrown. 
> In short, this works:
> Query query = em.createQuery("select o from Case as o" +
>     " left join fetch o.scheduledAssignments" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> List<Case> allCases = query.getResultList();
> But this doesn't:
> Query query = em.createQuery("select o from Case as o" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
> fetchPlan.addField(Case.class, "scheduledAssignments");
> List<Case> allCases = query.getResultList();
> The test case runs against PostgreSQL. I would really appreciate it if someone could verify the test passes under some other database or if it fails, under PostgreSQL. Of course it would be even better if an OpenJPA expert could find the problem.
> I will also accept suggestions for building a better unit test package.
> Thanks for your help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1424) Out of bounds exception using fetch plan

Posted by "Daryl Stultz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daryl Stultz updated OPENJPA-1424:
----------------------------------

    Attachment: test.zip

Unit test. Probably not a well-written one. I'm open to suggestions to improve it.

I run against PostgreSQL. The file database/create_jpa.sql can be used to build the database (called from the file database/build.sh).

> Out of bounds exception using fetch plan
> ----------------------------------------
>
>                 Key: OPENJPA-1424
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1424
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.1
>         Environment: Mac OSX, Java 1.5, Tomcat 5, PostgreSQL 8.4
>            Reporter: Daryl Stultz
>         Attachments: test.zip
>
>
> Hello, I'm getting the following:
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
> at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
> at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
> at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
> at org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)-- 
> I've attached a unit test that exposes it. I've done my best to pare things down but it seems anything else I remove makes it go away (there are several things that could be removed to make it go away). The unit test passes when the exception is thrown. 
> In short, this works:
> Query query = em.createQuery("select o from Case as o" +
>     " left join fetch o.scheduledAssignments" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> List<Case> allCases = query.getResultList();
> But this doesn't:
> Query query = em.createQuery("select o from Case as o" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
> fetchPlan.addField(Case.class, "scheduledAssignments");
> List<Case> allCases = query.getResultList();
> The test case runs against PostgreSQL. I would really appreciate it if someone could verify the test passes under some other database or if it fails, under PostgreSQL. Of course it would be even better if an OpenJPA expert could find the problem.
> I will also accept suggestions for building a better unit test package.
> Thanks for your help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-1424) Out of bounds exception using fetch plan

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick resolved OPENJPA-1424.
-----------------------------------

    Fix Version/s: 2.0.1
                       (was: 1.3.0)
                       (was: 1.2.3)
       Resolution: Fixed

> Out of bounds exception using fetch plan
> ----------------------------------------
>
>                 Key: OPENJPA-1424
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1424
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.1
>         Environment: Mac OSX, Java 1.5, Tomcat 5, PostgreSQL 8.4
>            Reporter: Daryl Stultz
>             Fix For: 2.0.1
>
>         Attachments: test.zip
>
>
> Hello, I'm getting the following:
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
> at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
> at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
> at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
> at org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)-- 
> I've attached a unit test that exposes it. I've done my best to pare things down but it seems anything else I remove makes it go away (there are several things that could be removed to make it go away). The unit test passes when the exception is thrown. 
> In short, this works:
> Query query = em.createQuery("select o from Case as o" +
>     " left join fetch o.scheduledAssignments" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> List<Case> allCases = query.getResultList();
> But this doesn't:
> Query query = em.createQuery("select o from Case as o" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
> fetchPlan.addField(Case.class, "scheduledAssignments");
> List<Case> allCases = query.getResultList();
> The test case runs against PostgreSQL. I would really appreciate it if someone could verify the test passes under some other database or if it fails, under PostgreSQL. Of course it would be even better if an OpenJPA expert could find the problem.
> I will also accept suggestions for building a better unit test package.
> Thanks for your help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1424) Out of bounds exception using fetch plan

Posted by "Heath Thomann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Heath Thomann updated OPENJPA-1424:
-----------------------------------

    Attachment: OPENJPA-1424-1.2.x.patch.txt

I'm attaching a patch (OPENJPA-1424-1.2.x.patch.txt) for 1.2.x.  This patch contains:
  
1) A back port of ClassMedaData from the trunk version of the fix.  This is the only change from trunk which I back ported.....the other change doesn't easily port and the initial test case passes with the ClassMetaData changes.
2) A stripped down version of the initial test case provided by Daryl.  I think I've stripped down the test as far as I can (any further and I couldn't reproduce the issue).  

Thanks,

Heath

> Out of bounds exception using fetch plan
> ----------------------------------------
>
>                 Key: OPENJPA-1424
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1424
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.1
>         Environment: Mac OSX, Java 1.5, Tomcat 5, PostgreSQL 8.4
>            Reporter: Daryl Stultz
>             Fix For: 2.0.1
>
>         Attachments: OPENJPA-1424-1.2.x.patch.txt, test.zip
>
>
> Hello, I'm getting the following:
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
> at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
> at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
> at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
> at org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)-- 
> I've attached a unit test that exposes it. I've done my best to pare things down but it seems anything else I remove makes it go away (there are several things that could be removed to make it go away). The unit test passes when the exception is thrown. 
> In short, this works:
> Query query = em.createQuery("select o from Case as o" +
>     " left join fetch o.scheduledAssignments" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> List<Case> allCases = query.getResultList();
> But this doesn't:
> Query query = em.createQuery("select o from Case as o" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
> fetchPlan.addField(Case.class, "scheduledAssignments");
> List<Case> allCases = query.getResultList();
> The test case runs against PostgreSQL. I would really appreciate it if someone could verify the test passes under some other database or if it fails, under PostgreSQL. Of course it would be even better if an OpenJPA expert could find the problem.
> I will also accept suggestions for building a better unit test package.
> Thanks for your help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1424) Out of bounds exception using fetch plan

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick updated OPENJPA-1424:
----------------------------------

    Fix Version/s: 1.2.3
                   1.3.0
                   2.1.0

Technically this was fixed in 2.0.0 - but it missed the release notes. I've targeted for 2.0.1, and 2.1.0 - so it'll be picked up in their release notes and changes.txt. 

> Out of bounds exception using fetch plan
> ----------------------------------------
>
>                 Key: OPENJPA-1424
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1424
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.1
>         Environment: Mac OSX, Java 1.5, Tomcat 5, PostgreSQL 8.4
>            Reporter: Daryl Stultz
>             Fix For: 1.2.3, 1.3.0, 2.0.1, 2.1.0
>
>         Attachments: OPENJPA-1424-1.2.x.patch.txt, test.zip
>
>
> Hello, I'm getting the following:
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
> at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
> at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
> at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
> at org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)-- 
> I've attached a unit test that exposes it. I've done my best to pare things down but it seems anything else I remove makes it go away (there are several things that could be removed to make it go away). The unit test passes when the exception is thrown. 
> In short, this works:
> Query query = em.createQuery("select o from Case as o" +
>     " left join fetch o.scheduledAssignments" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> List<Case> allCases = query.getResultList();
> But this doesn't:
> Query query = em.createQuery("select o from Case as o" +
>     " where o.scheduleDay = :sd");
> query.setParameter("sd", sd);
> FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
> fetchPlan.addField(Case.class, "scheduledAssignments");
> List<Case> allCases = query.getResultList();
> The test case runs against PostgreSQL. I would really appreciate it if someone could verify the test passes under some other database or if it fails, under PostgreSQL. Of course it would be even better if an OpenJPA expert could find the problem.
> I will also accept suggestions for building a better unit test package.
> Thanks for your help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.