Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8227223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:03:12+00:00 2026-06-07T16:03:12+00:00

My aim is to persist a String to Datastore final static PersistenceManager pm =

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:03:15+00:00Added an answer on June 7, 2026 at 4:03 pm

    You can persist a String in the datastore, but as part of an entity. You describe the entities that are written to and read from the datastore by defining a class. For instance, this document describes how to define an entity class using JDO.

    The class dictates which fields are stored when the entities are written to the datastore, and where they are written. Without such a class, App Engine will not know where to save the data when you call makePersistent (as is the case in your example code) nor how to read it back.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My aim is to get a json array like this one: var args =
My aim is to Sanitize a string. The class should do: trim an input
Aim to Achieve : I want the Function to accept List(Of String), Array &
Shortened Aim: To pass a variable via $.POST to a PHP file (get.php), and
I aim to filter my Google results right at terminal such that I get
AIM: I would like to tail the last line of the file.txt and input
Aim : To convert a integer value first to hexstring and then to byte[].
AIM: To output the contents of a log file line by line newest at
AIM: I would like to set the below function to call every 5 seconds.
AIM : Convert a resultset to XML and assign the result to a variable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.