It’s hard for me to get Datanucleus 2 to work properly with class enhancement on GAE 1.7.0 in Eclipse using the Datanucleus plugin. This worked fine in older versions of GAE when I followed these steps:
http://www.datanucleus.org/products/accessplatform/guides/eclipse/index.html
But since the update, GAE now includes these libs (newer versions are similar), and GAE also has a new "Enhancer" flag that you can set. However, I cannot find this flag in Eclipse. GAE seems to still include v1 libs when I want V2 libs and Datanucleus to have conflicts according to this error:
Jul 1, 2012 5:59:55 PM org.datanucleus.enhancer.DataNucleusEnhancer <init>
INFO: DataNucleus Enhancer : Using ClassEnhancer "ASM" for API "JPA"
Exception in thread "main" java.lang.NoSuchFieldError: NUCLEUS_CONTEXT_LOADER
at org.datanucleus.NucleusContext.<clinit>(NucleusContext.java:73)
at org.datanucleus.enhancer.DataNucleusEnhancer.<init>(DataNucleusEnhancer.java:171)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1265)
I have tried many different things. I tried using all the defaults. I tried adding v2 libs to the Datanucleus path class entries. I tried to remove v1 libs in the GAE 1.7.0 SDK in both src and libs. But somehow GAE is still pulling (or trying to pull on V1 libs). I even tried the older manual configuration method, as indicated in the link above. This is a little frustrating because it seems like I'm in a situation where I cannot use these libraries at all. At least with older versions of GAE, I could manually configure it to work. Now nothing works. Any suggestions?
source
share