Caused by: com.alibaba.com.caucho.hessian.io.HessianProtocolException: 'org.apache.http.HttpHost' could not be instantiated at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:275) at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:155) at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2067) at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1592) at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1576) at com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:396) ... 33 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:271) ... 38 more Caused by: java.lang.IllegalArgumentException: Host name may not be null at org.apache.http.util.Args.containsNoBlanks(Args.java:81) at org.apache.http.HttpHost.<init>(HttpHost.java:80) at org.apache.http.HttpHost.<init>(HttpHost.java:135) ... 43 more继续
时间: 2023-11-02 09:05:10 浏览: 200
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Transformer异常
5星 · 资源好评率100%
根据错误堆栈跟踪,问题似乎是由于无法实例化`org.apache.http.HttpHost`引发的。这个错误是由于传递给`HttpHost`构造函数的主机名参数为null引起的。
在你的代码中,确保在创建`HttpHost`对象时提供有效的主机名参数。请检查代码中与`HttpHost`相关的部分,并确保在创建`HttpHost`对象时传递了一个非空的主机名。
例如,如果你使用的是`HttpHost`的无参构造函数,可以尝试使用带有主机名参数的构造函数来解决问题。确保主机名参数不为null。
如果问题仍然存在,请提供相关代码片段以供参考,这样我可以更好地帮助你解决问题。
阅读全文