|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
#1
|
|||
|
|||
|
Hi All --
I am using datasource.addData for the first time (see code below), but am getting an uncaught exception for some reason. I have seen some posts about similar exceptions elsewhere, but nothing on this specific issue that I can find. The line that causes the exception is this one: poTermsDS.addData(newCondition, new DSCallback() { ... Can anyone help/advise? Thanks. IButton saveButton = new IButton("Save"); saveButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { DSRequest req = new DSRequest(); req.setParams(getExtras()); poHeaderValuesManager.saveData(new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { if (response.getStatus()==DSResponse.STATUS_SUCCESS) poHeaderEditWindow.hide(); } }, req); for (ListGridRecord termRecord : getConditionsGrid().getSelection()) { Record newCondition = new Record(); newCondition.setAttribute("PFGP", fileGroupSelect.getValue()); newCondition.setAttribute("PONO", poHeaderValuesManager.getValues().get("HONO")); newCondition.setAttribute("termID", termRecord.getAttribute("id")); if (termRecord.getAttribute("Value") != null) newCondition.setAttribute("Value", termRecord.getAttribute("Value")); DSRequest userUIRequest = new DSRequest(); poTermsDS.addData(newCondition, new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { if (response.getStatus() != RPCResponse.STATUS_SUCCESS) { SC.warn("Error saving PO."); return; } } }, userUIRequest); } } }); 14:12:40.469 [ERROR] [ipgui] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (null): null at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(BrowserChannelServer.java:195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeV oid(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veVoid(JavaScriptHost.java:107) at com.smartgwt.client.data.DataSource.addData(DataSo urce.java) at com.islandpacific.gui.client.PoHeaderCanvas$10.onC lick(PoHeaderCanvas.java:374) at com.smartgwt.client.widgets.events.ClickEvent.disp atch(ClickEvent.java:96) at com.smartgwt.client.widgets.events.ClickEvent.disp atch(ClickEvent.java:1) at com.google.gwt.event.shared.HandlerManager$Handler Registry.fireEvent(HandlerManager.java:65) at com.google.gwt.event.shared.HandlerManager$Handler Registry.access$1(HandlerManager.java:53) at com.google.gwt.event.shared.HandlerManager.fireEve nt(HandlerManager.java:178) at com.smartgwt.client.widgets.BaseWidget.fireEvent(B aseWidget.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMes sagesWhileWaitingForReturn(BrowserChannel.java:171 3) at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(BrowserChannelServer.java:165) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeO bject(ModuleSpace.java:264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.ja va) at com.google.gwt.core.client.impl.Impl.entry0(Impl.j ava:188) at sun.reflect.GeneratedMethodAccessor244.invoke(Unkn own Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMes sages(BrowserChannel.java:1668) at com.google.gwt.dev.shell.BrowserChannelServer.proc essConnection(BrowserChannelServer.java:401) at com.google.gwt.dev.shell.BrowserChannelServer.run( BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:637) |
|
#2
|
|||
|
|||
|
See the FAQ (or the text right next to where you enter your post) - you should be able to get a JavaScript stack trace for this which will much more clearly point to the problem.
|
|
#3
|
|||
|
|||
|
Where exactly in the Developer Console can I find this stack trace? What tab/option, etc?
|
|
#4
|
|||
|
|||
|
The first tab (Results). Extensive information on this is available in the FAQ, again also linked from just to the right of where you type in your post (the link text is "stack trace").
|
|
#5
|
|||
|
|||
|
Thanks for the guidance. There is not really a stack trace there from what I see (hence my earlier confusion). I set the logging level down to debug to get anything, and this is what appears:
16:41:07.077:MUP2:DEBUG:EventHandler:Event 'mouseUp' bubbled to top 16:41:07.156:MUP2:INFO:cacheAllData:IPPOCON:fetchi ngClientOnlyData: useTestDataFetch is false 16:41:07.158:MUP2:DEBUG:DataSource:IPPOCON:Outboun d DSRequest: {operationType: "add", dataSource: "IPPOCON", data: Obj, callback: anonymous(), requestId: "IPPOCON$62776", bypassCache: true, showPrompt: true} 16:41:13.399:BLR3:DEBUG:nativeFocus:onblur fired on: [IButton ID:isc_IButton_20] 16:41:13.400:BLR3:DEBUG:visualState:isc_IButton_20 :state changed to: stretchImgButton 16:41:13.400:BLR3:INFO:IButton:isc_IButton_20:call to deprecated setClassName() property - use setStyleName() instead I still see an exception in the Development Mode tab in Eclipse. Same as before: 16:49:45.172 [ERROR] [ipgui] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (null): null at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(BrowserChannelServer.java:195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeV oid(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veVoid(JavaScriptHost.java:107) at com.smartgwt.client.data.DataSource.addData(DataSo urce.java) at com.islandpacific.gui.client.PoHeaderCanvas$10.onC lick(PoHeaderCanvas.java:377) at com.smartgwt.client.widgets.events.ClickEvent.disp atch(ClickEvent.java:96) at com.smartgwt.client.widgets.events.ClickEvent.disp atch(ClickEvent.java:1) at com.google.gwt.event.shared.HandlerManager$Handler Registry.fireEvent(HandlerManager.java:65) at com.google.gwt.event.shared.HandlerManager$Handler Registry.access$1(HandlerManager.java:53) at com.google.gwt.event.shared.HandlerManager.fireEve nt(HandlerManager.java:178) at com.smartgwt.client.widgets.BaseWidget.fireEvent(B aseWidget.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMes sagesWhileWaitingForReturn(BrowserChannel.java:171 3) at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(BrowserChannelServer.java:165) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeO bject(ModuleSpace.java:264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.ja va) at com.google.gwt.core.client.impl.Impl.entry0(Impl.j ava:188) at sun.reflect.GeneratedMethodAccessor592.invoke(Unkn own Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMes sages(BrowserChannel.java:1668) at com.google.gwt.dev.shell.BrowserChannelServer.proc essConnection(BrowserChannelServer.java:401) at com.google.gwt.dev.shell.BrowserChannelServer.run( BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:637) |
|
#6
|
|||
|
|||
|
I started getting the same exception in another part of our application, so on a lark I switched from Firefox to Safari to see if the see if the same thing happened, and was surprise when it did not. Could this kind of javacript exception be browser specific?
|
|
#7
|
|||
|
|||
|
Not really, but overall your results aren't making much sense.
The FAQ tells you to use Internet Explorer to get stack traces. Did you do that? |
|
#8
|
|||
|
|||
|
I run everything on Mac normally, so it took a bit to get everything set up for use with Internet Explorer. IE 7, BTW, produced a stack space overflow at line 0 right from the get go. But after upgrading to IE 8, I was able to get the app loaded, but like with Safari, the error did not occur.
The good news is that problem seems to have been fixed now by a fresh GWT compile. I can now run the app as before with no Javascript/null errors in Firefox. Thanks for the follow up on my earlier posts. |