Announcement

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

    Hilite error while using Google GWT Plugin Development Mode

    Hi,

    I deployed an application based on SmartGWT 2.4 in a tomcat and started in Eclipse the Development Mode from Eclipse Google GWT Plugin (using the external server feature).
    The application doesn't start and I receive an error that you can see below because of the code I mentioned in the sample code part.
    If a remove the " grid.setHilites" line then the application starts well.
    Also the application starts well if I'm not using the Development Mode from the Google plugin.

    Do you know where the problem is? In SmartGWT/SmartClient libraries or in Google Plugin?
    Do you have any suggestions how to solve it to be able to continue using the Development Mode of Google Plugin?

    Thanks,
    Mihnea

    Environment:
    ------------
    SmartGWT 2.4 Enterprise Eval
    SmartClient 8.0
    Firefox 3.6.15
    Web application deployed in tomcat 6.0.32
    Development Mode using Eclipse Google GWT Plugin (GWT 2.2.0)

    Error:
    -----
    14:29:40.177 [ERROR] [showcase] Unable to load module entry point class com.company.gwt.app.client.Showcase (see associated exception for details)

    com.google.gwt.core.client.JavaScriptException: (TypeError): _3 is undefined
    fileName: http://127.0.0.1:8080/app/showcase/sc/modules/ISC_Core.js?isc_version=8.0.js
    lineNumber: 3517
    stack: isc_Canvas_applyHilites()@http://127.0.0.1:8080/app/showcase/sc/modules/ISC_Core.js?isc_version=8.0.js:3517
    isc_Canvas__setupHilites([object Array])@http://127.0.0.1:8080/app/showcase/sc/modules/ISC_Core.js?isc_version=8.0.js:3516
    isc_Canvas_setHilites([object Array])@http://127.0.0.1:8080/app/showcase/sc/modules/ISC_Core.js?isc_version=8.0.js:3512
    ([object GWTJavaObject])@http://127.0.0.1:8080:266
    @:0
    ([object GWTJavaObject],1048999)@http://127.0.0.1:8080/app/showcase/hosted.html?showcase:56
    ()@http://127.0.0.1:8080:226
    @:0
    ([object GWTJavaObject],1049035)@http://127.0.0.1:8080/app/showcase/hosted.html?showcase:56
    ()@http://127.0.0.1:8080:5
    @:0
    ([object GWTJavaObject],1048987)@http://127.0.0.1:8080/app/showcase/hosted.html?showcase:56
    ()@http://127.0.0.1:8080:267
    connect("http://127.0.0.1:8080/app/portal.html?gwt.codesvr=127.0.0.1:9997#doc_risk_search_x","d8EQq{CV:DUgK}K!","127.0.0.1:9997","showcase","2.1")@:0
    ((void 0),"showcase","http://127.0.0.1:8080/app/showcase/",0)@http://127.0.0.1:8080/app/showcase/hosted.html?showcase:281
    B()@http://127.0.0.1:8080/app/showcase/showcase.nocache.js:2
    (6)@http://127.0.0.1:8080/app/showcase/showcase.nocache.js:14

    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
    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.BaseWidget.draw(BaseWidget.java)
    at com.company.gwt.app.client.Showcase.onModuleLoad(Showcase.java:186)
    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.ModuleSpace.onLoad(ModuleSpace.java:396)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
    at java.lang.Thread.run(Thread.java:662)


    Sample code:
    -------------
    ListGrid grid;
    ...
    // set hilites
    Hilite [] hilites = getResultGridHilites();
    if (hilites != null && hilites.length > 0) {
    grid.setHilites(hilites);
    }

    #2
    This suggests applying hilites to a grid before it has either fields or a DataSource.

    Comment


      #3
      Originally posted by Isomorphic
      This suggests applying hilites to a grid before it has either fields or a DataSource.
      But the grid hilites work well when the application is deployed in tomcat without starting the Development Mode from the Google GWT plugin.

      Comment


        #4
        Sorry, there's really no realistic way for the GWT plugin to cause this effect.

        It seems more likely that you are accidentally running two different versions of the code, or that some other difference exists between the two environments (eg data). This is what we would recommend investigating.

        Comment


          #5
          Adding grid.setFields(...) before setting the hilites has solved the problem. The datasource was already set, but not the fields.
          Interesting why only in Development Mode was not working.
          Thanks

          Comment


            #6
            I saw this thread and wanted to confirm this behavior. If I remove the setHilites call then it will populate the table by simply calling setDataSource on the ListGrid.

            However, if I added the call to setHilites then it fails with the error described below. I then have to add a call setFields (along with the code to get the fields I want) on the ListGrid before the call to setHilites. At this point the table appears properly with the hilites.

            I am also running in Development mode.

            It looks like there may be a small bug here.

            Comment


              #7
              We've modified the source such that calling 'setHilites' before a grid has been initialized (and before a call to 'setFields()') should no longer cause this error. The change will show up in nightly builds going forward.
              Regards
              Isomorphic Software

              Comment


                #8
                Note also: this had nothing to do with compiled mode vs development mode, it was simply order of API calls. The original poster's app was probably calling the APIs in a different order in compiled vs development mode due to difference in network or database speed affecting which code ran first.

                Comment

                Working...
                X