1. Phenomena
When learning Hessian, a system calls B through Hessian, but receives a 500 error:
Java.io.IOException:Server returned HTTP response code:500 for URL
Debug B, see the exception described in the title.
2. Analysis
After searching, see this information:
"is caused by incompatible versions of Hessian and spring" http://itlab.idcquan.com/Java/base/849773_4.html
3. Causes
The analysis found that the Hessian used by B was implemented by Spring-remoting 2.0, The class used is org.springframework.remoting.caucho.HessianServiceExporter, and from 2.5 onwards, the contents of the spring-remoting are split into Spring-webmvc or Spring-web.
A is using the Spring-web 4.2.1.final, the class used is Org.springframework.remoting.caucho.HessianProxyFactoryBean
4. Workaround
Discard the use of Spring-remoting 2.0 in B and use Spring-web 4.2.1.final instead.
com.caucho.hessian.io.HessianProtocolException:expected string at 0x6d