Monday, January 15, 2018

Re: Serialization /Incompatible/ classnot found

Hi Collin,
              Hi Collin, I am using SmartGWT with GWT but the rpc call is made using GWT. None of the collections work during this call, its not just the linkedhashmap. Please let me know how do i get you the " http payload" logs for you to dig further.  

Connections is a typo, as you caught right its collections.

am not doing any custom serialization unless you call, implementing the interface IsSerializable. I am trying with my whole project. I am making plenty of calls by passing collections across RPC but only this call is failing. As i said eariler, i started getting this error with the newer version of gwt. I moved from 2.6.1 to 2.8.1. 

Please let me know, which logs you need to dig further

Client Calling code 

navigationServiceAsync.saveUserAlertValue(usrStgyValVO,userId, new AsyncCallback<String>() {
@Override
public void onSuccess(String result) {
destroy();
command.execute();
SmartLoadingPopup.showAlert("Alert Saved !!", result);
}
@Override
public void onFailure(Throwable caught) {
caught.printStackTrace();
//console.log(caught.printStackTrace());
}
});






On Friday, 12 January 2018 17:49:59 UTC-6, Colin Alworth wrote:
Without more details to try breaking this down, it sounds like your server has gone nuts - there are all kinds of reasonable ways that LinkedHashMap can't be sent over the wire, but none of them would result in trying to load a class named "http:". Either there is a fantastic bug inside RPC (and seeing the http payload possibly could help to dig into this), or somehow you have very different classes being passed to the compiler than being used on the server, so they are each handling LinkedHashMap in totally different ways.

With your new reply, can you clarify about "connections datatypes"? Was that a typo, and you meant collections? Assuming that was a typo, without more details I can only imagine that a custom version of GWT is involved.

Are there any classes that end in _CustomFieldSerializer in your project? Can you share the payload and possibly some example code? If you make a very simple application that only tries to serialize one of these Collection/Connection objects, do you get the same error, or does it only happen in your main project?

Feel free to contact me off-list if you want to try sharing some source privately.

--
  Colin Alworth



On Fri, Jan 12, 2018, at 5:00 PM, jeslin...@gmail.com wrote:
Hi Collin,
            Sorry for the delayed response. I started digging into the issue again. Here is the finding. I was sending an Value Object that has collections in it. When i removed all the connections datatypes the error went away. There are other places am passing list and other collection Objects. Is there something that is missing while processing collections ?

On Friday, 8 December 2017 07:22:23 UTC-6, Colin Alworth wrote:
Can you share the string that the client sent to the server for this? It looks as though either something has been done to modify the stream (preemptively read from it once it hit the client? an extra token was written to it? some other customization?) or perhaps a proxy server replaced some string with a url for some reason? There is no reason that a classname should begin with "http:" in the client code.

On Wednesday, December 6, 2017 at 12:20:48 PM UTC-6, jeslin...@gmail.com wrote:
Hi,
   i am getting the below error after i migrated from gwt 2.6.1 to gwt 2.8.1. 

am trying to pass an "LinkedHashMap<String, Object> " object thats causing the trouble. I am getting this issue only during post request. Linkedhashmap is working perfectly with get request. Any help is highly appreciated. Let me know if you need additional info to help me.

I have all the latest Jars (2.8.1) in my classpath "gwt-user, gwt-servlet " 
 
Dec 06, 2017 11:05:08 AM org.apache.catalina.core.ApplicationContext log
SEVERE: navigationService: An IncompatibleRemoteServiceException was thrown while processing this call.
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: java.lang.ClassNotFoundException: http:
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:323)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:263)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.google.gwt.user.client.rpc.SerializationException: java.lang.ClassNotFoundException: http:
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:708)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:612)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.google.gwt.user.client.rpc.core.java.util.Arrays$ArrayList_CustomFieldSerializer.instantiate(Arrays.java:57)
at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiate(Arrays.java:66)
at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiateInstance(Arrays.java:106)
at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiateInstance(Arrays.java:39)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instantiate(ServerSerializationStreamReader.java:1088)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:682)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
at com.google.gwt.user.server.rpc.core.java.util.Map_ServerCustomFieldSerializerBase.deserialize(Map_ServerCustomFieldSerializerBase.java:38)
at com.google.gwt.user.server.rpc.core.java.util.LinkedHashMap_ServerCustomFieldSerializer.deserialize(LinkedHashMap_ServerCustomFieldSerializer.java:41)
at com.google.gwt.user.server.rpc.core.java.util.LinkedHashMap_ServerCustomFieldSerializer.deserializeInstance(LinkedHashMap_ServerCustomFieldSerializer.java:55)
at com.google.gwt.user.server.rpc.core.java.util.LinkedHashMap_ServerCustomFieldSerializer.deserializeInstance(LinkedHashMap_ServerCustomFieldSerializer.java:34)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:884)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:687)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
at com.google.gwt.user.server.rpc.core.java.util.Collection_ServerCustomFieldSerializerBase.deserialize(Collection_ServerCustomFieldSerializerBase.java:38)
at com.google.gwt.user.server.rpc.core.java.util.ArrayList_ServerCustomFieldSerializer.deserialize(ArrayList_ServerCustomFieldSerializer.java:40)
at com.google.gwt.user.server.rpc.core.java.util.ArrayList_ServerCustomFieldSerializer.deserializeInstance(ArrayList_ServerCustomFieldSerializer.java:54)
at com.google.gwt.user.server.rpc.core.java.util.ArrayList_ServerCustomFieldSerializer.deserializeInstance(ArrayList_ServerCustomFieldSerializer.java:33)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:884)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:687)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:149)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:434)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:312)
... 24 more
Caused by: java.lang.ClassNotFoundException: http:
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:634)
... 50 more


--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment