Serialization is ok with GAE, as long as you respect the following :
1. Classes intended to be serialized must implement the "Serializable"
interface
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 :
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].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.