Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-2087

NoClassDefFoundError using OpenJPA deploy time bytecode enhancement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.6.0
    • None
    • container system
    • None
    • apache-tomee-jaxrs-1.6.0
      java version "1.7.0_51"
      Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
      Windows 7 Enterprise

    Description

      When setting the property openejb.jpa.deploy-time-enhancement to true the Enhancer cannot find an interface class implemented by a JPA entity. The interface class is defined in another jar that is also included in the WEB-INF/lib directory.

      The Enhance throws this exception:
      WARNING: can't enhanced at deploy-time entities
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.openejb.assembler.classic.DeployTimeEnhancer.enhance(DeployTimeEnhancer.java:144)
      [...]
      Caused by: java.lang.NoClassDefFoundError: com/blah/blah/MyInterface
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at org.apache.openjpa.lib.util.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:86)
      at org.apache.openjpa.lib.util.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:43)

      Attachments

        Activity

          People

            Unassigned Unassigned
            laloia Lou Aloia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: