I think this was "pilot error" I use both Eclipse and Maven command line
to build and only Maven is setup to enhance, post-compile, so I think my
Eclipse session may have compiled on top of the code - but I normally
watch out for that, e.g. unclick "Build Automatically" in Eclipse. In
any case, the issue resolved itself.
Thanks,
Chris
On 9/26/2013 2:50 PM, Kevin Sutter wrote:
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.a...@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{