You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jeffrey Blatttman (JIRA)" <ji...@apache.org> on 2007/03/19 18:33:32 UTC

[jira] Created: (OPENJPA-174) error when find()'ing an abstract class

error when find()'ing an abstract class
---------------------------------------

                 Key: OPENJPA-174
                 URL: https://issues.apache.org/jira/browse/OPENJPA-174
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 0.9.6
         Environment: Java SE 5
Derby 
            Reporter: Jeffrey Blatttman


class B extends A
A is abstract
B is concrete

i have persisted an instance of B. now i try:

A a = em.find(A.class, anId);

openjpa fails with:

... Cannot create new application identity instance for abstract   class "class A"

if i change the find to:

A a = em.find(B.class, anId);

openjpa works okay.

note that i have two test cases. one is my real model, and one is the simple A and B class example above. my real model fails, where the simple A, B class example works as expected. so, it's is either a side affect of some other issue, or there is something wrong in my model and the error message is misleading or lacking information.

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


[jira] Updated: (OPENJPA-174) error when find()'ing an abstract class

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

Jeffrey Blatttman updated OPENJPA-174:
--------------------------------------

    Attachment: abstracttest.zip

this is the simple A, B class test case the works. again, maven2 netbeans projects ... requires derby on localhost:1527 running.

> error when find()'ing an abstract class
> ---------------------------------------
>
>                 Key: OPENJPA-174
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-174
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 0.9.6
>         Environment: Java SE 5
> Derby 
>            Reporter: Jeffrey Blatttman
>         Attachments: abstracttest.zip, pom.zip
>
>
> class B extends A
> A is abstract
> B is concrete
> i have persisted an instance of B. now i try:
> A a = em.find(A.class, anId);
> openjpa fails with:
> ... Cannot create new application identity instance for abstract   class "class A"
> if i change the find to:
> A a = em.find(B.class, anId);
> openjpa works okay.
> note that i have two test cases. one is my real model, and one is the simple A and B class example above. my real model fails, where the simple A, B class example works as expected. so, it's is either a side affect of some other issue, or there is something wrong in my model and the error message is misleading or lacking information.

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


[jira] Updated: (OPENJPA-174) error when find()'ing an abstract class

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

Jeffrey Blatttman updated OPENJPA-174:
--------------------------------------

    Attachment: pom.zip

this is a netbeans maven2 project that shows the error. the test case that fails is in PersistTest.java line 61 and 62. 61 fails. 62 succeeds (but is commented out right now.

to run the test case you need a derby network server running on localhost and default port.

> error when find()'ing an abstract class
> ---------------------------------------
>
>                 Key: OPENJPA-174
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-174
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 0.9.6
>         Environment: Java SE 5
> Derby 
>            Reporter: Jeffrey Blatttman
>         Attachments: pom.zip
>
>
> class B extends A
> A is abstract
> B is concrete
> i have persisted an instance of B. now i try:
> A a = em.find(A.class, anId);
> openjpa fails with:
> ... Cannot create new application identity instance for abstract   class "class A"
> if i change the find to:
> A a = em.find(B.class, anId);
> openjpa works okay.
> note that i have two test cases. one is my real model, and one is the simple A and B class example above. my real model fails, where the simple A, B class example works as expected. so, it's is either a side affect of some other issue, or there is something wrong in my model and the error message is misleading or lacking information.

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


[jira] Resolved: (OPENJPA-174) error when find()'ing an abstract class

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

Abe White resolved OPENJPA-174.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.7

Only affected abstract base types with a single String id field.  Fixed in SVN revision 520117.  Added test case in org.apache.openjpa.persistence.inheritance.TestFindAbstractClass.

> error when find()'ing an abstract class
> ---------------------------------------
>
>                 Key: OPENJPA-174
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-174
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 0.9.6
>         Environment: Java SE 5
> Derby 
>            Reporter: Jeffrey Blatttman
>             Fix For: 0.9.7
>
>         Attachments: abstracttest.zip, pom.zip
>
>
> class B extends A
> A is abstract
> B is concrete
> i have persisted an instance of B. now i try:
> A a = em.find(A.class, anId);
> openjpa fails with:
> ... Cannot create new application identity instance for abstract   class "class A"
> if i change the find to:
> A a = em.find(B.class, anId);
> openjpa works okay.
> note that i have two test cases. one is my real model, and one is the simple A and B class example above. my real model fails, where the simple A, B class example works as expected. so, it's is either a side affect of some other issue, or there is something wrong in my model and the error message is misleading or lacking information.

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