当前位置: 首页 > 工具软件 > Hessian C# > 使用案例 >

PHP调用Java的hessian接口报错:Expected 'H'/'C' (Hessian 2.0) or 'c' (Hessian 1.0) in hessian input at -1

费学
2023-12-01

出错提示:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Hessian skeleton invocation failed; nested exception is java.io.IOException: Expected 'H'/'C' (Hessian 2.0) or 'c' (Hessian 1.0) in hessian input at -1] with root cause
INFO   | jvm 1    | 2018/08/09 20:12:06 | java.io.IOException: Expected 'H'/'C' (Hessian 2.0) or 'c' (Hessian 1.0) in hessian input at -1

原因:PHP所用的hessian包版本,和Java所用hessian版本不匹配。PHP所用hessian包不同于Java,都是1.0,2.0这种形式,版本号并不对应。

个人情况是:

Java-4.0.38

PHP-2.0.3

 类似资料: