Announcement

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

    SmartGwt 3.0 LGPL javascript error

    Hi guys

    I downloaded the latest version of SmartGwt and replaced the jar in my project. Besides some small conflicts with some CloseEvents nothing to be noticed. But when i tried to submit new data to a datasource via a dynamic form i get a javascript error (NPE).

    updateAssignmentForm.submit(); - this is the code that raises the exception which in the same project but with SmartGwt 2.5 version works as expected. I tried running the same application (with 3.0 version) in IE and Chrome and it works with no errors.
    In FF 8.0.1 i haven't tried because there is no GWT plugin for this version.

    After replacing the jar i cleared all the cached from my IDE and FF and run a new GWT compile. The error still persists.

    SmartGwt: 3.0 LGPL
    Browser: Firefox 3.6

    Code:
    com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
        at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
        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:213)
        at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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:292)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
        at java.lang.Thread.run(Thread.java:662)
    Caused by: com.google.gwt.core.client.JavaScriptException: (null): null
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at com.smartgwt.client.widgets.form.DynamicForm.submit(DynamicForm.java)
        at com.sbs.jpm.gwt.client.ui.CustomWindow.save(CustomWindow.java:246)
        at com.sbs.jpm.gwt.client.ui.CustomWindow.access$1(CustomWindow.java:233)
        at com.sbs.jpm.gwt.client.ui.CustomWindow$2.onClick(CustomWindow.java:83)
        at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:96)
        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.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
        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:213)
        at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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:292)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
        at java.lang.Thread.run(Thread.java:662)

    Thank you

    #2
    I receive on start the following exception:

    Code:
    onModuleLoad() threw an exception
    Exception while loading module com.uds.webadmin.client.GWebAdmin. See Development Mode for details.
    
    java.lang.reflect.InvocationTargetException
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:601)
    	at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
    	at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    	at java.lang.Thread.run(Thread.java:722)
    Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'create' of undefined
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    	at com.smartgwt.client.widgets.toolbar.ToolStripButton.create(ToolStripButton.java)
    	at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:361)
    	at com.smartgwt.client.widgets.layout.Layout.addMember(Layout.java:1129)
    	at com.smartgwt.client.widgets.toolbar.ToolStrip.addButton(ToolStrip.java:385)
    	at com.uds.webadmin.client.GWebAdmin.createMainToolBar(GWebAdmin.java:226)
    	at com.uds.webadmin.client.GWebAdmin.initGUI(GWebAdmin.java:127)
    	at com.uds.webadmin.client.GWebAdmin.onModuleLoad(GWebAdmin.java:110)
    	... 9 more

    Comment


      #3
      andy: make sure you've run a GWT compile and cleared your cache.

      Both of you - if the problem persists, post a stack from the Developer Console (see FAQ for instructions). Always do this for any JavaScript error.

      Comment


        #4
        ok thank you deleting the gwt-cache made it. It works now!!!

        Comment


          #5
          Hi guys,
          I enabled the developer console but it shows no errors regarding to NPE exception. Also the submit() action triggers an update() method for a custom RPC datasource and all that i see in the dev console is:
          Code:
          12:50:14.715:INFO:Log:initialized
          12:50:15.410:WARN:Log:New Class ID: 'EditPane' collides with ID of existing Class object '[DataSource ID:EditPane]'.  Existing object will be replaced.
          This conflict would be avoided by disabling ISC Simple Names mode.  See documentation for further information.
          12:50:24.494:INFO:Log:isc.Page is loaded
          12:50:58.079:MUP0:WARN:Label:isc_Label_38:setImage: image 'undefined' couldn't be found
          12:50:58.397:MUP0[E]:WARN:Log:setTileSize:312,976,5
          And as i mentioned before this problem is persistent only on FF 3.6. Hope this information helps in providing me an answer. Thank you

          Comment


            #6
            I also noticed a strange behavior on smartgwt showcase. When navigating across the tree that contains the showcase examples the cursor position and the selection don't match. Sometimes if i want to expand a node let's say from the position X, the mouse cursor must be at the position X+2 where X is represented by the position of a tree record. This happens on Chrome 15.0

            Comment


              #7
              If you're trying to get a DynamicForm to natively submit like a plain HTML form, since this is almost always a mistake you need to set directSubmit:true, otherwise normal databinding will be used.

              Regarding your original report of an exception, if you think this is a framework bug, please show a minimal, standalone test case that allows the problem to be reproduced.

              If you're talking about an offset problem in the online Showcase in Chrome, please indicate it how it can be reproduced (be detailed).

              Comment


                #8
                Regarding the JS exception (NPE) i am sure that is a framework bug because the same code is working flawless in IE9, Chrome 16.0 but in FF 3.6.24 is throwing this exception. I will post here a test case that reproduces the problem.

                About the showcase strange behavior is very easy to reproduce it. Click here http://www.smartclient.com/smartgwt/showcase/#main and then scroll to the bottom of the example tree and try expanding the Drawing node. You will notice that when positioning the cursor above the + in order to expand the Drawing node the actual selection is one row above and on click the Basics node is expanded instead of the Drawing node. I will attach a screenshot for a better understanding.
                Attached Files

                Comment


                  #9
                  I managed to find out why the showcase was behaving that way. My showcase page was zoomed in a little bit. It is also consistent with zoom out. I managed to reproduce this behavior only in Chrome. In FF and IE everything looks OK.

                  Comment


                    #10
                    Unfortunately, the way some browsers do zoom makes it unsupportable for full, pixel-perfect rendering and interactivity.

                    As far as the JS error, bad usage can lead to browser-specific crashes. Just let us know if you can put together a test case that seems to indicate a framework issue.

                    Comment


                      #11
                      I manage to isolate the problem that causes the JS error and i created a test case and is attached to this reply. The error only occurs when i send embedded data from client to server via a custom GwtRpcDatasource (see class TestRecord and EmbededRecord). Prior to 3.0 version this code was fully functional in all browsers.
                      In order to reproduce the error just select a record from the listgrid, modify its content from the textItem and click the submit button and voila the JS error appears (only in FF 3.6). Hope this test case helps.

                      LE. i think a better word is nested instead of embedded
                      Attached Files
                      Last edited by slick07; 21 Dec 2011, 02:03.

                      Comment

                      Working...
                      X