如何使 class 具有持久能力
How to make a class persistent capable
我正在尝试创建一个class,其代码片段如下:
import java.io.Serializable;
import java.util.Date;
import com.objy.db.app.ooObj;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
@PersistenceCapable
public class Student extends ooObj implements Serializable {
...
}
现在,程序甚至没有被编译,因为它说无法识别 ooObj class,没有这个,记录器 returns 以下内容:
org.datanucleus.exceptions.ClassNotPersistableException: The class "project2.Student" 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.]]
有人可以建议如何使 class 具有持久能力或一些 maven 依赖项来使用 ooObj。
Google 搜索 "com.objy.db.app.ooObj" 并尝试自己找到缺少的依赖项!
我想您需要为 Java 下载 Objectivity/DB:http://support.objectivity.com/downloads
我正在尝试创建一个class,其代码片段如下:
import java.io.Serializable;
import java.util.Date;
import com.objy.db.app.ooObj;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
@PersistenceCapable
public class Student extends ooObj implements Serializable {
...
}
现在,程序甚至没有被编译,因为它说无法识别 ooObj class,没有这个,记录器 returns 以下内容:
org.datanucleus.exceptions.ClassNotPersistableException: The class "project2.Student" 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.]]
有人可以建议如何使 class 具有持久能力或一些 maven 依赖项来使用 ooObj。
Google 搜索 "com.objy.db.app.ooObj" 并尝试自己找到缺少的依赖项!
我想您需要为 Java 下载 Objectivity/DB:http://support.objectivity.com/downloads