Announcement

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

    After update, JavaScriptException: (TypeError): _4 is null

    Hi,
    I am using a client only datasource with RPC to populate a ListGrid from which I select a row for display and update on a DynamicForm. The grid gets populated, the selected row shows in the form and when I update, the updates posts to the server successfully. However, I am receiving the following exception after the update:

    <code>
    08:24:41.131 [ERROR] [trackmysportsadmin] Uncaught exception escaped
    com.google.gwt.core.client.JavaScriptException: (TypeError): _4 is null
    fileName: http://127.0.0.1:8888/trackmysportsadmin/sc/modules/ISC_DataBinding.js
    lineNumber: 1469
    stack: ([object Object],[object Object],[object Object])@http://127.0.0.1:8888/trackmysportsadmin/sc/modules/ISC_DataBinding.js:1469
    anonymous([object Object],[object Array],[object Object])@http://127.0.0.1:8888/trackmysportsadmin/sc/modules/ISC_Core.js:38
    isc_c_Class_fireCallback("isc_DynamicForm_0.$49z(dsRequest, dsResponse, data)","dsResponse,data,dsRequest",[object Array],[object Object],(void 0))@http://127.0.0.1:8888/trackmysportsadmin/sc/modules/ISC_Core.js:293
    isc_Class_fireCallback("isc_DynamicForm_0.$49z(dsRequest, dsResponse, data)","dsResponse,data,dsRequest",[object Array])@http://127.0.0.1:8888/trackmysportsadmin/sc/modules/ISC_Core.js:389
    isc_DataSource__completeResponseProcessing([object Array],[object Object],[object Object])@http://127.0.0.1:8888/trackmysportsadmin/sc/modules/ISC_DataBinding.js:527
    isc_DataSource_processResponse("isc_SportDataSource_0$6271",[object Object])@http://127.0.0.1:8888/trackmysportsadmin/sc/modules/ISC_DataBinding.js:379
    ("isc_SportDataSource_0$6271",[object GWTJavaObject])@http://127.0.0.1:8888:491
    @:0
    ([object GWTJavaObject],19726337,[object XMLHttpRequest])@http://127.0.0.1:8888/trackmysportsadmin/hosted.html?trackmysportsadmin:56
    ([object Event])@http://127.0.0.1:8888:16
    ((function () {__gwt_makeJavaInvoke(1)(handler, 19726337, _this);}),[object XMLHttpRequest],[object Object])@http://127.0.0.1:8888:40
    @:0
    (null,24,(function () {__gwt_makeJavaInvoke(1)(handler, 19726337, _this);}),[object XMLHttpRequest],[object Object])@http://127.0.0.1:8888/trackmysportsadmin/hosted.html?trackmysportsadmin:56
    ([object Event])@http://127.0.0.1:8888:69
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(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.invokeNativeObject(ModuleSpace.java:264)
    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:188)
    at sun.reflect.GeneratedMethodAccessor48.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:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    at java.lang.Thread.run(Unknown Source)
    </code>

    There do not appear to be any negative effects of this exception other than the big alert box that says something bad has happened :). I was originally running 2.2 and also tried build 1307 with the same results (1309 would not load my app). I am testing with Firefox 3.6.6.

    My guess is that I am doing something wrong, but I am not sure where to start looking. Any assistance would be appreciated.

    Thanks,
    John

    #2
    After pressing on with other issues for several days and running across other issues I have come to the conclusion that the above problem is probably not a SmartGWT issue but is much more likely a GWT hosted mode issue. I can only guess that this is the reason no one responded to my post. I have now come to suspect that any stacktrace that includes classes in any OOPHM related package is likely a hosted mode issue.

    Comment


      #3
      SmartGwt 2.2 / FF 3.6.8

      I'm getting a similar issue that I can't seem to get around. I have a form save operation calling the datasource add:

      form.setSaveOperationType(DSOperationType.ADD);

      The form.saveData() call specifies a Callback to execute after the add happens:

      form.saveData(new DSCallback() {
      public void execute(DSResponse dsResponse, Object o, DSRequest dsRequest)
      {
      ...
      }
      });

      The datasource add code succeeds but the following stack is generated, seemingly, when it tries to invoke the callback defined above:


      [ERROR] com.google.gwt.core.client.JavaScriptException: (TypeError): isc_DynamicForm_1 is null
      [ERROR] fileName: http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js
      [ERROR] lineNumber: 38
      [ERROR] stack: anonymous([object Object],[object Array],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:38
      [ERROR] isc_c_Class_fireCallback("isc_DynamicForm_1.$49z(dsRequest, dsResponse, data)","dsResponse,data,dsRequest",[object Array],[object Object],(void 0))@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:282
      [ERROR] isc_Class_fireCallback("isc_DynamicForm_1.$49z(dsRequest, dsResponse, data)","dsResponse,data,dsRequest",[object Array])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:376
      [ERROR] isc_DataSource__completeResponseProcessing([object Array],[object Object],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_DataBinding.js:527
      [ERROR] isc_DataSource_processResponse("isc_UsersDataSource_0$6272",[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_DataBinding.js:379
      [ERROR] ("isc_UsersDataSource_0$6272",[object GWTJavaObject])@http://localhost:7080:495
      [ERROR] @:0
      [ERROR] ([object GWTJavaObject],13172737,[object XMLHttpRequest])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/hosted.html?org_rhq_enterprise_gui_coregui_CoreGUI:56
      [ERROR] ([object Event])@http://localhost:7080:22
      [ERROR] ((function () {__gwt_makeJavaInvoke(1)(handler, 13172737, _this);}),[object XMLHttpRequest],[object Object])@http://localhost:7080:72
      [ERROR] @:0
      [ERROR] (null,65563,(function () {__gwt_makeJavaInvoke(1)(handler, 13172737, _this);}),[object XMLHttpRequest],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/hosted.html?org_rhq_enterprise_gui_coregui_CoreGUI:56
      [ERROR] ([object Event])@http://localhost:7080:32
      [ERROR]
      [ERROR] at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
      [ERROR] at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
      [ERROR] at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
      [ERROR] at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
      [ERROR] at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      [ERROR] at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
      [ERROR] at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
      [ERROR] at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
      [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
      [ERROR] at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      [ERROR] at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      [ERROR] at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
      [ERROR] at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
      [ERROR] at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
      [ERROR] at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
      [ERROR] at java.lang.Thread.run(Thread.java:619)

      Any ideas?

      Comment


        #4
        The previous poster mentioned it appeared to be a GWT hosted mode issue.

        1. Try it in compiled mode
        2. Try it with another browser
        3. Be sure you're not mixing plain GWT and SmartGWT widget in an invalid way (see the FAQ)
        4. Make sure you aren't calling destroy() on the form before the saving completes.

        Let us know if it's still there after you've looked into all 4 of the above.

        Comment


          #5
          After stepping through the obfuscated javascript I determined that the cause of my problem was that I was returning null from transformRequest. I assumed that it didn't matter since I am handling all the data movement myself. Bad choice on my part. I now return a fixed String from transformRequest in all cases and the problem has been resolved.

          Comment


            #6
            Thanks @Isomorphic.

            Item#4 worked for me.

            "Make sure you aren't calling destroy() on the form before the saving completes."

            Comment

            Working...
            X