Announcement

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

    Smartgwt 2.1 basic setup problem

    Hi,

    I am having trouble getting started with Smartgwt 2.1 with gwt eclipse plugin. Im using Eclipse 3.5

    I have created a new project using the latest google plugin for eclipse and followed the instructions here to set up Smartgwt:
    http://forums.smartclient.com/showpost.php?p=21720&postcount=5

    Here is my entry point class:
    Code:
    public class Hello implements EntryPoint {
    
    	public void onModuleLoad() {
    	SC.say("hello");
    	}
    }
    When I run the project as a google project and use firefox with this url
    http://127.0.0.1:8888/Hello.html?gwt.codesvr=127.0.0.1:9997

    The basic html with "Web Application Starter Project" shows up but I get the following exception on the server and missing the pop up with "hello". Is there some more steps required for Smartgwt 2.1?

    16:51:59.594 [ERROR] [hello] Unable to load module entry point class com.mycompany.client.Hello (see associated exception for details)
    com.google.gwt.core.client.JavaScriptException: (TypeError): $wnd.isc is undefined
    fileName: http://127.0.0.1:8888
    lineNumber: 182
    stack: ("hello")@http://127.0.0.1:8888:182
    connect("http://127.0.0.1:8888/Hello.html?gwt.codesvr=127.0.0.1:9997","{]d{#G([zS=6x7<@","127.0.0.1:9997","hello","2.0")@:0
    ((void 0),"hello","http://127.0.0.1:8888/hello/")@http://127.0.0.1:8888/hello/hosted.html?hello:264
    z()@http://127.0.0.1:8888/hello/hello.nocache.js:2
    (-8)@http://127.0.0.1:8888/hello/hello.nocache.js:8
    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.invokeNativeVoid(ModuleSpace.java:284)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.util.SC.say(SC.java)
    at com.mycompany.client.Hello.onModuleLoad(Hello.java:27)
    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.ModuleSpace.onLoad(ModuleSpace.java:369)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    at java.lang.Thread.run(Unknown Source)


    Thanks
    Kedaar

    #2
    See the FAQ about setting isomorphicDir.

    Comment


      #3
      screenshots

      Hi,

      Thanks for the quick reply. I think I have the isomorphic dir setup correctly, Ive attached the screenshots.

      Kedaar
      Attached Files

      Comment


        #4
        Hi kedaar,

        i'm a newbie, too, and my first steps (including your error messege) were just the same as yours. I just "solved" that problem and according to your screenshot, it appears, you forgot to import the ISC-scripts. To get rid of that exception, do the following:

        Open your hello.html and add the following lines right beneath the history-iframe line in the body-tag (by the way: the following lines are taken from the index.html of the showcase-example source-code "smartgwt-2.2.zip\smartgwt-2.2\samples\Showcase\war\index.html"):

        <!--include the smartClient-API-->
        <script src='hello/sc/modules/ISC_Core.js'></script>
        <script src='hello/sc/modules/ISC_Foundation.js'></script>
        <script src='hello/sc/modules/ISC_Containers.js'></script>
        <script src='hello/sc/modules/ISC_Grids.js'></script>
        <script src='hello/sc/modules/ISC_Forms.js'></script>
        <script src='hello/sc/modules/ISC_RichTextEditor.js'></script>
        <script src='hello/sc/modules/ISC_Calendar.js'></script>
        <script src='hello/sc/modules/ISC_DataBinding.js'></script>

        In your Hello.java add at least the following import

        import com.smartgwt.client.util.SC;

        and in method "onModuleLoad()" add:

        SC.say("Hello");

        Reload the app and your browser should say, well, "Hello".

        Cheers
        Uwe
        Last edited by winfried78; 21 May 2010, 09:51.

        Comment


          #5
          Hi,

          Search for "Getting started with smartGWT" or something similar and it should return several good blog postings (e.g. http://uptick.com.au/content/create-gwt-project and http://hilloldebnath.byethost3.com/2009/08/29/smartgwt-a-getting-started-guide/).

          Good luck
          Mark

          Comment


            #6
            Have you got a solution for your probleme fir I get exactly the same behavior

            Originally posted by kedaar
            Hi,

            I am having trouble getting started with Smartgwt 2.1 with gwt eclipse plugin. Im using Eclipse 3.5

            I have created a new project using the latest google plugin for eclipse and followed the instructions here to set up Smartgwt:
            http://forums.smartclient.com/showpost.php?p=21720&postcount=5

            Here is my entry point class:
            Code:
            public class Hello implements EntryPoint {
            
            	public void onModuleLoad() {
            	SC.say("hello");
            	}
            }
            When I run the project as a google project and use firefox with this url
            http://127.0.0.1:8888/Hello.html?gwt.codesvr=127.0.0.1:9997

            The basic html with "Web Application Starter Project" shows up but I get the following exception on the server and missing the pop up with "hello". Is there some more steps required for Smartgwt 2.1?

            16:51:59.594 [ERROR] [hello] Unable to load module entry point class com.mycompany.client.Hello (see associated exception for details)
            com.google.gwt.core.client.JavaScriptException: (TypeError): $wnd.isc is undefined
            fileName: http://127.0.0.1:8888
            lineNumber: 182
            stack: ("hello")@http://127.0.0.1:8888:182
            connect("http://127.0.0.1:8888/Hello.html?gwt.codesvr=127.0.0.1:9997","{]d{#G([zS=6x7<@","127.0.0.1:9997","hello","2.0")@:0
            ((void 0),"hello","http://127.0.0.1:8888/hello/")@http://127.0.0.1:8888/hello/hosted.html?hello:264
            z()@http://127.0.0.1:8888/hello/hello.nocache.js:2
            (-8)@http://127.0.0.1:8888/hello/hello.nocache.js:8
            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.invokeNativeVoid(ModuleSpace.java:284)
            at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
            at com.smartgwt.client.util.SC.say(SC.java)
            at com.mycompany.client.Hello.onModuleLoad(Hello.java:27)
            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.ModuleSpace.onLoad(ModuleSpace.java:369)
            at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
            at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
            at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
            at java.lang.Thread.run(Unknown Source)


            Thanks
            Kedaar

            Comment

            Working...
            X