等待花开的季节

<< Spring Remoting(1) | 首 页 | Eclipse+tomcat5.5远程调试 >> Spring Remoting HttpInvoker产生异常的解决办法 2008-02-29 Tag: Spring Remoting Invoker产生异常的解决办法 版权声明 :转载时请以超链接形式标明文章原始出处和作者信息及 本声明 http://cmjerry.blogbus.com/logs/16160976.html 1.Exception in thread "main" org.springframework.remoting.RemoteAccessException: Cannot access HTTP invoker remote service at [http://localhost/J2EEDemo/remote/WordProcessorService]; nested exception is java.io.IOException: Did not receive successful HTTP response: status code = 404, status message = [/J2EEDemo/remote/WordProcessorService] Caused by: java.io.IOException: Did not receive successful HTTP response: status code = 404, status message = [/J2EEDemo/remote/WordProcessorService] at org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor.validateResponse(SimpleHttpInvokerRequestExecutor.java:139) at org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor.doExecuteRequest(SimpleHttpInvokerRequestExecutor.java:62) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:134) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:177) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy0.extractChinese(Unknown Source) at cmj.edu.zju.cn.MainApp.main(MainApp.java:38) 2.在服务器端配置一个映射 <bean id="remoteMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/WordProcessorService">/WordProcessorService</prop> </props> </property> </bean> <bean id="WordProcessorService" name="/WordProcessorService" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> <property name="service"> <ref local="wordProcessorBean" /> </property> <property name="serviceInterface"> <value>cmj.edu.zju.cn.IWordProcessor</value> </property> </bean> 上面的映射告诉用什么bean来处理相应的路径 随机文章: Spring Remoting(1) 2008-02-29 Spring的IntroductionInterceptor(2) 2008-02-28 Spring的IntroductionInterceptor 2008-02-27 Spring的切入点Pointcut和Advisor学习 2008-02-27 JDK动态代理(Spring AOP理解的基础) 2008-02-26 收藏到: Del.icio.us 引用地址: cmjerry 发表于 09:20:56 | 编辑 | 继续话题 | 转发 | 推荐 发表评论

原始快照:web.archive.org