0
我嘗試在IntelliJ IDEA上使用JDO2創建新的GAE/J項目,但由於以下原因,它不能正常工作org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException :在IntelliJ IDEA上不能使用JDO2的GAE/J項目
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
public class Book {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String name;
public Book(String name) {
this.name = name;
}
}
謝謝。