When the Runtime Enhancement Agent is not used, a "This configuration
disallows runtime optimization, but the following listed types were not
enhanced at build time or at class load time with a javaagent:" error (see
below for a snapshot of the generated snapshot) is generated.

[stacktrace]
"Caused by: <openjpa-2.0.0-r422266:935683 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: "
be.minfin.fgov.jpa.proto3.entity.VATRMessage
be.minfin.fgov.jpa.proto3.entity.IdentityObject
be.minfin.fgov.jpa.proto3.entity.ViesMessage
be.minfin.fgov.jpa.proto3.entity.ViesResponse
be.minfin.fgov.jpa.proto3.entity.VATRResponse".
        at
org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:116)
        at
org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:304)
        at
org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:228)
        at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:202)
        at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
        at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:213)
        at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:57)
        at
com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at
com.sun.enterprise.container.common.impl.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:521)
        at
be.minfin.fgov.jpa.proto3.business.VATRManagerImpl.findResponsesForMessageId(VATRManagerImpl.java:22)
"
[/stacktrace]

Using underneath code, results in "Field
"be.minfin.fgov.jpa.proto3.entity.ViesMessage.responses" cannot declare that
it is mapped by another field. Its mapping strategy
(org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy) does not support
mapping by another field.".
[code]
        @OneToMany(cascade=CascadeType.ALL,mappedBy="message")
        protected List<RESP> responses;
[/code]

Using underneath code, results in a "correct" result. The
ViesMessage.responses property is however persisted as a BLOB in the
VIESMESSAGE table and not in the VIESRESPONSE table.
[code]
        @OneToMany(cascade=CascadeType.ALL)
        protected List<RESP> responses;
[/code]


Kevin Sutter wrote:
> 
> Was it the Runtime Enhancement agent that got you
> working?  Or, was it the changes to your code?  Or, were both required?
> 

-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/ArgumentException-when-using-generics-tp5073975p5078448.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to