Reputation: 14863
I'm creating a XML structure basically like this one: Create XML document on GWT client side (first anser).
It works fine in 99% of the cases but sometimes, after running for a while, it randomly fails with the follwoing messages:
com.google.gwt.dev.shell.HostedModeException: Something other than a short was returned from JSNI method '@com.google.gwt.xml.client.impl.XMLParserImpl::getNodeType(Lcom/google/gwt/core/client/JavaScriptObject;)': JS value of type JavaScript object(2608), expected short at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:154) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeShort(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeShort(JavaScriptHost.java:99) at com.google.gwt.xml.client.impl.XMLParserImpl.getNodeType(XMLParserImpl.java) at com.google.gwt.xml.client.impl.NodeImpl.build(NodeImpl.java:41) at com.google.gwt.xml.client.impl.NodeImpl.appendChild(NodeImpl.java:82)
It's not at the same element but could be at any elment, even after it create 3 of the same kind successfully before.
Is that a known problem and does it only happen in debugg mode?
Upvotes: 0
Views: 189
Reputation: 9910
Seen this error many times, i have feeling it has something to do with how classes are reloaded in GWT dev mode. Never seen it to happen on production mode. There are some other cases when this error can appear(like using window.alert in JSNI), but most of the time it only means that you have to restart dev mode.
Upvotes: 1