首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >google appengine上的spring httpinvoker错误(org.springframework.remoting.RemoteAccessException)

google appengine上的spring httpinvoker错误(org.springframework.remoting.RemoteAccessException)
EN

Stack Overflow用户
提问于 2013-03-16 23:23:03
回答 1查看 2.4K关注 0票数 0

我一直在尝试在我的google appengine账户上设置一个基于httpinvoker的服务器。我遵循了spring文档中的说明,但它似乎不起作用。谁能检查我下面的代码,让我知道哪里出了问题。

我的web.xml:

代码语言:javascript
复制
<servlet>
<servlet-name>remoting</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>remoting</servlet-name>
<url-pattern>/remoting/*</url-pattern>
</servlet-mapping>

我的remoting-servlet.xml

代码语言:javascript
复制
<bean name="/AccountService" class="org.springframework.remoting.httpinvoker.Ht tpInvokerServiceExporter">
<property name="service" ref="accountService"/>
<property name="serviceInterface" value="app.server.AccountService"/>
</bean>

我的客户端xml:

代码语言:javascript
复制
<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.Ht tpInvokerProxyFactoryBean">
<property name="serviceUrl" value="http://<google appid>.appspot.com/remoting/AccountService"/>
<property name="serviceInterface" value="app.server.AccountService"/>
</bean>

我的客户端代码:

代码语言:javascript
复制
public static void main(String[] args) throws Exception {
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("springClientConfig .xml");
AccountService testService = (AccountService) applicationContext.getBean("httpInvokerProxy");
String retVal = testService.getAccounts("test");
System.out.println(retVal);
}

我在http://googleappId.appspot.com/remoting/AccountService;上不断收到异常(org.springframework.remoting.RemoteAccessException):无法访问HTTP调用器远程服务嵌套异常为java.io.IOException:未收到成功的HTTP响应:状态代码= 500,状态消息=内部服务器错误

EN

回答 1

Stack Overflow用户

发布于 2013-06-22 11:19:50

检查app.server.AccountService是否是一个类或接口,它应该是一个接口,如果它是一个类,就会发生500。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15450993

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档