Hi Cyrille, Thanks for your response. Please see my answers below:
On Tue, Sep 21, 2010 at 11:04 AM, Cyrille Vincey <[email protected]> wrote: > Serialization is ok with GAE, as long as you respect the following : > 1. Classes intended to be serialized must implement the "Serializable" > interface > My entity implements the Serializable interface. What I don't understand is why this exception is being thrown on a class that is not from my application, but *from the App Engine SDK* ( http://code.google.com/p/datanucleus-appengine/source/browse/trunk/src/org/datanucleus/store/appengine/jpa/DatastoreEntityManagerFactory.java?r=473 ). I suppose that the App Engine SDK classes should be fully compatible with the App Engine runtime :-) I searched for this error in this forum and in the datanucleus forum, but found nothing about it. 2. Your JPA annotations for the serialized entity property must be set to > 'serializable'. Don't know how it works for JPA, but here is how it looks > like for a JDO implementation : I don't know too, but I'll investigate this. > Class Sarkozy implements Serializable { > ... > } > > @PersistenceCapable > Class Bruni { > @Persistent(serialized = "true") > private Sarkozy smallGuy; > } > > > On 20/09/10 18:46, "Joaquim Oliveira" <[email protected]> > wrote: > > > Hi all, > > > > I'm trying to convert an existing JPA application to run on App > > Engine, but when I try to run the application, I got the following > > exception: > > > > java.lang.RuntimeException: java.io.NotSerializableException: > > org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory > > at > > > com.google.apphosting.runtime.jetty.SessionManager.serialize(SessionManager.ja > > va: > > 387) > > (...) > > > > Caused by: java.io.NotSerializableException: > > org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java: > > 1173) > > > > The application runs in maven2, so I don't know if this may be a > > problem caused by old lib versions. The declared dependecies are: > > <dependency> > > <groupId>com.google.appengine.orm</groupId> > > <artifactId>datanucleus-appengine</artifactId> > > <version>1.0.5</version> > > <scope>runtime</scope> > > </dependency> > > > > <dependency> > > <groupId>org.datanucleus</groupId> > > <artifactId>datanucleus-jpa</artifactId> > > <version>1.1.5</version> > > <scope>runtime</scope> > > </dependency> > > > > > > > > The datastore classes were not supposed to be compatible with the App > > Engine runtime restrictions? > > > > Any tips about how to solve this problem? > > > > Thanks in advance, > > > > Joaquim Oliveira > > > -- > 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]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- 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.
