Answered: Grid server-side paging is failed in web-mode

Hi All,

Gxt Version-->gxt-2.2.4-gwt22

Grid server-side paging is failed in web-mode but it is working fine in dev-mode in web-mode it throws excepton

SEVERE: data: An IncompatibleRemoteServiceException was thrown while processing this call.
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: java.lang.NoClassDefFoundError: com/google/gwt/core/client/GWTBridge
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:323)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:206)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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.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:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.google.gwt.user.client.rpc.SerializationException: java.lang.NoClassDefFoundError: com/google/gwt/core/client/GWTBridge
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:691)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:567)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:140)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:425)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:312)
... 17 more

This exception is being thrown on the server - there isn't a difference in the server code when you are running in Dev Mode versus compiled Web Mode. So there is some other difference in how you are running in web mode than prod mode.

From this part of your error message, it appears that you are using gwt-servlet.jar version 2.5.0 when running web mode, and either using a 2.4.0 version for dev mode, or adding other jars to the classpath when in dev mode.

As discussed there, there are several fixes: Copy the GWTBridge class into your project, or add requestfactory-server.jar to your WEB-INF/lib/, or update to GWT trunk version, or back off to GWT 2.4.0.

This exception is being thrown on the server - there isn't a difference in the server code when you are running in Dev Mode versus compiled Web Mode. So there is some other difference in how you are running in web mode than prod mode.

From this part of your error message, it appears that you are using gwt-servlet.jar version 2.5.0 when running web mode, and either using a 2.4.0 version for dev mode, or adding other jars to the classpath when in dev mode.

As discussed there, there are several fixes: Copy the GWTBridge class into your project, or add requestfactory-server.jar to your WEB-INF/lib/, or update to GWT trunk version, or back off to GWT 2.4.0.

I am currently using GWT 2.5.1 and GXT 2.3.1 and after deployment I am experiencing java.lang.NoClassDefFoundError: com/google/gwt/core/client/GWTBridge error.

In my opinion GWT team moved GWT and GWTBridge class to new package com.google.gwt.core.shared. GXT team should refactor current version of library and i.e. FastMap implementation should reference com.google.gwt.core.shared package.

Is there any hope for releasing GXT 2.3.1 version compatible with new GWT 2.5.1 codebase?

This issue will affect any GWT library that works with RPC, uses the GWT class, and happens to be compatible with more than just 2.5.0, when the shared version of that class was introduced. To maintain backward compatibility, GXT 2 and 3.0 both point at the .client. version of that class. We can either deliberately break compatibility with GWT 2.2-2.4, or rely on one of the many valid ways to solve this. (requestfactory-server.jar, extend GWTBridge, copy GWTBridge, etc).

GXT 3.1 is being made *only* compatible with GWT 2.6+, which among other things involves using the shared GWT class. GXT 3 is more closely tracking GWT changes, while GXT 2 is compatible with all the way back to GWT 1.7, and introduces a new jar for any binary incompatibility.

We've received surprisingly little negative feedback on this decision, and so for the time being I think we are staying with it - by and large, teams that are still using GXT 2 won't get anywhere near the as much benefit from moving to a newer GWT version than they would from moving to a newer GXT *and* GWT version.