SpringMVC整合hessian出现异常

问题描述

SpringMVC整合hessian出现异常

严重: Servlet.service() for servlet spring threw exception
java.net.HttpRetryException: cannot retry due to redirection, in streaming mode
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2338)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1557)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:168)
at com.sun.proxy.$Proxy22.fromCpsReturnVo(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.remoting.caucho.HessianClientInterceptor.invoke(HessianClientInterceptor.java:222)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy23.fromCpsReturnVo(Unknown Source)
at com.pumandai.cps.controller.CpsController.toCpsList(CpsController.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)

客户端配置文件spring-api.xml
配置信息:
<!-- hessian连接服务器接口地址 -->
     <bean id="apiService" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
        <property name="serviceUrl" value="http://192.168.1.57:8082/cms-web/cpsService" />
        <property name="serviceInterface" value="com.hessian.service.CpsService" />
      <!--  新增overloadEnabled属性,并把它的值设置为true,默认是false,则Hessian就能支持方法的重载了。   -->
        <property name="overloadEnabled" value="true" />
    </bean>

        jar:spring 3.2.4.jar hessian 3.1.5.jar
时间: 2025-01-01 17:45:24

SpringMVC整合hessian出现异常的相关文章

springmvc-SpringMVC整合hessian出现异常,求高手解决!!

问题描述 SpringMVC整合hessian出现异常,求高手解决!! 异常信息:严重: Servlet.service() for servlet spring threw exceptionjava.lang.ClassNotFoundException: com.caucho.hessian.client.HessianConnectionException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappCl

pringmvc-求教,SpringMVC整合hessian,客户端找不到服务端的接口类!求配置代码活解决方案!谢谢!

问题描述 求教,SpringMVC整合hessian,客户端找不到服务端的接口类!求配置代码活解决方案!谢谢! 求教,SpringMVC整合hessian,客户端找不到服务端的接口类!求配置代码活解决方案!谢谢!

springmvc-SpringMVC整合hessian客户端出现异常!

问题描述 SpringMVC整合hessian客户端出现异常! 严重: Servlet.service() for servlet spring threw exception com.caucho.hessian.io.HessianProtocolException: ' ' is an unknown code at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:219) at com.sun.proxy.$

springmvc-Springmvc整合hessian客户端抛出异常,求大神指导!急···

问题描述 Springmvc整合hessian客户端抛出异常,求大神指导!急··· 严重: Servlet.service() for servlet spring threw exception java.net.HttpRetryException: cannot retry due to redirection, in streaming mode at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLCo

springmvc-Springmvc整合hessian,客户端抛出异常信息,求大神解决,急···跪求···

问题描述 Springmvc整合hessian,客户端抛出异常信息,求大神解决,急···跪求··· 严重: Servlet.service() for servlet spring threw exception java.net.HttpRetryException: cannot retry due to redirection, in streaming mode at sun.net.www.protocol.http.HttpURLConnection.followRedirect(H

springmvc-SpringMVC整合hessian项目客户端找不到服务端的接口,求教大神啊!!!急!

问题描述 SpringMVC整合hessian项目客户端找不到服务端的接口,求教大神啊!!!急! SpringMVC整合hessian项目客户端找不到服务端的接口,求教大神啊!!!急!

【SpringMVC整合MyBatis】springmvc异常处理-全局异常处理器开发

异常处理 1.异常处理思路 系统中异常包括两类:预期异常和运行时异常RuntimeException,前者通过捕获异常从而获取异常信息,后者主要通过规范代码开发.测试通过手段减少运行时异常的发生.系统的dao.service.controller出现都通过throws Exception向上抛出,最后由springmvc前端控制器交由异常处理器进行异常处理,如下图: springmvc提供全局异常处理器(一个系统只有一个异常处理器)进行统一异常处理. 2.自定义异常类 对不同的异常类型定义异常类

Dubbo与Zookeeper、SpringMVC整合和使用(负载均衡、容错)(转)

 互联网的发展,网站应用的规模不断扩大,常规的垂直应用架构已无法应对,分布式服务架构以及流动计算架构势在必行,Dubbo是一个分布式服务框架,在这种情况下诞生的.现在核心业务抽取出来,作为独立的服务,使前端应用能更快速和稳定的响应.   第一:介绍Dubbo背景              大规模服务化之前,应用可能只是通过RMI或Hessian等工具,简单的暴露和引用远程服务,通过配置服务的URL地址进行调用,通过F5等硬件进行负载均衡. (1) 当服务越来越多时,服务URL配置管理变得非常困难

Dubbo与Zookeeper、SpringMVC整合和使用(负载均衡、容错)(转)

互联网的发展,网站应用的规模不断扩大,常规的垂直应用架构已无法应对,分布式服务架构以及流动计算架构势在必行,Dubbo是一个分布式服务框架,在这种情况下诞生的.现在核心业务抽取出来,作为独立的服务,使前端应用能更快速和稳定的响应.   第一:介绍Dubbo背景              大规模服务化之前,应用可能只是通过RMI或Hessian等工具,简单的暴露和引用远程服务,通过配置服务的URL地址进行调用,通过F5等硬件进行负载均衡. (1) 当服务越来越多时,服务URL配置管理变得非常困难,