Google app引擎/ Restlet组合中的Eofexception

时间:2012-12-04 11:17:41

标签: java google-app-engine restlet

我使用GAE的组合创建了一个宁静的Web服务,客观化了服务器端的持久性和restlet框架。

我设法让一切正常工作:放置新对象,获取,获取整个列表,......当我在Eclipse中使用GAE插件在本地运行时,我的应用程序运行正常。

但是,在将我的应用部署到Google App Engine服务器后,我在获取数据时遇到了EOFException。这是我的客户端代码:

(为了安全省略了服务器名称)

ClientResource con = new ClientResource("http://" + servername + "/sidin/event/1003");
con.setRequestEntityBuffering(true); 
eventres = con.wrap(IEventResource.class);
ev = eventres.retrieve();
System.out.println("DONE getting event");

此代码在本地GAE实例上运行正常,但在将其部署到Google服务器后,我收到以下错误:

Unable to convert a [application/json,UTF-8] representation into an object of class be.ehb.iwt.sidin.appengine.core.Event

java.io.EOFException: No content to map to Object due to end of input
at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2775)
at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909)
at org.restlet.ext.jackson.JacksonRepresentation.getObject(JacksonRepresentation.java:137)
at org.restlet.ext.jackson.JacksonConverter.toObject(JacksonConverter.java:218)
at org.restlet.service.ConverterService.toObject(ConverterService.java:167)
at org.restlet.resource.Resource.toObject(Resource.java:828)
at org.restlet.engine.resource.ClientInvocationHandler.invoke(ClientInvocationHandler.java:240)
at $Proxy7.retrieve(Unknown Source)
at Main.main(Main.java:59)

感谢任何帮助或想法!

0 个答案:

没有答案