1. OpenJPA
  2. OPENJPA-1590

Agent enhancer doesn't work with Tomcat


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0-M3, 2.1.1, 2.2.0
    • Fix Version/s: 2.4.0
    • Labels:


      Originally reported as OPENJPA-1410 - Class linkage exception when creating an EMF with OpenJPA M3

      Experimentation and a quick search for similar issues is showing that use of the OpenJPA's agent enhancer with Tomcat never worked?!? The agent gets tied to the base class loader and enhances classes available to that loader at startup. Each app has their own lazily instantiated class loader. Enhancement has already taken place by the time those loaders get instantiated. This looked like a regression, but it it is actually a separate and much larger issue than the one raised in this JIRA. I will not pursue that issue at this time.

      Please verify that you no longer see the original problem/exception with latest 2.0 build. If you were relying on runtime enhancement you will need to re-enable it by specifying:
      <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/>

      A more recommended solution is to enhance your entities at build time and set -
      <property name="openjpa.DynamicEnhancementAgent" value="false"/>
      <property name="openjpa.RuntimeUnenhancedClasses" value="unsupported"/>

        Issue Links


          Jeremy Bauer created issue -
          Donald Woods made changes -
          Field Original Value New Value
          Link This issue is related to OPENJPA-1410 [ OPENJPA-1410 ]
          Donald Woods made changes -
          Fix Version/s 2.1.0 [ 12314542 ]
          Michael Dick made changes -
          Fix Version/s 2.2.0 [ 12315910 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Albert Lee made changes -
          Fix Version/s 2.3.0 [ 12319463 ]
          Fix Version/s 2.2.0 [ 12315910 ]
          Affects Version/s 2.1.1 [ 12316191 ]
          Affects Version/s 2.2.0 [ 12315910 ]
          Mark Struberg made changes -
          Fix Version/s 2.4.0 [ 12325298 ]
          Fix Version/s 2.3.0 [ 12319463 ]


            • Assignee:
              Jeremy Bauer
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: