Uploaded image for project: 'Hibernate ORM'
  1. HHH-9446

ClassCastException on loaded entities under GlassFish 4.0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.6, 4.3.8
    • Fix Version/s: 4.3.9
    • Component/s: None
    • Labels:
      None
    • Environment:
      GlassFish 4.0, Windows 8. NetBeans 8.0.1
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      There is a problem with 4.3.6 under GlassFish Server Open Source Edition 4.0 (build 89):
      a simple call of TestClass t = getEntityManager().find(TestClass.class, id); results in a ClassCastException error.
      The same project with 4.3.5 and 4.3.2 works fine.
      I specifically did a small test project which loads all artifacts into WEB-INF/lib, and I removed all libraries from the GlassFish's lib directory.
      The problems seems in class loaders. The class loader of the class of object from the left is different than the class loader of TestClass.class.
      This bug also affect the newest OGM, since it depends on 4.3.6 version.

        Attachments

        1. 9446_Aggregate_Second.png
          63 kB
        2. 9446_EAR_First.png
          70 kB
        3. ejb3test.zip
          10 kB
        4. stacktrace.txt
          8 kB

          Issue links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 4h 19m
                  4h 19m