Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-174

error when find()'ing an abstract class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.6
    • 0.9.7
    • None
    • None
    • Java SE 5
      Derby

    Description

      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.

      Attachments

        1. abstracttest.zip
          23 kB
          Jeffrey Blattman
        2. pom.zip
          82 kB
          Jeffrey Blattman

        Activity

          People

            Unassigned Unassigned
            farble1670 Jeffrey Blattman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: