标签:
1. 现象
在学习Hessian时,A系统通过hessian去调用B,但收到500错误:
java.io.IOException: Server returned HTTP response code: 500 for URL
调试B,看到标题所述异常。
2. 分析
经过搜索,看到这样的信息:
“是hessian和spring的版本不兼容引起的” http://itlab.idcquan.com/Java/base/849773_4.html
3. 原因
经过分析发现,B所使用的hessian是spring-remoting 2.0实现的,所使用的类是org.springframework.remoting.caucho.HessianServiceExporter,而从2.5开始,spring-remoting的内容被拆分到spring-webmvc或spring-web中。
A所使用的是spring-web 4.2.1.final,所使用的类是org.springframework.remoting.caucho.HessianProxyFactoryBean
4. 解决办法
在B中放弃使用spring-remoting 2.0, 而是使用spring-web 4.2.1.final.
com.caucho.hessian.io.HessianProtocolException: expected string at 0x6d
标签:
原文地址:http://www.cnblogs.com/tanjinfu/p/5514214.html