Issues calling RPC with GWT 2.8 RC1

206 views
Skip to first unread message

nishan...@gmail.com

unread,
Aug 25, 2016, 6:17:06 AM8/25/16
to GWT Users
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

Juan Pablo Gardella

unread,
Aug 25, 2016, 7:06:51 AM8/25/16
to GWT Users
Did you try 2.8 rc2? Which error are you seeing?

--
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-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Thomas Broyer

unread,
Aug 25, 2016, 7:12:11 AM8/25/16
to GWT Users
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.

nishan...@gmail.com

unread,
Aug 28, 2016, 10:59:08 PM8/28/16
to GWT Users
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

nishan...@gmail.com

unread,
Aug 28, 2016, 11:07:09 PM8/28/16
to GWT Users
I did not try Rc2 yet. Is this issue fixed in Rc2, if you know ?

Thanks,
Nishant

On Thursday, August 25, 2016 at 6:06:51 PM UTC+7, Juan Pablo Gardella wrote:
Did you try 2.8 rc2? Which error are you seeing?

On Thu, 25 Aug 2016 at 07:16 <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+unsub...@googlegroups.com.

Thomas Broyer

unread,
Aug 29, 2016, 4:25:31 AM8/29/16
to GWT Users


On Monday, August 29, 2016 at 4:59:08 AM UTC+2, nishan...@gmail.com wrote:
I am using gwt-servlet-2.8 RC1 jar on server too. I get 500 Internal Server Error in Throwable. […] Any suggestion would be of great help to me to nail down this issue.

Have a look at your server logs and/or the full response, you should have a stacktrace somewhere telling you more about the issue. 

nishan...@gmail.com

unread,
Aug 30, 2016, 6:51:27 AM8/30/16
to GWT Users
Hi Thomas,

Thanks for your suggestions. I finally fixed this issue. The issue was that I was adding all jackson mapper code inside bean objects which gwt does not like during response conversion in RPC. I removed that and extracted out to a new factory class used as generic code from every where else to convert json to object and object back to json. This has got the UI running. Again Thanks so much for your suggestions. I appreciate.

-N
Reply all
Reply to author
Forward
0 new messages