My aim is to persist a String to Datastore
final static PersistenceManager pm = PMF.get().getPersistenceManager();
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException
{
String s = "test";
System.out.println(pm.makePersistent(s));
PrintWriter pw = resp.getWriter();
pw.write("Data Saved");
}
Not sure about the reason for following ERROR
The class "The class "java.lang.String" 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.
Caused by:
org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The class "The class "java.lang.String" 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. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:241) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:674) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) at com.arunraja101.SaveDataServlet.doGet(SaveDataServlet.java:91)
Is an String Object can't be persisted ?