Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    unknown exception thrown on client

    SmartClient Version: v9.1p_2014-09-09/PowerEdition Deployment (built 2014-09-09)
    GWT 2.6.1
    IE-11

    I am seeing an exception thrown on the client (in the browser a pop up appears complaining about JavaScript), and I'm having a difficult time tracking it down. In the Client log it looks like this:
    Code:
    ERROR: 10:09:19.847:WARN:Log:GWT uncaught exceptions have been encountered.  Check the Development Mode console for more details.
    com.smartgwt.client.core.JsObject$SGWT_WARN: 10:09:19.847:WARN:Log:GWT uncaught exceptions have been encountered.  Check the Development Mode console for more details.
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
    	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    	at com.smartgwt.client.util.SC.logWarn(SC.java)
    	at com.smartgwt.client.SmartGwtEntryPoint$1.onUncaughtException(SmartGwtEntryPoint.java:400)
    	at com.google.gwt.core.client.impl.Impl.reportUncaughtException(Impl.java:219)
    	at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:349)
    	at sun.reflect.GeneratedMethodAccessor150.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:71)
    	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    	at java.lang.Thread.run(Thread.java:744)
    ERROR: 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(6805), JavaScript object(493), JavaScript object(8748)]): Invoking an instance method on a null instance
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
    	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:347)
    	at sun.reflect.GeneratedMethodAccessor150.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:71)
    	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    	at java.lang.Thread.run(Thread.java:744)
    In the DevConsole with RPCManager set to debug I see this:
    Code:
    10:09:12.252:TMR8:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    10:09:12.257:TMR8:INFO:RPCManager:sendQueue[2]: 1 RPCRequest(s); transport: xmlHttpRequest; target: http://127.0.0.1:8080/tzw/com.anstca.tz.Main/sc/IDACall?isc_rpc=1&isc_v=v9.1p_2014-09-09&isc_xhr=1
    10:09:12.266:TMR8:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    10:09:12.270:TMR8:DEBUG:RPCManager:XMLHttpRequest POST to http://127.0.0.1:8080/tzw/com.anstca.tz.Main/sc/IDACall?isc_rpc=1&isc_v=v9.1p_2014-09-09&isc_xhr=1 contentType: application/x-www-form-urlencoded; charset=UTF-8 with body -->isc_tnum=2&_transaction=<transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">2</transactionNum><operations xsi:type="xsd:List"><elem xsi:type="xsd:Object"><criteria xsi:type="xsd:Object"><UserID>384</UserID><FactTableID>POF</FactTableID></criteria><operationConfig xsi:type="xsd:Object"><dataSource>pivot_table_report_launcher_list</dataSource><operationType>fetch</operationType><textMatchStyle>exact</textMatchStyle></operationConfig><useStrictJSON xsi:type="xsd:boolean">true</useStrictJSON><appID>builtinApplication</appID><operation>pivot_table_report_launcher_list_fetch</operation><oldValues xsi:type="xsd:Object"><UserID>384</UserID><FactTableID>POF</FactTableID></oldValues></elem></operations></transaction>&protocolVersion=1.0<--
    10:09:16.236:TMR8:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    10:09:16.241:TMR8:INFO:RPCManager:sendQueue[3]: 1 RPCRequest(s); transport: xmlHttpRequest; target: http://127.0.0.1:8080/tzw/com.anstca.tz.Main/sc/IDACall?isc_rpc=1&isc_v=v9.1p_2014-09-09&isc_xhr=1
    10:09:16.250:TMR8:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    10:09:16.254:TMR8:DEBUG:RPCManager:XMLHttpRequest POST to http://127.0.0.1:8080/tzw/com.anstca.tz.Main/sc/IDACall?isc_rpc=1&isc_v=v9.1p_2014-09-09&isc_xhr=1 contentType: application/x-www-form-urlencoded; charset=UTF-8 with body -->isc_tnum=3&_transaction=<transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">3</transactionNum><operations xsi:type="xsd:List"><elem xsi:type="xsd:Object"><criteria xsi:type="xsd:Object"><spcs xsi:nil="true"/><spc xsi:type="xsd:List"><elem>1</elem><elem>2013-07-01</elem><elem>2013-07-31</elem><elem>POF</elem><elem>70:2^682|6:2^ARGENTINA~AUSTRALIA~BELGIUM~BERMUDA~BRAZIL~BRITAIN|16:2^Y</elem><elem></elem><elem>5|6|36|21|26|24|25|28|29|30</elem><elem>16</elem><elem></elem><elem>true</elem><elem>384</elem><elem>2321</elem><elem>682</elem><elem>postTradeEquitiesFactDataSource</elem></spc></criteria><operationConfig xsi:type="xsd:Object"><dataSource>pivot_table_tree_fact_POF_384_682</dataSource><operationType>fetch</operationType><textMatchStyle>exact</textMatchStyle></operationConfig><useStrictJSON xsi:type="xsd:boolean">true</useStrictJSON><appID>builtinApplication</appID><operation>pivot_table_tree_fact_POF_384_682_fetch</operation><oldValues xsi:type="xsd:Object"><spcs xsi:nil="true"/><spc xsi:type="xsd:List"><elem>1</elem><elem>2013-07-01</elem><elem>2013-07-31</elem><elem>POF</elem><elem>70:2^682|6:2^ARGENTINA~AUSTRALIA~BELGIUM~BERMUDA~BRAZIL~BRITAIN|16:2^Y</elem><elem></elem><elem>5|6|36|21|26|24|25|28|29|30</elem><elem>16</elem><elem></elem><elem>true</elem><elem>384</elem><elem>2321</elem><elem>682</elem><elem>postTradeEquitiesFactDataSource</elem></spc></oldValues></elem></operations></transaction>&protocolVersion=1.0<--
    10:09:16.416:TMR8[E]:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    10:09:16.420:TMR8[E]:DEBUG:RPCManager:Grabbed prompt from first request that defined one: Loading...
    10:09:16.425:TMR8[E]:INFO:RPCManager:sendQueue[4]: 1 RPCRequest(s); transport: xmlHttpRequest; target: http://127.0.0.1:8080/tzw/com.anstca.tz.Main/sc/IDACall?isc_rpc=1&isc_v=v9.1p_2014-09-09&isc_xhr=1
    10:09:16.431:TMR8[E]:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    10:09:16.434:TMR8[E]:DEBUG:RPCManager:XMLHttpRequest POST to http://127.0.0.1:8080/tzw/com.anstca.tz.Main/sc/IDACall?isc_rpc=1&isc_v=v9.1p_2014-09-09&isc_xhr=1 contentType: application/x-www-form-urlencoded; charset=UTF-8 with body -->isc_tnum=4&_transaction=<transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">4</transactionNum><operations xsi:type="xsd:List"><elem xsi:type="xsd:Object"><criteria xsi:type="xsd:Object"><clientID>682</clientID><factTableID>POF</factTableID><lastDataPoint>2013-10-31</lastDataPoint><dataSource>postTradeEquitiesFactDataSource</dataSource><dimensionID>1</dimensionID><customStartDate>2013-07-01</customStartDate><customEndDate>2013-07-31</customEndDate></criteria><operationConfig xsi:type="xsd:Object"><dataSource>pivot_table_time_frame</dataSource><operationType>fetch</operationType><textMatchStyle>startsWith</textMatchStyle></operationConfig><startRow xsi:type="xsd:long">0</startRow><endRow xsi:type="xsd:long">75</endRow><componentId>isc_PickListMenu_0</componentId><useStrictJSON xsi:type="xsd:boolean">true</useStrictJSON><appID>builtinApplication</appID><operation>pivot_table_time_frame_fetch</operation><oldValues xsi:type="xsd:Object"><clientID>682</clientID><factTableID>POF</factTableID><lastDataPoint>2013-10-31</lastDataPoint><dataSource>postTradeEquitiesFactDataSource</dataSource><dimensionID>1</dimensionID><customStartDate>2013-07-01</customStartDate><customEndDate>2013-07-31</customEndDate></oldValues></elem></operations></transaction>&protocolVersion=1.0<--
    
    10:09:19.847:WARN:Log:GWT uncaught exceptions have been encountered.  Check the Development Mode console for more details.
    
    
    10:09:19.872:TMR7:INFO:RPCManager:transaction 2 arrived after 7598ms
    10:09:19.876:TMR7:DEBUG:RPCManager:Result string for transaction 2: "//isc_RPCResponseStart-->[{"affectedRows":0,"data":[{"productCode":"WZG","productName":"Equity Post Trade","reportName":"History, Side and Cap Report","reportID":5},{"productCode":"WZG","productName":"Equity Post Trade","reportName":"Market, Trader, Broker, Manager Report /BP","reportID":6}],"endRow":2,"invalidateCache":false,"isDSResponse":true,"operationType":"fetch","queueStatus":0,"startRow":0,"status":0,"totalRows":2}]//isc_RPCResponseEnd"
    10:09:19.881:TMR7:INFO:RPCManager:rpcResponse(custom)[rpc]: result: 2 records[status=0]
    10:09:19.899:TMR8:INFO:RPCManager:transaction 4 arrived after 3460ms
    10:09:19.902:TMR8:DEBUG:RPCManager:Result string for transaction 4: "//isc_RPCResponseStart-->[{"affectedRows":0,"data":[{"Caption":"       ","MaxDate":"1900-01-01","MinDate":"1900-01-01","ValueKey":-99},{"Caption":"Latest Month (2013-10-01 - 2013-10-31)","MaxDate":"2013-10-31","MinDate":"2013-10-01","ValueKey":12},{"Caption":"Latest Quarter (2013-10-01 - 2013-12-31)","MaxDate":"2013-12-31","MinDate":"2013-10-01","ValueKey":13},{"Caption":"Year To Date (2014-01-01 - 2014-10-02)","MaxDate":"2014-10-02","MinDate":"2014-01-01","ValueKey":7},{"Caption":"Last Month (2014-09-01 - 2014-09-30)","MaxDate":"2014-09-30","MinDate":"2014-09-01","ValueKey":4},{"Caption":"Last Quarter (2014-07-01 - 2014-09-30)","MaxDate":"2014-09-30","MinDate":"2014-07-01","ValueKey":5},{"Caption":"Custom Date (2013-07-01 - 2013-07-31)","MaxDate":"2013-07-31","MinDate":"2013-07-01","ValueKey":0}],"endRow":7,"invalidateCache":false,"isDSResponse":true,"operationType":"fetch","queueStatus":0,"startRow":0,"status":0,"totalRows":7}]//isc_RPCResponseEnd"
    10:09:19.907:TMR8:INFO:RPCManager:rpcResponse(pivot_table_time_frame_fetch)[fetch]: result: 7 records[status=0]
    10:09:19.916:TMR9:INFO:RPCManager:transaction 3 arrived after 3657ms
    10:09:19.920:TMR9:DEBUG:RPCManager:Result string for transaction 3: "//isc_RPCResponseStart-->[{"affectedRows":0,"data":[{"bAVWAPBP":-6.992438067151566,"bIVWAPCPS":-1.2767650306969267,"Shares":1997245,"bAVWAPCPS":-2.6062911027291626,"name":"Grand Total","PrinK":74443.30272546387,"bAVWAPK":-52.0540186548233,"bIVWAPK":-25.500124651908873,"cid":"Grand Total","bPlcStrikeBP":-23.43482901259823,"bIVWAPBP":-3.4254424301166617,"bExeStrikeK":136.69069639205932},{"bAVWAPBP":-6.992438067151566,"bIVWAPCPS":-1.2767650306969267,"Shares":1997245,"bAVWAPCPS":-2.6062911027291626,"name":"Y","PrinK":74443.30272546387,"pid":"Grand Total","bAVWAPK":-52.0540186548233,"bIVWAPK":-25.500124651908873,"cid":"Y","bPlcStrikeBP":-23.43482901259823,"bIVWAPBP":-3.4254424301166617,"bExeStrikeK":136.69069639205932}],"endRow":1,"invalidateCache":false,"isDSResponse":true,"queueStatus":0,"startRow":0,"status":0,"totalRows":2}]//isc_RPCResponseEnd"
    10:09:19.925:TMR9:INFO:RPCManager:rpcResponse(custom)[rpc]: result: 2 records[status=0]
    In the DevConsole log above, You an see the warning that says "10:09:19.847:WARN:Log:GWT uncaught exceptions have been encountered. Check the Development Mode console for more details."
    but doesn't give any further details?

    This exception appears to happen after I make this call
    Code:
    treeDataSource.fetchData(criteria, new TreeGridInitDSCallback());
    I have a break point set inside on the first line of the TreeGridInitDSCallback() and the exception happens before that break point it hit? It appears to be happening after the fetch and before the DSCallback?
    Last edited by JLivermore; 2 Oct 2014, 06:21.

    #2
    Have you checked the Development Mode console for details?

    You might be confused:

    1. SmartGWT ships with the Developer Console

    2. inside Eclipse when launching GWT in Development Mode there is a "Console" tab where GWT reports errors

    The logs are referring you to #2.

    See also the FAQ: when you see a JavaScript error you should try to track it down by running in *compiled mode* (see the FAQ for details).

    Finally see also the Debugging topic in JavaDoc, which gives a bunch of advice about different ways to get clear error information.

    Comment


      #3
      The first log above was from the Development Console (from the IDE). The second one was from the SmartClient Developer Console under the Results tab.

      I will read the docs further as you pointed out.

      Comment


        #4
        In compiled mode, I do not see any errors in the log or any browser pop-up. Its as if that error did not exist?

        Comment


          #5
          That is indeed possible, if you've had the misfortune to encounter a bug in GWT's Development Mode.

          We're taking a close look at the stack trace to see if we can suggest ways to beat more information out of GWT.

          Another available approach on your end is to try to isolate this to a test case we can run.

          Comment


            #6
            I'm trying to isolate the issue in my code by examining changes I have made. My fields are not being setup correctly in the Grid, so I suspect it may be something to do in that part of my code.

            I'll get back once I figured it out, perhaps the error will go away when I get my field issue straightened out.

            Comment


              #7
              I got my field issue resolved, so I don't think that was the cause. Let me see if I can isolate this to a stand alone test case.

              Comment


                #8
                What is the best approach to create a stand alone test case that involves a custom data source? Do you want all the parts on the server side too? Because our environment is pretty big and complex with big data behind it?

                Comment


                  #9
                  The Debugging overview provides a lot of advice on the best way to prepare standalone test cases starting from an application.

                  Comment


                    #10
                    thanks for the link

                    Comment


                      #11
                      Just to follow up - after discussing this stack trace internally we're don't really have any new theories. It's very mysterious that there's a complete lack of GWT Java or JavaScript calls on the stack, and this may well turn out to be a core GWT bug.

                      Anyway, if you are able to replicate this in a test case, we'll be able dig deeper.
                      Last edited by Isomorphic; 2 Oct 2014, 15:23.

                      Comment


                        #12
                        Thanks for following up. The stack trace is very strange.

                        I'm looking at one of the examples distributed with the 4.x release to see if I can replicate the issue in a test case.
                        Last edited by JLivermore; 3 Oct 2014, 04:14.

                        Comment

                        Working...
                        X