Announcement

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

    Trying to deploy to EC2/S3 and getting isc in not defined

    Hi all,

    it's been a week that i've busy trying to deploy my application on EC2 and S3 for the static files.

    My config is the one below (i compiled my gwt module using cross site scripting linker)

    a TOMCAT setup on app.domain.com with all my servlet and stuff like that. My module.html is here

    on Amazon S3, all the javascripts, htmls, images, etc under the domain assets.app.domaine.com.

    module.nocache.js
    BIG_HASH.cache.js files
    sc/ directory (with all the stuff in it)

    And i get a "isc in not defined".

    What's wrong with my config ? (i use the lastest build). Deploying everything on the TOMCAT instance makes everything work.

    So, what with my config ?

    Thanks,

    Thomas

    #2
    It means that it cannot find the SC resources. What does the traffic look like when using Firebug / Fiddler? Examine the 404 requests and see why they can't be located on EC2 / S3.

    Sanjiv

    Comment


      #3
      Originally posted by sjivan
      It means that it cannot find the SC resources. What does the traffic look like when using Firebug / Fiddler? Examine the 404 requests and see why they can't be located on EC2 / S3.

      Sanjiv
      That's the problem, there is no 404 at all with Firebug. I can see it loads all the SmartClient modules.

      I can send you the link to my app but need to do that in private.

      It first load initsc.js, then ISC_Core.js, ISC_Foundation.js, ISC_Containers.js, etc....then load_skin.js in which the first call fails (isc.loadSkin=function(theWindow){if....)
      Last edited by mastooo; 9 May 2009, 00:37.

      Comment


        #4
        Sure, email me the details. sanjiv dot jivan at gmail

        Comment


          #5
          Hi,

          finally i ended up finding out the issue. It was in my deployment script. I use to execute yuicompressor on every javascript file i had to deploy. It appears that sc/modules/ISC_Core.js and sc/client/debut/Log.js could not be reduced by this tool because of some javascript parse exception during the process ("identifier is a reserved keyword" error). Weird.

          But i have another request. Now, everything kind of works but one thing : the skin. Whereas all the Smartclient files are loaded from S3 without any problem, it's seems that the librairy try to retreive the style sheet (/sc/skins/Enterprise/skin_style.css) on my TOMCAT server instead of the S3.

          I don't know how it works, but it looks like it try to retrieve it from the GWT.getModuleBaseURL() (in my case S3) instead ofGWT.getHostPageBaseURL() (in my case Tomcat server)

          Comment


            #6
            No clues ?

            Comment


              #7
              Ok,

              i figured out how to work around that issue :

              I keep a specific version of the file initsc.js with that :

              Code:
              if(!isomorphicDir){var isomorphicDir="http://assets.pouetpouet.com/sc/"};
              assets.pouetpouet.com points to Amazon CloudFront which points to a Amazon S3 bucket in which i store all my static files, so my app server only manages RPC calls, not static stuffs anymore (that consume time, CPU and bandwidth).

              You have to use the X-S linker in your module.gwt.xml to enable this kind of setup

              Comment

              Working...
              X