Friday, July 1, 2011

Re: FlexTable - removeRow with image widget (cell) causes JavaScriptException

That seems like very odd behavior and an unlikely bug to have crept in without being detected.

It sounds like this started happening after upgrading to a new version of GWT. Make sure you don't have multiple versions of GWT jars on your classpath when running development mode. Also, does it work in production mode? When testing that, make sure you don't have multiple versions of GWT jars on the classpath when running the GWT compiler.
 

-- Brian


On Thu, Jun 30, 2011 at 10:16 PM, stagirus <mohanamasa@gmail.com> wrote:
We use FlexTable to display error messages and clear them later. We
use the following code to achieve this.

FlexTable messages = new FlexTable();
Image image = new Image();
image.setUrl("images/warning.gif");
messages.setWidget(0, 0, image);
messages.setWidget(0 1, status_message);

We remove the messages using:

messages.removeRow(0);

This worked until GWT 2.0.4 release. But starting from GWT 2.2.0, I
get "Unspecified error." Same error also exists in GWT 2.3.0.

The worst part was the error did not indicate the cause or location of
the problem. Try-catch did not catch it either. Given the complexity
of our app, it took several days to find out the cause of the problem.
I guess somebody at GWT team did not get enough sleep during the
recent releases. I hope you guys will fix it soon. Below, please find
the detailed error.

(CustomUnCaughtExceptionHandler.java:44) 2011-06-30 20:06:34,161
[ERROR] CustomExceptionHandler. Message : (Error): Unspecified error.,
Cause : null, LocalizedMessage : (Error): Unspecified error.,
StackTrace : [Ljava.lang.StackTraceElement;@1ed8762
com.google.gwt.core.client.JavaScriptException: (Error): Unspecified
error.
       at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
237)
       at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
       at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
       at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
       at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
       at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
       at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
       at sun.reflect.GeneratedMethodAccessor531.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
103)
       at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
71)
       at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
       at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
281)
       at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
531)
       at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
       at java.lang.Thread.run(Unknown Source)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment