Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/385.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在IntelliJ IDEA上使用JDO2对GAE/J项目进行持久化_Java_Google App Engine_Intellij Idea_Google Cloud Datastore_Jdo - Fatal编程技术网

Java 无法在IntelliJ IDEA上使用JDO2对GAE/J项目进行持久化

Java 无法在IntelliJ IDEA上使用JDO2对GAE/J项目进行持久化,java,google-app-engine,intellij-idea,google-cloud-datastore,jdo,Java,Google App Engine,Intellij Idea,Google Cloud Datastore,Jdo,我尝试使用IntelliJ IDEA上的JDO2创建一个新的GAE/J项目,但由于以下org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException,该项目无法正常工作: The class "Book" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is n

我尝试使用IntelliJ IDEA上的JDO2创建一个新的GAE/J项目,但由于以下org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException,该项目无法正常工作:

The class "Book" 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." 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 for the class is not found.
我还尝试在Eclipse上创建完全相同的项目,它运行良好,没有任何问题。创建的模型非常简单,如下所示(我认为这个模型是无关的):

@PersistenceCapable
公共课堂用书{
@主键
@持久性(valueStrategy=IdGeneratorStrategy.IDENTITY)
私钥;
@持久的
私有字符串名称;
公共图书(字符串名称){
this.name=名称;
}
}
谢谢

这意味着它要么没有被增强,要么被增强 文件的版本不在类路径中(或被 未增强版本),或类的元数据/注释 “未找到。”不可持久。这意味着它或未被持久化 增强,或者文件的增强版本不在 类路径(或由非增强版本隐藏)或元数据 找不到该类的

消息很清楚,你必须增强你的类,并且在运行时在类路径中有增强的版本