hession call json parsing abnormal com.caucho.hessian.io.HessianProtocolException: expected integer at 0x74 java.util

Hello everyone, I am a duck:
    Pit Record, use hession error expected integer at 0x74 java.util.ArrayList.

1. The given information is as follows:


2020-03-18 14:27:48.057 [TID: N/A] [Apollo-RemoteConfigLongPollService-1]  WARN  [class:com.ctrip.framework.apollo.internals.RemoteConfigLongPollService | method:doLongPollingRefresh | line:193] logInfo==> Long polling failed, will retry in 16 seconds. appId: etc-manage-service-apply, cluster: default, namespaces: application, long polling url: null, reason: Get config services failed from http://apollo.meta/services/config?appId=etc-manage-service-apply&ip=192.168.xxx.xxx [Cause: Could not complete get operation [Cause: apollo.meta]]

com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException: expected integer at 0x74 java.util.ArrayList ([com.alibaba.fastjson.JSONObject, message, 失败,请求参数错误, status])
  [M] t [\x00\x1fcom.alibaba.fastjson.JSONObject\x07message\x0b\xe6\xa0\xb8\xe9\x94\x80\xe5\xa4\xb1\xe8\xb4\xa5,\xe8\xaf\xb7\xe6\xb1\x82\xe5\x8f\x82\xe6\x95\xb0\xe9\x94\x99\xe8\xaf\xaf\x06status\x011zz]

    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:222)
    at com.sun.proxy.$Proxy115.changeCardStatus(Unknown Source)
    at com.etc.bigcar.CouponTest.testChangeCardStatus(CouponTest.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:73)
    at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:83)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
    at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
    at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: com.caucho.hessian.io.HessianProtocolException: expected integer at 0x74 java.util.ArrayList ([com.alibaba.fastjson.JSONObject, message, 失败,请求参数错误, status])
  [M] t [\x00\x1fcom.alibaba.fastjson.JSONObject\x07message\x0b\xe6\xa0\xb8\xe9\x94\x80\xe5\xa4\xb1\xe8\xb4\xa5,\xe8\xaf\xb7\xe6\xb1\x82\xe5\x8f\x82\xe6\x95\xb0\xe9\x94\x99\xe8\xaf\xaf\x06status\x011zz]
    at com.caucho.hessian.io.Hessian2Input.error(Hessian2Input.java:2943)
    at com.caucho.hessian.io.Hessian2Input.expect(Hessian2Input.java:2880)
    at com.caucho.hessian.io.Hessian2Input.readInt(Hessian2Input.java:825)
    at com.caucho.hessian.io.Hessian2Input.readType(Hessian2Input.java:2438)
    at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1694)
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:207)
    ... 33 more

2. Analysis


   This error has nothing to do with the service side, you can see information that has been printed out, indicating that the service side has returned a success. It is to call the version and the service side of inconsistencies caused.
   Asked hession version of the service provider, for the 3.1.6 and writing, not before the introduction of a separate hessian bag, with dubbo rpc initialization bean ways.
   Increased reliance.

 <dependency>
    <groupId>com.caucho</groupId>
    <artifactId>hessian</artifactId>
    <version>3.1.6</version>
 </dependency>        
  //原来的bean注入方式
   import com.googlecode.jsonrpc4j.spring.JsonProxyFactoryBean;
   //注入jsonrpc
    @Bean(name = "businessCardService",value = "businessCardService")
    public JsonProxyFactoryBean customerAccountService() {
        JsonProxyFactoryBean factory = new JsonProxyFactoryBean();
        factory.setServiceUrl(bxxxRequestUrl+ BusinessCardService.class.getName());
        factory.setApplicationContext(applicationContext);
        factory.setServiceInterface(BusinessCardService.class);
        return factory;
    }
    //新的
    @Bean(name = "businessCardService", value = "businessCardService")
    public BusinessCardService businessCardService() {
        HessianProxyFactory factory = new HessianProxyFactory();
        BusinessCardService businessCardService = null;
        try {
            businessCardService = (BusinessCardService) factory.create(BusinessCardService.class, bxxxRequestUrl + BusinessCardService.class.getName());
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        return businessCardService;
    }


 
 

Published 115 original articles · won praise 58 · Views 230,000 +

Guess you like

Origin blog.csdn.net/Angry_Mills/article/details/105148041