Hi Isomorphic,
please see this BuiltInDS testcase:
To reproduce:
Start debugging BuiltInDS with "GWT Legacy Development Mode with Jetty"
1. Please empty one of the datasources you want, so that You have a empty table, I used Animals.
2. Select the datasource you want to use from the "grid"
3. If empty, start editing a new row by clicking the New-Button
4. Now You should see the Exception.
After the editing-row shows up this is the exception I get on the DevMode Console:
13:47:36.327 [ERROR] [builtinds] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (String) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object; )([JavaScript object(51149), JavaScript object(50901), JavaScript object(51150)]): Invoking an instance method on a null instance
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
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:291)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:315)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.widgets.grid.ListGrid.startEditingNew(ListGrid.java)
at com.smartgwt.sample.client.AddValueToCategoryButton$AddValueToCategoryButtonClickHandler.onClick(BuiltInDS.java:129)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:124)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
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:291)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
If I enter then the required fields and click out of the grid for saving, this exception shows up:
13:48:45.887 [ERROR] [builtinds] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (String) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object; )([JavaScript object(58376), JavaScript object(50901), JavaScript object(62387)]): Invoking an instance method on a null instance
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
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:291)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
The record gets saved. If I then click again the New-Button neither of those exceptions appear.
Do You know the cause of this problem?
I'm using:
https://forums.smartclient.com/forum...t-mode-devmode
Thanks in advance &
Kind Regards
please see this BuiltInDS testcase:
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.SelectionStyle; import com.smartgwt.client.types.SortArrow; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; import com.smartgwt.client.widgets.grid.events.RecordClickEvent; import com.smartgwt.client.widgets.grid.events.RecordClickHandler; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VStack; import com.smartgwt.client.widgets.viewer.DetailViewer; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class BuiltInDS implements EntryPoint { private ListGrid boundList; private DynamicForm boundForm; private DetailViewer boundViewer; private IButton newBtn; /** * This is the entry point method. */ public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); ListGrid grid = new ListGrid(); grid.setLeft(20); grid.setTop(75); grid.setWidth(130); grid.setLeaveScrollbarGap(false); grid.setShowSortArrow(SortArrow.NONE); grid.setCanSort(false); grid.setFields(new ListGridField("dsTitle", "Select a DataSource")); grid.setData(new ListGridRecord[] { new DSRecord("Animals", "animals"), new DSRecord("Office Supplies", "supplyItem"), new DSRecord("Employees", "employees") }); grid.setSelectionType(SelectionStyle.SINGLE); grid.addRecordClickHandler(new RecordClickHandler() { public void onRecordClick(RecordClickEvent event) { DSRecord record = (DSRecord) event.getRecord(); bindComponents(record.getDsName()); } }); grid.draw(); VStack vStack = new VStack(); vStack.setLeft(175); vStack.setTop(75); vStack.setWidth("70%"); vStack.setMembersMargin(20); boundList = new ListGrid(); boundList.setHeight(200); boundList.setCanEdit(true); vStack.addMember(boundList); boundForm = new DynamicForm(); boundForm.setNumCols(6); boundForm.setAutoFocus(false); vStack.addMember(boundForm); HLayout hLayout = new HLayout(10); hLayout.setMembersMargin(10); hLayout.setHeight(22); newBtn = new AddValueToCategoryButton("New", boundList); hLayout.addMember(newBtn); vStack.addMember(hLayout); boundViewer = new DetailViewer(); vStack.addMember(boundViewer); vStack.draw(); } private void bindComponents(String dsName) { DataSource ds = DataSource.get(dsName); boundList.setDataSource(ds); boundViewer.setDataSource(ds); boundForm.setDataSource(ds); boundList.fetchData(); newBtn.enable(); } } class AddValueToCategoryButton extends IButton { private ListGrid listGrid; public AddValueToCategoryButton(final String title, final ListGrid categoryValueList) { super(title); this.listGrid = categoryValueList; setPrompt(title); setTitle(title); addClickHandler(new AddValueToCategoryButtonClickHandler()); } /** * Start edit new record if possible */ private class AddValueToCategoryButtonClickHandler implements ClickHandler { @Override public void onClick(ClickEvent event) { AddValueToCategoryButton.this.listGrid.startEditingNew(); } } }
Start debugging BuiltInDS with "GWT Legacy Development Mode with Jetty"
1. Please empty one of the datasources you want, so that You have a empty table, I used Animals.
2. Select the datasource you want to use from the "grid"
3. If empty, start editing a new row by clicking the New-Button
4. Now You should see the Exception.
After the editing-row shows up this is the exception I get on the DevMode Console:
13:47:36.327 [ERROR] [builtinds] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (String) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object; )([JavaScript object(51149), JavaScript object(50901), JavaScript object(51150)]): Invoking an instance method on a null instance
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
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:291)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:315)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.widgets.grid.ListGrid.startEditingNew(ListGrid.java)
at com.smartgwt.sample.client.AddValueToCategoryButton$AddValueToCategoryButtonClickHandler.onClick(BuiltInDS.java:129)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:124)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
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:291)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
If I enter then the required fields and click out of the grid for saving, this exception shows up:
13:48:45.887 [ERROR] [builtinds] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (String) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object; )([JavaScript object(58376), JavaScript object(50901), JavaScript object(62387)]): Invoking an instance method on a null instance
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
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:291)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
The record gets saved. If I then click again the New-Button neither of those exceptions appear.
Do You know the cause of this problem?
I'm using:
- Win 10
- Eclipse Java EE IDE for Web Developers, Version: Oxygen.3a Release (4.7.3a)
- GWT 2.8.1
- FF26.0
- SmartClient Version: v12.0p_2019-02-14/PowerEdition Deployment (built 2019-02-14)
https://forums.smartclient.com/forum...t-mode-devmode
Thanks in advance &
Kind Regards
Comment