Announcement

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

    #16
    I think you simply have to create your own .war file without the sc folder. The .war can then be manually uploaded as detailed in the Google App Engine documentation:

    http://code.google.com/appengine/docs/java/gettingstarted/uploading.html

    Let us know how you go! :)

    Comment


      #17
      ... or you can simply exlude 'sc' from the static resources for your app.

      In your appengine-web.xml:

      Code:
          <!-- By default all WAR files are static except WEB-INF  -->
          <!-- This overrides the default -->
          <static-files>
              <!-- Exclude smartgwt files from the list of static files -->
              <exclude path="/sc/**.*" />
              <exclude path="/appdir/sc/**.*" />
          </static-files>
      
          <!-- By default all WAR files are also resource files including WEB-INF  -->
          <!-- This overrides the default -->
          <resource-files>
              <!-- Exclude smartgwt files from the list of resource files -->
              <exclude path="/sc/**.*" />
              <exclude path="/appdir/sc/**.*" />
          </resource-files>
      I'm currently investigating another way to load SC resources:
      http://groups.google.com/group/googl...cce96f5531695f
      Let me know if you can help...

      Comment


        #18
        I am also very much interested in the combination: appengine and SmartGWT

        Comment


          #19
          Ok, I got it. I'll post a step by step approach in a separate thread so we can use it as a reference for future developments...

          Comment


            #20
            here: http://forums.smartclient.com/showth...1329#post21329

            Comment


              #21
              Originally posted by olinsha
              sorry but what is S3 ?
              Amazon: Simple Storage Service
              Wikipedia: Amazon S3
              Last edited by nlotz; 23 Apr 2009, 10:03.

              Comment


                #22
                Hi,

                I have used your idea for my application. So, i add :

                Code:
                <inherits name='com.smartgwt.SmartGwtNoScript' />
                in my app.gwt.xml.

                I change the isomorphicDir to

                Code:
                <script> var isomorphicDir = "http://ouaibou.free.fr/sc/"; </script>
                But when i launch the app, i have the following error :

                Code:
                [ERROR] Unable to load module entry point class fr.unice.client.Gtunes (see associated exception for details)
                com.google.gwt.core.client.JavaScriptException: (TypeError): Result of expression '$wnd.isc' [undefined] is not an object.
                 line: 50
                 sourceId: 258821504
                 sourceURL: jar:file:/Users/laurent/Documents/workspace/Gtunes/war/WEB-INF/lib/smartgwt.jar!/com/smartgwt/client/widgets/BaseWidget.java
                 expressionBeginOffset: 81
                 expressionCaretOffset: 89
                 expressionEndOffset: 101
                	at com.smartgwt.client.widgets.BaseWidget.init(Native Method)
                	at com.smartgwt.client.widgets.BaseWidget.<clinit>(BaseWidget.java:46)
                	at fr.unice.client.Gtunes.onModuleLoad(Gtunes.java:57)
                And line 57 i use a simple SmartGWT button :

                Code:
                		IButton button = new IButton("Hello");
                		button.addClickHandler(new ClickHandler() {
                			public void onClick(ClickEvent event) {
                				SC.say("oh, Hi there ProActive is better than GWT RPC :D.");
                			}
                		});
                Someone can help me ?

                Comment


                  #23
                  A little improvment :

                  I change my app.gwt.xml for :

                  Code:
                  	<!-- Other module inherits                                      -->
                  	<inherits name='com.smartgwt.SmartGwtNoScript' />
                  	<inherits name="com.smartclient.SmartClientDefault" />
                  	<inherits name="com.smartclient.theme.enterprise.Enterprise" />
                  And my app.html header to :

                  Code:
                  <script>var isomorphicDir = "http://ouaibou.free.fr/sc/"; </script>
                  <script>var currentSkin = "Enterprise";</script>
                  <script type="text/javascript">document.write("<"+"script src=http://ouaibou.free.fr/sc/skins/" + currentSkin + "/load_skin.js?isc_version=7.0beta.js><"+"/script>");</script>
                  and nothing more it's work. Otherwise, i can't upload on appengine due to files limit fixed to 1000. So if i add to appengine-web.xml the following :

                  Code:
                  	<!-- By default all WAR files are static except WEB-INF  -->
                  	<!-- This overrides the default -->
                  	<static-files>
                  		<!-- Exclude smartgwt files from the list of static files -->
                  		<exclude path="/sc/**.*" />
                  		<exclude path="/gtunes/sc/**.*" />
                  
                  	</static-files>
                  
                  	<!--
                  		By default all WAR files are also resource files including WEB-INF
                  	-->
                  	<!-- This overrides the default -->
                  	<resource-files>
                  		<!-- Exclude smartgwt files from the list of resource files -->
                  		<exclude path="/sc/**.*" />
                  		<exclude path="/gtunes/sc/**.*" />
                  	</resource-files>
                  I can deploy but the application cannot be launched. I get the following error :

                  Code:
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/initsc.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_Containers.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_Foundation.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_Core.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_RichTextEditor.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_Grids.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_Calendar.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_Forms.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/modules/ISC_DataBinding.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  28 avr. 2009 11:55:38 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                  WARNING: Cannot not serve /gtunes/sc/skins/Enterprise/load_skin.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                  Does someone has this problem ?

                  Comment


                    #24
                    Nobody can help me ?

                    Comment


                      #25
                      Why are you inheriting SmartClientDefault?

                      Comment


                        #26
                        I see someone using that so i have try with and without but the problem is still the same :(

                        Code:
                        2 mai 2009 21:23:19 com.google.appengine.tools.development.LocalResourceFileServlet doGet
                        WARNING: Cannot not serve /gtunes/sc/skins/Enterprise/load_skin.js directly.  You need to include it in <static-files> in your appengine-web.xml.
                        What do i must include in my appengine-web.xml ?

                        Thanks.

                        Comment


                          #27
                          I also tried to offload the 'sc' directory to S3 and found that it didn't work. I had the same problem as Ouaibou.

                          Basically once you exclude the 'sc' directory (either via appengine-web.xml or by removing it from /war) the EntryPoint class no longer loads.

                          Has anyone actually successfully deployed to App Engine by offloading the 'sc' directory?

                          Thanks a lot.

                          Comment


                            #28
                            Hooray! I got it to work.

                            The missing step was adding all the script files that gave a warning (eg WARNING: Cannot not serve /testsmartgwt/sc/modules/ISC_Forms.js directly.) into the host html page.

                            Here are the steps I took to get a SmartGWT + App Engine project working using the Google plugins (GWT + App Engine) for Eclipse.

                            1. Create a new Eclipse project that uses App Engine and GWT SDKs.
                            2. Remove all of Google's sample code and add some SmartGWT sample code.
                            3. Use these modules in the application .gwt.xml (don't inherit SmartGwt):
                            Code:
                            <inherits name='com.smartgwt.SmartGwtNoScript'/>
                            <inherits name="com.smartclient.SmartClientDefault"/>
                            <inherits name="com.smartclient.theme.enterprise.Enterprise"/>
                            4. Find the 'rename-to' value in the module tag of your application .gwt.xml file (Here I call it myproject). In the host html page add the following BEFORE the standard GWT nocache.js script tag:
                            Code:
                            <script>var isomorphicDir = "myproject/sc/";</script>
                            5. Compile the GWT project and then find the 'sc' directory inside the 'war' directory which is created as a result of the compilation. Upload the 'sc' directory somewhere on the web. Here, I call it http://example.s3.amazonaws.com/sc.
                            6. In appengine-web.xml add:
                            Code:
                            <static-files> 
                                <exclude path="**/sc/**.*" />
                            </static-files>
                            <resource-files>
                                <exclude path="**/sc/**.*" />
                            </resource-files>
                            7. In the host html page add the following after the script tag which you added in step 4:
                            Code:
                            <script>var isomorphicDir = "http://example.s3.amazonaws.com/sc/";</script>
                            <script src="http://example.s3.amazonaws.com/sc/initsc.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_Core.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_Foundation.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_Containers.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_Grids.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_Forms.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_Calendar.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_DataBinding.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/skins/Enterprise/load_skin.js"></script>
                            <script src="http://example.s3.amazonaws.com/sc/modules/ISC_RichTextEditor.js"></script>
                            8. Deploy to App Engine using the Eclipse plugin.

                            I'm not sure if all of those script tags are required; I just got them from the warnings provided by GWT hosted mode. I suppose as you add more SmartGWT features to your app, you may need more script tags.

                            Comment


                              #29
                              Good Instructions, But...

                              brianedco - those look like great instructions (caveat - I haven't tried them yet).

                              isomorphic - uploading to S3 should not be necessary. You could quickly & easily set up something hosted on smartclient.com or any other host of your choosing (such as S3) and prevent everyone who wants to use SmartGWT with App Engine from having to go through the rigmarole of setting up an Amazon account, uploading the same set of SmartGWT files and paying that $0.08 to however-many-dollars bill every month. At least please consider doing that as a stop-gap before you get your final solution complete. In my opinion, I think if you could spend a few hours doing that, it would save all your users from wasting those same few hours time and time again - a great boon for your customer service reputation! ;-)

                              Many thanks!

                              Comment


                                #30
                                SmartClient should host sc files as interim solution

                                Good suggestion from samnanda...

                                isomorphic - any opinion from you?

                                Comment

                                Working...
                                X