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 8924189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:20:35+00:00 2026-06-15T07:20:35+00:00

I am creating a simple REST API via Google app engine. I have Task

  • 0

I am creating a simple REST API via Google app engine. I have Task and Project objects. A Project can have one or more Tasks. Here is some details about these data objects:

@Entity
public class Project implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Key id;
    private String title;
    private String description;
    private Date createdAt;

    // Section 1
    // @OneToMany(mappedBy = "project")
    // private List<Task> tasks;

    // ...
}

@Entity
public class Task implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Key id;
    private String shortDescription;
    private String longDescription;
    private Date createdAt;
    private Date dueDate;
    private boolean completed;

    // Section 2
    // @ManyToOne
    // @JoinColumn(name = "id_project")
    // private Project project;

    // ...
}

The way I implemented the class above works fine (Section 1 and Section 2 are commented out). However, what I want to do is to relate Task objects to Project. Whenever I remove the comments above and activate Section 1 and Section 2 the errors below occur.

The error appears for Project operations

HTTP ERROR 500

Problem accessing /api/project. Reason:

    Could not initialize class com.aspect.todo.dao.EMFService
Caused by:

java.lang.NoClassDefFoundError: Could not initialize class com.aspect.todo.dao.EMFService
    at com.aspect.todo.dao.Dao.getProjects(Dao.java:144)
    at com.aspect.todo.server.ProjectService.get(ProjectService.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    ...

The error appears for Task operations

HTTP ERROR 500

Problem accessing /api/task. Reason:

    INTERNAL_SERVER_ERROR
Caused by:

java.lang.ExceptionInInitializerError
    at com.aspect.todo.dao.Dao.getTasks(Dao.java:98)
    at com.aspect.todo.server.TaskService.get(TaskService.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    ...


Caused by:

javax.persistence.PersistenceException: Provider error. Provider: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
    at javax.persistence.Persistence.createFactory(Persistence.java:176)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:112)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:66
    ...


Caused by:

Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
org.datanucleus.exceptions.NucleusUserException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details
    at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:892)
    at org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:794)
    at org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:488)
    ...

Caused by:

Found Meta-Data for class com.aspect.todo.model.Task but this class is not enhanced!! Please enhance the class before running DataNucleus.
org.datanucleus.exceptions.NucleusUserException: Found Meta-Data for class com.aspect.todo.model.Task but this class is not enhanced!! Please enhance the class before running DataNucleus.
    at org.datanucleus.metadata.MetaDataManager.initialiseClassMetaData(MetaDataManager.java:2225)
    at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaData(MetaDataManager.java:2176)
    at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:881)
    ...

The weird thing is when I start with these sections commented out, compile and run and then activate only Section 2 and rerun it works fine. If close and reopen Eclipse try again the error occurs again.

NOTE: Datanucleus JDO/JPA version: v1

  • 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-15T07:20:36+00:00Added an answer on June 15, 2026 at 7:20 am
    Found Meta-Data for class com.aspect.todo.model.Task but this class is not enhanced!!
    Please enhance the class before running DataNucleus.
    

    The fact is that the classes are not enhanced at runtime and you have to find a way to enhance them prior to runtime that works for your environment … Maven, Ant, command-line, DataNucleus Eclipse plugin, or GAE Eclipse plugin.

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

Sidebar

Related Questions

I am creating simple app on Silverlight 4. In folder of View I have
I am creating a simple REST API that outputs JSON data. However I am
While creating a simple client for a REST service which I have stubbed out,
I creating simple tree with rest service on Extjs 4.1 . How can I
When creating a simple Flex 4.6 App, where the creationComplete-handler looks like this: protected
I am creating a simple blog applicaton. I have to add comments to a
I am creating a simple web app. There is a <video> element on the
I have a very simple Java JTable question. I am creating this class to
I'm creating a test case for a REST API in soapUI 4.5 where I'm
We are trying to implement a REST API for an application we have now.

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.