com.caucho.hessian.io.HessianProtocolException: expected string at 0x6d


    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.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM