PDA

View Full Version : Viewport error GXT 4.0.1 GWT 2.7.0



mrynthom
11 Apr 2016, 8:23 AM
When adding a Viewport to the Rootpanel the following error is thrown.

java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ cannot be cast to java.lang.String
at com.sencha.gxt.widget.core.client.container.Viewport.getOrientation(Viewport.java)
at com.sencha.gxt.widget.core.client.container.Viewport.onAttach(Viewport.java:156)
at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:484)
at com.google.gwt.user.client.ui.Panel.adopt(Panel.java:124)
at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:105)
at

This doesn't effect the view when running in dev mode. This occurs with the sample code too.

CssFloatLayoutContainer container = new CssFloatLayoutContainer();
container.add(new TextField(), new CssFloatLayoutContainer.CssFloatData(1));


Viewport viewPort = new Viewport();
viewPort.setWidget(container);
RootPanel.get().add( viewPort );

gishmo
14 Apr 2016, 9:52 PM
Can#t reproduce the error. Using GWT 2.7.0 & SDM works finde-

mrynthom
15 Apr 2016, 11:50 AM
The full stack trace is
ERROR: (Viewport.java:-1) 2016-04-15 13:47:43,766 [FATAL] Uncaught Exception:


java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ cannot be cast to java.lang.String
at com.sencha.gxt.widget.core.client.container.Viewport.getOrientation(Viewport.java)
at com.sencha.gxt.widget.core.client.container.Viewport.onWindowResize(Viewport.java:170)
at com.sencha.gxt.widget.core.client.Component$3.onExecute(Component.java:1462)
at com.sencha.gxt.core.client.util.DelayedTask$1.run(DelayedTask.java:55)
at com.google.gwt.user.client.Timer.fire(Timer.java:135)
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:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:341)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:222)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
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:299)
at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
at java.lang.Thread.run(Thread.java:745)

It appears to throw a javascript typecast error in a browser debugger, and on the deployment through an appengine server. Locally I am running the gwt plugin. It doesn't seem to effect the outcome of the page, just throws it on every load.