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

Runtime enhancer doesn't work propery if there is a trailing persistence.xml file on the classpath.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0, 2.0.0-M1, 2.0.0-M2
    • 1.3.0, 2.0.0-M3
    • kernel
    • None

    Description

      I have an application where I am using runtime class enhancement via the javaagent and I set openjpa.RuntimeUnenhancedClasses=unsupported. My application works fine when running on 1.1.0 but when I moved to 1.2.0 (and 2.0.0) I started getting errors because my classes aren't being enhanced.

      After debugging I determined that I had a jar on the end of my classpath that had a META-INF/persistence.xml file in it. The extra persistence.xml file has no PUs defined, and should have been ignored. When I removed that jar from my classpath things starting working again. It also works if I put my META-INF/persistence.xml file on the end of my classpath.

      Attachments

        1. OPENJPA-932.patch
          10 kB
          Richard G. Curtis
        2. OPENJPA-932.patch
          12 kB
          Richard G. Curtis
        3. OPENJPA932.test.patch
          7 kB
          Richard G. Curtis

        Activity

          People

            mikedd Michael Dick
            curtisr7 Richard G. Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: