asolfre / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

ResultProxy not serializable #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. List<Plant> query = ofy.load().type(Plant.class).list();
2. new ObjectOutputStream(fos).writeObject(query);
3. Serialization Exception

What version of the product are you using? On what operating system?
- Objectify 4.0a3
- GAE 1.6.4

Thanks to take a look,
Jordi.

Original issue reported on code.google.com by planad...@gmail.com on 28 Feb 2012 at 11:00

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 1 Mar 2012 at 2:57

GoogleCodeExporter commented 9 years ago
Hello,

Any idea how to fix it in order to workaround for temp fix?

Thanks.

Original comment by rourev...@gmail.com on 13 Mar 2012 at 4:56

GoogleCodeExporter commented 9 years ago
The easy solution is just to create a new list:

List<Plant> list = Lists.newArrayList(ofy.load().type(Plant.class).list());

That's using Google Guava... of course you could just create the new arraylist 
with a little more typing.

Original comment by lhori...@gmail.com on 15 Mar 2012 at 7:11

GoogleCodeExporter commented 9 years ago
Issue 133 has been merged into this issue.

Original comment by lhori...@gmail.com on 9 Sep 2012 at 3:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I used a dummy quickfix: created a serializable version (simply added 
Serializable interface) of this class (and also of ResultNow) in my project so 
these classes are loaded before Objectify's classes.

BTW: ResultNow is already serializable in the trunk, but it is not deployed 
into the beta1.

Original comment by ribi...@gmail.com on 26 Nov 2012 at 9:48

GoogleCodeExporter commented 9 years ago
This is fixed in master... I thought it had made it into 4.0b1, but apparently 
not.  Next release will come soon.

Original comment by lhori...@gmail.com on 27 Nov 2012 at 3:02