JSonView not working in 0.9.3... Was working in 0.9.2

2 views
Skip to first unread message

Mario Lim

unread,
Nov 19, 2007, 3:51:06 PM11/19/07
to gwt...@googlegroups.com
Sanjiv et al,
I was using 0.9.2 until recently figuring out the View and
JSonView. I got it to a point where things were working fine. After
dropping 0.9.3, I noticed that the constructor signature changed. The
first parameter changed from Element to String (id). So, I changed it
so that I would pass the Element Id as a String. Now things compiled
but the moment I call any method from JSonView or View (the super
class), I get the following exception:

java.lang.IllegalArgumentException: Can not set
com.google.gwt.core.client.JavaScriptObject field
com.gwtext.client.core.JsObject.jsObj to
com.gwtext.client.widgets.JsonView
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
at java.lang.reflect.Field.get(Field.java:358)
at com.google.gwt.dev.shell.JavaDispatchImpl.getFieldValue(JavaDispatchImpl.java:74)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:161)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:293)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:196)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493)
at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:417)
at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:63)
at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:150)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:468)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:270)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:137)
at com.gwtext.client.widgets.JsonView.filter(JsonView.java:48)
at com.onlineassets.client.widgets.dialog.ImageChooser.createView(ImageChooser.java:199)
at com.onlineassets.client.widgets.dialog.ImageChooser.<init>(ImageChooser.java:64)
at com.onlineassets.client.Chooser$1.onClick(Chooser.java:39)
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.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:150)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:293)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:196)
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.GWTShell.pumpEventLoop(GWTShell.java:689)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:550)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:321)

Any help will be greatly appreciated! THX

Mario Lim

unread,
Nov 19, 2007, 6:57:36 PM11/19/07
to gwt...@googlegroups.com
Well, after some investigation, I think I know what is going on...
The superclass of View changed from com.gwtext.client.core.JsObject to
com.gwtext.client.widgets.BaseExtWidget; however, the native code was
still getting the jsObj from com.gwtext.client.core.JsObject. I did a
global replace in both View and JSonView and things look good. I
don't get the error however a different problem shows... The
implementation in the constructor of View adds the instance to the
rootPanel, but my application is using the JsonView in LayoutDialog
which is in all intents an purposes a dialog box. So whatever I have
in my view is appearing in the main window. To address this I added
back the old constructors for the View and JSonView where the first
parameter is an Element. After the changes above mentioned, my app is
behaving as before...

Sanjiv,
Do you want me to open a Defect on this issue?

Sanjiv Jivan

unread,
Nov 19, 2007, 7:10:10 PM11/19/07
to gwt...@googlegroups.com
Yes, please do.

>         at com.google.gwt.dev.shell.JavaDispatchImpl.getFieldValue (JavaDispatchImpl.java:74)

>         at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:161)
>         at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:293)
>         at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:196)
>         at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
>         at org.eclipse.swt.internal.ole.win32.COM.VtblCall (Native Method)

>         at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
>         at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493)
>         at org.eclipse.swt.ole.win32.OleAutomation.invoke (OleAutomation.java:417)

>         at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:63)
>         at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:150)
>         at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:468)
>         at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:270)
>         at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid (JavaScriptHost.java:137)

>         at com.gwtext.client.widgets.JsonView.filter(JsonView.java:48)
>         at com.onlineassets.client.widgets.dialog.ImageChooser.createView(ImageChooser.java:199)
>         at com.onlineassets.client.widgets.dialog.ImageChooser.<init>(ImageChooser.java:64)
>         at com.onlineassets.client.Chooser$1.onClick(Chooser.java:39)
>         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.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
>         at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke (IDispatchProxy.java:150)

>         at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:293)
>         at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:196)
>         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.GWTShell.pumpEventLoop(GWTShell.java:689)
>         at com.google.gwt.dev.GWTShell.run (GWTShell.java:550)
Reply all
Reply to author
Forward
0 new messages