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