|
From: Alexander S. <aso...@gm...> - 2010-12-21 10:15:48
|
Hello, developers!
I've been starting to use GWT recently and used raw OpenLayers during
a long period. Unfortunately, a simple "Hello, world" with
gwt-openlayers doesn't work. Here is the code:
MapWidget mw = new MapWidget("350px", "350px");
mapWidget.getMap();
RootLayoutPanel.get().add(mapWidget);
After the page is loaded the following error output is show:
Exception while loading module my.app.client.App. See Development Mode
for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:636) Caused by:
com.google.gwt.core.client.JavaScriptException: (NOT_FOUND_ERR):
NOT_FOUND_ERR: DOM Exception 8 code: 8
__gwt_ObjectId: 18
INDEX_SIZE_ERR: 1
DOMSTRING_SIZE_ERR: 2
HIERARCHY_REQUEST_ERR: 3
WRONG_DOCUMENT_ERR: 4
INVALID_CHARACTER_ERR: 5
NO_DATA_ALLOWED_ERR: 6
NO_MODIFICATION_ALLOWED_ERR: 7
NOT_FOUND_ERR: 8
NOT_SUPPORTED_ERR: 9
INUSE_ATTRIBUTE_ERR: 10
INVALID_STATE_ERR: 11
SYNTAX_ERR: 12
INVALID_MODIFICATION_ERR: 13
NAMESPACE_ERR: 14
INVALID_ACCESS_ERR: 15
VALIDATION_ERR: 16
TYPE_MISMATCH_ERR: 17
SECURITY_ERR: 18
NETWORK_ERR: 19
ABORT_ERR: 20
URL_MISMATCH_ERR: 21
QUOTA_EXCEEDED_ERR: 22
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
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.dom.client.Node$.appendChild$(Node.java)
at com.google.gwt.layout.client.LayoutImpl.attachChild(LayoutImpl.java:72)
at com.google.gwt.layout.client.Layout.attachChild(Layout.java:420)
at com.google.gwt.layout.client.Layout.attachChild(Layout.java:402)
at com.google.gwt.user.client.ui.LayoutPanel.insert(LayoutPanel.java:191)
at com.google.gwt.user.client.ui.LayoutPanel.add(LayoutPanel.java:134)
at my.app.client.App.onModuleLoad(App.java:36)
... 9 more
GWT version is 2.1.0
IDE is Eclipse 3.5 with GWT plugin for Eclipse
gwt-openlayers-client-0.5.jar is referenced in project options:
Project -> Properties -> Java Build Path -> Libraries
gwt.xml has "inherits" entry "org.gwtopenmaps.openlayers.OpenLayers"
OpenLayers sources is included via remote script in <head> section
--
Regards, Alexander
|