Announcement

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

    Can't load Datasources - SmartClient runtime not loaded

    Hi,

    We are currently developing our web application using the SmartGWT Power edition.

    Application start up locally is successful in Firefox and IE9. But on starting the application on the websphere application server (WAS), we are recieving a 'Can't load Datasources - SmartClient runtime not loaded' message. Is anyone familiar with this message?

    Looking at the logs, there are messages like 'MSIE WITHOUT Accept-Encoding header'. Is there a way or is it necessary to explicitly enable the accept-encoding header?

    Project.gwt.xml

    Code:
    <module rename-to='ProjectX'>
    
        <inherits name="com.google.gwt.inject.Inject"/>
        <inherits name="com.smartgwtpower.SmartGwtPower" />
        <inherits name="com.smartgwtpower.tools.Tools"/>
        <inherits name="com.smartgwt.RealtimeMessaging" />
    
        <entry-point class='com.project.ProjectX' />
    
        <source path='client' />
        <source path='shared' />
    
        <set-property name="user.agent" value="ie9" />
        <extend-property name="user.agent" values="gecko1_8" />
        
    </module>
    Entry page

    Code:
    <html>
      <head>
        <title>ProjectX</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <link rel="shortcut icon" type="image/png" href="short.png" />
        <link type="text/css" rel="stylesheet" href="projectx.css">
        <script> var isomorphicDir = "ProjectX/sc/"; </script>
        <script type="text/javascript" src="ProjectX/ProjectX.nocache.js"></script>
      </head>
      <body marginheight="0" marginwidth="0">
        <!-- load data sources from server -->
        <script src="ProjectX/sc/DataSourceLoader?dataSource=projectxDS"></script>
       </body>
    </html>
    Regards,

    #2
    This means the JavaScript runtime (ISC_Core.js et al) has not been loaded.

    The most likely reason for this would be not running a GWT compile (GWT copies these files into the war/ directory when you run a compile.

    If that's not it, look with Firebug's "Net" panel - you will probably see 404 Not Found errors for attempts to load ISC_Core.js et al, and whatever is wrong with the paths should suggest a reason.

    Comment


      #3
      The GWT compile has run succesfully as part of Maven build (already checked the permutation generation) and access is alright from Firefox as it seems. The only problem is with the access via Internet Explorer!

      There are no errors under the network panel (IE developer console). But we do find an error in the console ('SCRIPT5009: 'isc' is undefined'). Not quite sure though what could cause this!

      Attached below the server.properties, assuming the isc configuration must be done somewhere here.

      Code:
      webRoot: __AUTODETECT__
      
      # Set this to the GWT module name.
      gwtModuleName: ProjectX
      
      # if you've moved the isomorphic directory from its default location in webRoot,
      # set the root-relative path to it here
      isomorphicPathRootRelative: $gwtModuleName/sc
      
      # Where the system looks for DataSource definition files ([dataSourceId].ds.xml or
      # [dataSourceID].ds.js).  It's useful to put all your DataSources in one 
      # directory since DataSources are frequently shared between applications.  
      # "project.datasources" is also where the DataSource Importer tool looks 
      # for available DataSources.
      project.datasources: $webRoot/ds
      project.ui: $webRoot/shared/ui
      project.apps: $webRoot/shared/app
      
      RPCManager.enabledBuiltinMethods: * 
      
      # Note: modulesDir is only used with the loadISC and loadModules JSP tags; if
      # you intend to use those tags, do not change this setting
      modulesDir: modules/
      Attached Files
      Last edited by GM_GWT; 25 Apr 2013, 06:31.

      Comment


        #4
        IE has similar tools to Firebug (just press f12) - can you check whether ISC_Core.js et al are being loaded from the server?

        Comment


          #5
          I have just compared the network capture on IE and FF (attached screenshots). On the IE the request just seems to be quitting right after loading the datasources with the error message.

          This might be what you were asking for, i guess. Hope these findings help you for futher suggestions.
          Attached Files
          Last edited by GM_GWT; 25 Apr 2013, 07:04.

          Comment


            #6
            That's very strange - your network log seems to show no attempt to load ISC_Core.js at all. But this is something that SmartGWT isn't even responsible for - it's GWT itself that causes these files to be loaded.

            Things to check:

            1. kill all instances of IE, restart on a blank page, clear the cache and only then navigate to the app

            2. are you running an obsolete version of GWT? Upgrade to 2.5

            3. try removing your user.agent settings and doing a full recompile. Maybe GWT is not recognizing IE for some reason and hence not generating correct platform-specific code for JS loading.

            Comment


              #7
              Issue was related to the multiple IE versions (IE7 & IE9) we used for testing.

              Issue was solved by introducing the following in the head of our entry page:
              Code:
                  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
              Next step would be to check out the user agent for IE6/7.

              Thanks again for the prompt help, appreciate it.

              Comment


                #8
                Just thought I'd add - I had the same problem in IE... if the user changes their IE settings to Standards mode, it fixes it. Adding in the code
                Code:
                <meta http-equiv="X-UA-Compatible" content="IE=Edge">
                as mentioned above seems to fix it regardless of the user's IE settings.

                Thanks!

                Comment

                Working...
                X