Search code examples
javahibernatemavenjdo

How to make a class persistent capable


I am trying to create a class whose code snippet is as follows:

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 {
...
}

Now, the program is not even getting compiled, as it says t cannot recognize ooObj class, and without this, the logger returns the following:

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.]]

Could someone please suggest how to either make the class persistent capable or some maven dependency to use ooObj.


Solution

  • Do a Google search for "com.objy.db.app.ooObj" and try to find the missing dependency yourself!

    I guess you need to download Objectivity/DB for Java: http://support.objectivity.com/downloads