I have a class which I am trying to persist to the DataStore but I am getting a org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException when calling my pm.makePersistent(_user)
Error text: The class 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.
My class:
package com.afalon.cloud.contracts;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
@PersistenceCapable
@XmlRootElement(name = "user")
public class User {
@Persistent
@XmlElement(name="logon")
private String _logOn;
@Persistent
@XmlElement(name="personid")
private String _personId;
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@XmlElement(name="userid")
private String _userId;
public User () {}
public void setLogOn(String LogOn) {
this._logOn = LogOn;
}
public String getLogOn() {
return _logOn;
}
public void setPersonId(String PersonId) {
this._personId = PersonId;
}
public String getPersonId() {
return _personId;
}
public void setUserId(String UserId) {
this._userId = UserId;
}
public String getUserId() {
return _userId;
}
}