Assertion Error when adding an element to the root panel

44 views
Skip to first unread message

Jan

unread,
Dec 10, 2010, 11:39:28 AM12/10/10
to Google Web Toolkit
Hello Everybody,

In my actual GWT Project, i have a User Interface with different
widgets. Because we continued the project from another person, we were
not able to take the newest GWT Version, so our Application is with
GWT1.7.

Now when i start my application normally, everything works. But as
soon as i start the application in the hosted Mode for debugging, i
get the follogwing error:

[ERROR] Unable to load module entry point class
ch.zhaw.geotagging.web.client.GeoTaggingMain (see associated exception
for details)
java.lang.AssertionError: A widget that has an existing parent widget
may not be added to the detach list
at
com.google.gwt.user.client.ui.RootPanel.detachOnWindowClose(RootPanel.java:
122)
at com.google.gwt.user.client.ui.RootPanel.get(RootPanel.java:197)
at
ch.zhaw.geotagging.web.client.DrivenWay.buildInputForm(DrivenWay.java:
97)
at ch.zhaw.geotagging.web.client.DrivenWay.<init>(DrivenWay.java:43)
at
ch.zhaw.geotagging.web.client.GeoTaggingMain.onModuleLoad(GeoTaggingMain.java:
29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:326)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:
343)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access
$300(BrowserWidgetIE6.java:37)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:
77)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:
161)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:
294)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:
194)
at
org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:
117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at
com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:
264)
at
com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:
557)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

I really need the debugging function, because some stuff is not
working as it should..
The code line in the error report (at
ch.zhaw.geotagging.web.client.DrivenWay.buildInputForm(DrivenWay.java:
97))
is not the first line, where we use the "
RootPanel.get("xx").add(xx);" Method, so i really don't get it, why
the error comes at this line. I searched with google to find some
solution, but i didn't understand, why i have this error..

If somebody has an idea..

Thanks and with best regards.

Jan

Thomas Broyer

unread,
Dec 10, 2010, 2:24:35 PM12/10/10
to google-we...@googlegroups.com
It happens because you try to RootPanel.get(...) an element that's inside another RootPanel or another widget.

Jan

unread,
Dec 11, 2010, 10:00:54 AM12/11/10
to Google Web Toolkit
So the problem is, because i try to access my div "drivenWayContent",
which is subelement of my div "drivenWay"? But how else can i get
access for all the div's which are not on the top level of the
structure?

Jan

unread,
Dec 13, 2010, 6:09:55 PM12/13/10
to Google Web Toolkit
oke, i tried it with the html panel and it seems to work..

thanks for your help..

On 10 Dez., 20:24, Thomas Broyer <t.bro...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages