openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: Why would OpenJPA runtime claim an enhanced class is not enhanced?
Date Thu, 26 Sep 2013 18:50:23 GMT
I know this sounds like a dumb answer, but any chance you have multiple
occurrences of demo.MarketData in your classpath?  Since you showed a javap
output of demo.MarketData, you definitely have a version that is enhanced,
but could your application accidentally be loading a different version?


On Thu, Sep 26, 2013 at 1:42 PM, Chris <cwolf.algo@gmail.com> wrote:

> This just started happening.  The code used to work, not it complains the
> class is not enhanced:
>
> <openjpa-2.2.1-r422266:1396819 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: "
> demo.MarketData
> demo.SampleData".
>         at org.apache.openjpa.enhance.**ManagedClassSubclasser.**
> prepareUnenhancedClasses(**ManagedClassSubclasser.java:**115)
>         at org.apache.openjpa.kernel.**AbstractBrokerFactory.**
> loadPersistentTypes(**AbstractBrokerFactory.java:**314)
>         at org.apache.openjpa.kernel.**AbstractBrokerFactory.**
> initializeBroker(**AbstractBrokerFactory.java:**238)
>         at org.apache.openjpa.kernel.**AbstractBrokerFactory.**newBroker(*
> *AbstractBrokerFactory.java:**212)
>         at org.apache.openjpa.kernel.**DelegatingBrokerFactory.**
> newBroker(**DelegatingBrokerFactory.java:**156)
>         at org.apache.openjpa.**persistence.**EntityManagerFactoryImpl.**
> createEntityManager(**EntityManagerFactoryImpl.java:**227)
>         at org.apache.openjpa.**persistence.**EntityManagerFactoryImpl.**
> createEntityManager(**EntityManagerFactoryImpl.java:**154)
>         at org.apache.openjpa.**persistence.**EntityManagerFactoryImpl.**
> createEntityManager(**EntityManagerFactoryImpl.java:**60)
>
> ...but it *is* enhanced:
>
> $ javap demo.MarketData \
> | grep implements | grep PersistenceCapable
> public class demo.MarketData extends java.lang.Object implements
> java.io.Serializable,org.**apache.openjpa.enhance.**PersistenceCapable{
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message