Mantis - Hessian
Viewing Issue Advanced Details
5046 crash always 04-26-12 03:25 11-05-12 17:33
laruellec  
 
normal  
new 4.0.7  
open  
none    
none  
0005046: Java 1.7 Locale serialization fails
Using Spring HessianServiceExporter, we have a service that has a Locale parameter.
Everything works fine in Java 1.6 (the webapp is hosted in tomcat)
But if we setup tomcat to use Java 1.7, all calls crash.
The root cause of the exception is :
Caused by: java.lang.NullPointerException
        at java.util.Locale.readResolve(Locale.java:2096)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.caucho.hessian.io.UnsafeDeserializer.resolve(UnsafeDeserializer.java:291)
        at com.caucho.hessian.io.UnsafeDeserializer.readMap(UnsafeDeserializer.java:217)

Notes
(0006081)
altmind   
11-05-12 17:33   
Struck the same problem. Seems to be an incompatibility of LocaleHandler with Java7. Here's custom serializer https://github.com/altmind/hessian-locale [^] This helped me.