I try to create a GAE webapp that is using a "model" jar where i have my JPA
entity classes.
My war file includes the model.jar in the WEB-INF/lib directory
My entity class is like this:
package com.example.model;
import java.io.Serializable;
import com.google.appengine.api.datastore.Key;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Entity;
@Entity
public class Message implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key id;
public Key getId() {
return id;
}
}
when i try to use that entity bean:
public void create(Message message) {
try {
em.persist(message);
} finally {
em.close();
}
}
I always get:
Caused by: org.datanucleus.exceptions.NoPersistenceInformationException: The
class "com.example.model.Message" is required to be persistable yet no
Meta-Data/Annotations can be found for this class. Please check that the
Meta-Data/annotations is defined in a valid file location.
Does anyone has a clue about what's going on ?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.