我目前正在尝试使用Google App Engine的PersistentManagerFactory来保留类的对象。我收到一个我不太明白的错误:
org.datanucleus.api.jdo.exceptions.ClassNotPersistenceCapableException:
The class "com.google.gwt.sample.vendorcouver.client.user.VenUser" is not persistable.
This means that it either hasnt been enhanced, or that the enhanced version of the file
is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-
Data/annotations for the class are not found.
我在Why do I get ClassNotPersistableException while running GWT App Engine application in hosted mode?做了所有建议(确保我在课堂上有@PersistenceCapable,确保我的Classpath中没有任何重复的.jars)。最后我在Datanucleus Enhancement控制台中发现了:
java.lang.NullPointerException: ormLibs cannot be null
at com.google.appengine.tools.enhancer.EnhancerLoader.removeOrmLibs(EnhancerLoader.java:66)
at com.google.appengine.tools.enhancer.EnhancerLoader.getClassPath(EnhancerLoader.java:43)
at com.google.appengine.tools.enhancer.EnhancerLoader.<init>(EnhancerLoader.java:37)
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:69)
at com.google.appengine.tools.enhancer.Enhance.<init>(Enhance.java:71)
at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:51)
我不完全确定ormLibs应该是什么,我似乎无法在网上找到它。任何帮助,将不胜感激!