Comment 4 for bug 744035

Revision history for this message
Scott Ritchie (sritchie) wrote :

Related to bug #774677

Ive found that KeyValuePairs currently don't work. At compile time (when pressing the populate datastore button) i get:

00:02:15.472 [ERROR] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String au.edu.unimelb.csse.mugle.client.DataTestService.populateDatastore()' threw an unexpected exception: org.datanucleus.exceptions.NucleusUserException: Field "au.edu.unimelb.csse.mugle.server.model.KeyValuePairData.value" is declared as a reference type (interface/Object) but no implementation classes of "java.io.Serializable" have been found!
...
at au.edu.unimelb.csse.mugle.server.DataTestServiceImpl.populateDatastore(DataTestServiceImpl.java:53)

which is the line:
"pm.makePersistentAll(users)"

Since the relationships are owned between User, UserGameProfile and then KeyValuePair this comes up here - but is a bigger (unrelated) problem

Our keyvaluepair storage wont work as is. I tried to change the Object being stored from a straight Object to Serializable (error with Object instead of Serializable is essentially the same)

However what i think is happening here based on the error above and the example at:
https://code.google.com/appengine/docs/java/datastore/jdo/dataclasses.html#Serializable_Objects

It's searching OUR code for classes which implement Serializable - and not finding any, which is why there's an error.
So i think we'll need to serialize the objects ourselves.