On Wednesday, June 26, 2013 7:54:13 AM UTC+2, RobV wrote:
I am working on a large application (greater than 500K lines of code) written using GWT. I am working on new screen for the application, and have come across a problem with the code splitting as follows:
- The code works successfully when run in Development Mode.
- The code fails with a ClassCastException (stack trace below) when the code is compiled to javascript and run within the browser.
- If I create the class directly (not using GWT.runAsync()), the problem does not occur.
- I have attempted to create a simple testcase to demonstrate the problem, but when I do this the problem no longer occurs.
- The ClassCastException occurs within a custom widget that was developed for this application, and is used in hundreds of other places in the application without any similar problems.
- Due to the size of the application, code splitting is used extensively.
A stack trace of the error is as follows (compiled with -style DETAILED)java.lang.ClassCastException: at Unknown.java_lang_ClassCastException_ ClassCastException__V(Unknown Source) at Unknown.com_google_gwt_lang_ Cast_dynamicCast__Ljava_lang_ Object_2ILjava_lang_Object_2( Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_ui_DetScrollableGrid_$ calculateDimensions__Lau_edu_ wa_eddept_irt_client_ui_ DetScrollableGrid_2V(Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_ui_DetScrollableGrid_$ refreshData__Lau_edu_wa_ eddept_irt_client_ui_ DetScrollableGrid_2V(Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_ui_ SortableDetScrollableGrid_$ sort__Lau_edu_wa_eddept_irt_ client_ui_ SortableDetScrollableGrid_2V( Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_ui_ SortableDetScrollableGrid_$ setDisplayData__Lau_edu_wa_ eddept_irt_client_ui_ SortableDetScrollableGrid_ 2Ljava_util_List_2V(Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_panel_search_ StudentSearchDialog$ AsyncCallbackDoStudentSearch_$ onSuccess__Lau_edu_wa_eddept_ irt_client_panel_search_ StudentSearchDialog$ AsyncCallbackDoStudentSearch_ 2Lau_edu_wa_eddept_irt_client_ rpc_Dispatch_2V(Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_panel_search_ StudentSearchDialog$ AsyncCallbackDoStudentSearch_ onSuccess__Ljava_lang_Object_ 2V(Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_rpc_ SecuredAsyncCallback_$ onSuccess__Lau_edu_wa_eddept_ irt_client_rpc_ SecuredAsyncCallback_2Lau_edu_ wa_eddept_irt_client_rpc_ Dispatch_2V(Unknown Source) at Unknown.au_edu_wa_eddept_irt_ client_rpc_ SecuredAsyncCallback_ onSuccess__Ljava_lang_Object_ 2V(Unknown Source) at Unknown.com_google_gwt_user_ client_rpc_impl_ RequestCallbackAdapter_$ onResponseReceived__Lcom_ google_gwt_user_client_rpc_ impl_RequestCallbackAdapter_ 2Lcom_google_gwt_http_client_ Request_2Lcom_google_gwt_http_ client_Response_2V(Unknown Source) at Unknown.com_google_gwt_http_ client_Request_$ fireOnResponseReceived__Lcom_ google_gwt_http_client_ Request_2Lcom_google_gwt_http_ client_RequestCallback_2V( Unknown Source) at Unknown.com_google_gwt_http_ client_RequestBuilder$1_ onReadyStateChange__Lcom_ google_gwt_xhr_client_ XMLHttpRequest_2V(Unknown Source) at Unknown.this$static. onreadystatechange<(Unknown Source) at Unknown.com_google_gwt_core_ client_impl_Impl_apply__Ljava_ lang_Object_2Ljava_lang_ Object_2Ljava_lang_Object_ 2Ljava_lang_Object_2(Unknown Source) at Unknown.com_google_gwt_core_ client_impl_Impl_entry0__ Ljava_lang_Object_2Ljava_lang_ Object_2Ljava_lang_Object_ 2Ljava_lang_Object_2(Unknown Source) at Unknown.anonymous(Unknown Source) at Unknown.anonymous(Unknown Source)
Any suggestions on how I should proceed to find a resolution for this problem?
This is a known issue: https://code.google.com/p/google-web-toolkit/issues/detail?id=7392&q=ClassCastException%20runAsync
Fixed in 'master' if you want to give it a try.
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment