Sunday, August 28, 2016

Re: Issues calling RPC with GWT 2.8 RC1

I am using gwt-servlet-2.8 RC1 jar on server too. I get 500 Internal Server Error in Throwable. Also I have not tried Gwt 2.8 RC2, I just updated to Rc1 for now. Is this issue fixed in Rc2 ? Also I just discovered that issue goes away if I stop using gwt jackson library which I have started using after upgrading the gwt version. We are using gwt-jackson, because we wnat to serialize/deserialize the objects to be used in local storage, this is the code that I have in one of my DTO(bean) :
public class ResourceBundleBean implements LocallyStorable {

private String someString;

public interface ResourceBundleBeanMapper extends ObjectMapper<ResourceBundleBean> {};
@Override
public ObjectMapper getMapper() {
if(resourceBundleBeanMapper == null) {
resourceBundleBeanMapper = GWT.create( ResourceBundleBeanMapper.class );
}
return resourceBundleBeanMapper;
}
}


I get exception when the above class "ResourceBundleBean" is returned from RPC call, and I get "500 Internal Server Error". If I remove the code of "ResourceBundleBeanMapper " and the getMapper method from this class, then it starts working and I get the response correctly from RPC call without any issue. But I need the above code for serialization as I said above. So I am not sure, why gwt-jackson code is causing the RPC to tjrow 500 Internal server error. Any suggestion would be of great help to me to nail down this issue. Thanks so much for your response.

Thanks,
Nishant

On Thursday, August 25, 2016 at 6:12:11 PM UTC+7, Thomas Broyer wrote:
What Throwable do you get in onFailure? Did you update the gwt-servlet.jar on server-side too?
And to answer your question, yes, there have been changes to RPC since 2.7; the protocol should be backwards-compatible but there have also been changes to CustomerFieldSerializers and objects, to the serialization policies wouldn't be the same. But if you use the same version of both GWT and your own code on both client and server sides, then it should work.

On Thursday, August 25, 2016 at 12:17:06 PM UTC+2, nishan...@gmail.com wrote:
Hi,

From our application whenever we make RPC calls, we reach to our remote service and when we return any object successfully back, we get back in onFailure method of "AsyncCallback". The same code use to work with gwt 2.7 and we are trying to migrate our application from 2.7 to 2.8 RC1. Does any one had similar issue with 2.8 RC1 ? Has something chnaged with the way RPC has to be made in 2.8 RC1 ? I'd appreciate any kind of help/suggestion.

Thanks,
Nishant Arya

--
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