Announcement

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

    Upgrading to 4.1 (nightly) from old version

    Dear SmartGWT Crew,

    SmartClient Version: SNAPSHOT_v9.1d_2013-10-10/EVAL Deployment (expires 2013.12.09_11.30.14) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)
    Browser: FireFox 24

    We are trying to upgrade to the latest version of SmartGWT from a very old version. For the most part it has gone quiet smoothly. There are few exceptions that I see in DevMode which crashes the app. (Though in production it runs fine.)

    1. Let me start with the stangest one. I have a datasource which uses a 'sequence' as its primary key. The display field is text. I have a databound SelectItem which uses this datasourcce. I have SelectItem widgets elsewhere using a value map that is locally built. In that case both the key and the display text is string and I am able to select the value with a selectValue(<numeric id corresponding to the string key of teh value map>). The list properly displays the label corresponding to the key. I cannot seem to get this behaviour with a databound SelectItem even when I change the sequence key to a text type (to make it just like the local map that works elsewhere). I thought there might be a race condition, so I put the setValue statement in a data arrived handler for the datasource being used, but it still doesnt' work. Setting teh default value(s) also seem to be ignored.
    I noticed a lot of people had similar issues. It would be great to have an example somewhere of exactly this situation that warns (maybe with code comments) of pitfalls that one can easily run into. I must have this working because it's a use case that is very common...
    Any ideas why my selectValue doesn't select the item? In the developer console I see the values coming in. I'm passing it the right code, but still the label doesn't change.

    2. The following is a code snippet that I believe should work because it looks just like your examples:
    final DynamicForm form = new DynamicForm();
    form.setGroupTitle("My Group Ttile");
    //TODO: why can't I do this. SGWT complains of the widget having been already constructed. No way!
    if (GWT.isScript()){
    form.setIsGroup(true);
    }
    If I take the isScript guard off this will crash DevMode.

    The following errors seem harmless enough but they create a lot of noise. I'd like to get rid them:

    3. I get this often. I'm not sure what is causing it and how I can go about fixing it. It doesn't seem to be an issue as far as running the app goes.
    ERROR: 10:49:08.878:WARN:PickList:Use addInterfaceProperties() to add methods to interface [Class PickList]
    com.smartgwt.client.core.JsObject$SGWT_WARN: 10:49:08.878:WARN:PickList:Use addInterfaceProperties() to add methods to interface [Class PickList]
    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:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.util.I18nUtil.initMessages(I18nUtil.java)
    at com.smartgwt.client.util.I18nUtil.init(I18nUtil.java:32)
    at com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:348)
    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:606)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:724)

    4. Is this one related to the previous one. This is another one that seems to come from deep within some library jar. I don't see any of our classes in the stack trace....Why did Ajax fail? The app seems to be running fine.

    ERROR: Ajax call failed.
    com.google.gwt.user.client.rpc.StatusCodeException: 0
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:209)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
    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: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.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:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    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:242)
    at sun.reflect.GeneratedMethodAccessor47.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:724)
    ERROR: Ajax call failed.

    5. Finally when bootstrapping smartgwt in the startup html page, what does this really mean ?isc_version=9.1.js. Don't I already select the version by including teh right jars.

    Thanks in advance for any help. The first one is an actual real problem that can be show-stopper for us. The rest are less critical.

    (Clearly a lot of thought was put into backward compatibility. Most things worked out of the box, despite the fact we upgraded from a very old version.)

    -kornel

    #2
    1. take a look at FormItem.fetchMissingValues - your setValue() call will trigger a fetch against the optionDataSource to fetch the display value. If your optionDataSource is broken and doesn't respond as expected to this fetch, it would have the effect you describe.

    2. this is a very recent regression just reported by another user and already being worked on.

    3. this doesn't look familiar - can you show code that reproduces this?

    4. can't help with this - the entire stack is GWT code not SmartGWT code - the seems to be some kind of GWT Ajax call you are making through core GWT APIs.

    5. the version string is there as a means of avoiding users loading old versions of the SmartGWT when you deploy your new application, just by creating a distinct URL. It has no other effect

    Comment


      #3
      2 is fixed in today's build.

      Comment


        #4
        Thanks!
        -kornel

        Comment


          #5
          #3 is caused by SmartGWT i18nUtil.java

          4.1d LGPL - 2013/11/07

          We're seeing the same warning (WARN:PickList:Use addInterfaceProperties() to add methods to interface [Class PickList]).
          It's caused internally by SmartGWT i18n initialization, when I18nUtil is adding properties to various pickers:

          10:46:56.390 [ERROR] [cloudview1] 10:46:56.390:WARN:PickList:Use addInterfaceProperties() to add methods to interface [Class PickList]
          com.smartgwt.client.core.JsObject$SGWT_WARN: 10:46:56.390:WARN:PickList:Use addInterfaceProperties() to add methods to interface [Class PickList]
          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:571)
          at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299)
          at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
          at com.smartgwt.client.util.I18nUtil.initMessages(I18nUtil.java)
          at com.smartgwt.client.util.I18nUtil.init(I18nUtil.java:32)
          at com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:348)
          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:606)
          at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
          at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
          at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
          at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
          at java.lang.Thread.run(Thread.java:724)
          Last edited by beckyo; 26 Dec 2013, 08:52.

          Comment


            #6
            beckyo's observation about com.smartgwt.client.util.I18nUtil.init(I18nUtil.ja va:32)

            Is there any resolution from Iso on beckyo's observation about com.smartgwt.client.util.I18nUtil.init(I18nUtil.ja va:32) in item #3?

            Comment


              #7
              This has been fixed for builds dated January 29 and later

              Comment


                #8
                Actually, in SGWT 4.1 / SmartClient 9.1, this issue was addressed almost 6 weeks ago.

                So, any build later than December 22 2013 will have the fix.

                Please be sure to test with the latest build from smartclient.com/builds before reporting bugs.

                Comment

                Working...
                X