开发者

Problem with GWT 2.4 rc1 RequestFactory on tomcat

开发者 https://www.devze.com 2023-03-25 07:43 出处:网络
We have our gwt application working fine on the development mode with gwt 2.4rc1 but when we deployed on tomcat 6 we get the following exception on the server side when the first requestfactory call i

We have our gwt application working fine on the development mode with gwt 2.4rc1 but when we deployed on tomcat 6 we get the following exception on the server side when the first requestfactory call is made.

java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
    at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:225)
    at com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveRequestFactory(ServiceLayerCache.java:198)
    at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:203)
    at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:127)
    at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
    at com.sample.ads.server.service.AdsRequestFactoryServlet.doPost(AdsRequestFactoryServlet.java:42)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServ开发者_JS百科let.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:76)
    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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    at java.lang.Thread.run(Thread.java:662)

On the client side, 500 (Internal Server Error)


The wire format has changed between GWT 2.3 and 2.4 to support obfuscated (and therefore much shortened) type identifiers. You have a 2.3 client trying to talk to the 2.4 server and there's a bug in the RC1 that makes that case fail in an unhelpful manner. The fix is to recompile your client code against the updated requestfactory code.


In order to have an android app working with google app engine, you must create the App Engine connected Android project in Eclipse with GWT 2.3.0 configurated by default:

Windows -> Preferences -> Google -> Web Toolkit (and not 2.4.0rc1)

If you try change the GWT version from 2.4.0rc1 to 2.3.0 after having created a project, you will always have this error with the android app (web app will work)

0

精彩评论

暂无评论...
验证码 换一张
取 消