Hi all,

I'm trying to migrate away from Hibernate to OpenJPA. I have a Spring
3 and GWT web application that I run from eclipse.

I've added an enhancer builder to my eclipse project, and also enabled
the annotation processing, which all appears to be working OK. I have
generated "_" classes that I can use for queries and I get some
warnings about property access when I start the container (which is
running under Jetty btw).

However when I try to call entityManager.createQuery(criteriaQuery) it
fails with the following error:

<openjpa-2.1.1-r422266:1148538 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were
not enhanced at build time or at class load time with a javaagent: "

Which then goes on to list all of my classes that I thought were enhanced.

My persistence xml is pretty simple:

    <persistence-unit name="audit" transaction-type="RESOURCE_LOCAL">
        <class>classname.here</class>

        <properties>
            <property name="openjpa.DynamicEnhancementAgent" value="false" />
        </properties>
   </persistence-unit>

I've looked at the generated class files in eclipse's bin folder the
classes have they have definitely been enhanced as I can see
references to openjpa in the class files. I'm at a loss as to where to
go from here, I've been search the web and reading documentation and I
don't know what to try next. Any pointers would be gratefully
received.

Thank you,

Steve.

Reply via email to