deeplyloving / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

Locale is not serialized properly #185

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open-jdk7(!) with Tomcat 7 
2. memcached-session-manager replication with kryo-serializer
2. Add java.util.Locale into your Session
3. replicate the Session and call locale.getLanguage()

What is the expected output? What do you see instead?

you get a NullPointerException because

    private transient BaseLocale baseLocale;

is not serialized but is expected to be not null in Locale.class

What version of the product are you using? On what operating system?

It does work with JDK 6 as there is no baseLocale field inside Locale

Please provide any additional information below.
http://code.google.com/p/kryo/issues/detail?id=100

If you need further information please contact me.
BTW: we use your session replication for a large installation with 20 nodes. So 
far no problems at all. Thank you

Original issue reported on code.google.com by vygen.ja...@gmail.com on 3 Dec 2013 at 10:36

GoogleCodeExporter commented 9 years ago
this is duplicate of 
http://code.google.com/p/memcached-session-manager/issues/detail?id=176

I think this should be fixed without custom serializer because:
- regression after upgrading from jdk6 to jdk7 
- having Locale in the session is very usual
- hard to find bug

Original comment by vygen.ja...@gmail.com on 3 Dec 2013 at 10:58

GoogleCodeExporter commented 9 years ago

Original comment by martin.grotzke on 4 Dec 2013 at 9:35

GoogleCodeExporter commented 9 years ago
Fixed in master. Updated to kryo-serializers 0.11 which now provides a 
LocaleSerializer.

Original comment by martin.grotzke on 20 Dec 2013 at 9:50