Announcement

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

    Help with BatchUploader JS exception needed

    Hi Isomorphic,

    using v5.1p_2017-08-02 I get this Dev Mode exception in FF26. Can you tell me what it is complaining about?
    Code:
    18:22:42.510 [ERROR] [lms] 18:22:42.499:XRP5:WARN:Log:Uncaught JavaScript exception: TypeError: _13 is null in http://SERVER/sc/modules/ISC_DataBinding.js?isc_version=v10.1p_2017-08-02.js, line 3507
    
    com.smartgwt.client.core.JsObject$SGWT_WARN: 18:22:42.499:XRP5:WARN:Log:Uncaught JavaScript exception: TypeError: _13 is null in http://SERVER/sc/modules/ISC_DataBinding.js?isc_version=v10.1p_2017-08-02.js, line 3507
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
        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.invokeNativeVoid(ModuleSpace.java:315)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at com.smartgwt.client.util.SC.logWarn(SC.java)
        at com.smartgwt.client.util.LogUtil.handleOnError(LogUtil.java:35)
        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.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)
    This might be an error I did, but if it is, any pointer is greatly appreciated.
    It happens after hitting "Commit" in the BatchUploader.

    Thank you & Best regards
    Blama

    #2
    This doesn't provide much information.

    Are you getting the same error in compiled mode or Super Dev Mode?

    Same or similar error in any other browser(s)?

    Most other environments would provide more information than this.

    Comment


      #3
      Hi Isomorphic,

      sorry, I missed a server exception that made the whole queue fail and somehow did not notice it.
      Nevertheless there should not be a client error afterwards IMHO. I'll see if I can put together a BuiltInDS based testcase.

      Best regards
      Blama

      Comment


        #4
        Hi Isomorphic,

        I was able to reproduce the error in latest 5.1p BuiltInDS (v10.1p_2017-08-22).
        See the sample from here and add this:

        EmployeesUpload.java (link it as serverObject in employeesUpload.ds.xml):
        Code:
        package com.smartgwt.sample.server.listener;
        
        import javax.servlet.http.HttpServletRequest;
        import javax.servlet.http.HttpServletResponse;
        
        import com.isomorphic.datasource.DSRequest;
        import com.isomorphic.datasource.DSResponse;
        
        public class EmployeesUpload {
        
            public DSResponse add(DSRequest dsRequest, HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception {
                if (dsRequest.getValues().get("Name").toString().contains("Anna"))
                    return new DSResponse().setFailure("Failure");
                else {
                    dsRequest.setValues(dsRequest.getValues().put("EmployeeId", Double.valueOf(Math.random() * 10000).intValue()));
                    return dsRequest.execute();
                }
            }
        }
        TestdataImportEmployees.csv.txt:
        Code:
        Name,ReportsTo,Gender
        Anna Sun,Charles Madigen,female
        Mike Sun,Tamara Kane,male
        Now if you hit "Commit", nothing happens in the client GUI and you get this in the Developer Console log:
        Code:
        16:35:57.433:XRP9:WARN:Log:TypeError: _14 is null
        Stack from error.stack:
            BatchUploader.commit/<() @ builtinds/sc/modules/ISC_DataBinding.js:3506
            [c]Class.fireCallback() @ builtinds/sc/modules/ISC_Core.js:300
            [c]Class.fireCallback() @ builtinds/sc/modules/ISC_Core.js:370
            DataSource.fireResponseCallbacks() @ builtinds/sc/modules/ISC_DataBinding.js:754
            DataSource._completeResponseProcessing() @ builtinds/sc/modules/ISC_DataBinding.js:752
            DataSource._handleSCServerReply() @ builtinds/sc/modules/ISC_DataBinding.js:2569
            [c]Class.fireCallback() @ builtinds/sc/modules/ISC_Core.js:300
            [c]Class.fireCallback() @ builtinds/sc/modules/ISC_Core.js:370
            anonymous() @ builtinds/sc/modules/ISC_DataBinding.js:1756
            $wnd.isc.RPCManager.fireReplyCallback() @ :312
            [c]RPCManager.fireReplyCallbacks() @ builtinds/sc/modules/ISC_DataBinding.js:1763
            [c]RPCManager.performOperationReply() @ builtinds/sc/modules/ISC_DataBinding.js:1754
            RPCManager._performTransactionReply() @ builtinds/sc/modules/ISC_DataBinding.js:1734
            [c]RPCManager.performTransactionReply() @ builtinds/sc/modules/ISC_DataBinding.js:1648
            anonymous() @ builtinds/sc/modules/ISC_Core.js:76
            [c]Class.fireCallback() @ builtinds/sc/modules/ISC_Core.js:300
            [c]Comm.performXmlTransactionReply() @ builtinds/sc/modules/ISC_Core.js:1343
            anonymous() @ builtinds/sc/modules/ISC_Core.js:76
            [c]Class.fireCallback() @ builtinds/sc/modules/ISC_Core.js:300
            Comm._fireXMLCallback() @ builtinds/sc/modules/ISC_Core.js:1322
            Comm.sendXmlHttpRequest/_15() @ builtinds/sc/modules/ISC_Core.js:1330
        
        16:35:57.436:XRP9:WARN:Log:Uncaught JavaScript exception: TypeError: _14 is null in http://127.0.0.1:8888/builtinds/sc/modules/ISC_DataBinding.js, line 3506
        Best regards
        Blama

        Comment


          #5
          Just letting you know that we are working on this. The issue is not exactly reproducible on our side, but there are definitely some issues with how BatchUploader reacts to server failures, so we fix those and get back to you.

          Comment


            #6
            This is fixed and is available in nightly builds since Sep 14 (yesterday).

            Comment

            Working...
            X