Announcement

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

    Problems moving from classic to super dev mode

    gwt 2.6.1, smartgwt 6.0 pro, build 2017-05-31

    Hello,

    due to some issues (which i'll ask about in another thread), i thought i'd try out superdev mode.

    I develop with smartgwt in Intellij for several years. I have a "configuration" that works fine, and there's a button that says "enable super development mode". Whan i click it, it stops working. I get to my jsp, and i come as far as "compiling 'module'... but then i get this error in the console:
    Code:
    javax.servlet.ServletException: DataSource 'location' failed to load due to an exception on the server:
    Corrupt DataSource detected - required files under {isomorphicDir}/system/schema may be missing or unreadable.  This typically results from skipping installation steps.  If using SmartGWT, verify your <inherits> and run a GWT compile
    There is one old thread here on this topic, which basically talks about configuring the project correctly. I believe i have done so, especially since classic dev mode works, and i have double checked most stuff i can think of.

    I was wondering if there is something you can think of to check, or if there's some location i can look at.

    I can also see this in the log:
    Problem loading builtinTypes.xml
    Exception when loading from /Users/user/Library/Caches/IntelliJIdea2017.1/gwt/mymodule.5e273cec/mymoduleweb.f1919e44/run/www/mymodule/sc/system/schema/builtinTypes.xml:
    java.io.FileNotFoundException: /Users/user/Library/Caches/IntelliJIdea2017.1/gwt/mymodule.5e273cec/mymoduleweb.f1919e44/run/www/mymodule/sc/system/schema/builtinTypes.xml (No such file or directory)

    this is my gwt.xml:
    Code:
    <module rename-to="mymodule">
    
        <inherits name='com.google.gwt.user.User'/>
        <inherits name="com.smartgwt.tools.SmartGwtTools"/>
        <inherits name="com.smartgwtee.SmartGwtEENoTheme"/>
        <!--inherits name="com.smartclient.theme.enterprise.EnterpriseResources"/-->
        <!--inherits name="com.smartgwtpro.tools.Tools"/-->
        <!--inherits name="com.smartgwtee.SmartGwtPro"/-->
        <!--inherits name="com.smartclient.theme.simplicity.Simplicity"/-->
        <!--inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlue"/-->
    
    
        <inherits name="com.google.gwt.i18n.I18N"/>
        <inherits name="com.google.gwt.maps.Maps"/>
    
        <!-- English language, independent of country -->
        <extend-property name="locale" values="en"/>
        <!-- Swedish language -->
        <extend-property name="locale" values="sv_SE"/>
    
    
        <entry-point class='com.karpet.mymodule.client.mymodule'/>
        <!-- Set to compile fewer permutations to reduce build time in development
             Options are: ie8,ie9,ie10,gecko,gecko1_8,safari,opera -->
        <!--set-property name="user.agent" value="gecko1_8, safari"/-->
        <set-property name="user.agent" value="gecko1_8,ie8,ie9,ie10,safari"/>
    
        <!-- Specify the paths for translatable code -->
        <source path='client'/>
        <source path='gwtcommons'/>
    
    
        <add-linker name="xsiframe"/>
    </module>
    If you have any pointers at all, much appreciated. Again, it works in classic dev mode.

    #2
    Make sure you've run a GWT compile, which extracts resources from the .jars and places them in your deployment. If the files still aren't there, see if they've been misplaced - this could be due to some kind of wrong project setting.

    Comment


      #3
      Done some more investigation, still can't get it to work. When i start it up in intellij, it goes to the startup html page, it says "compiling module..." but then blank. In the console i can see the

      Code:
      Problem loading builtinTypes.xml
      Exception when loading from /Users/mathias/Library/Caches/IntelliJIdea2017.1/gwt/nuba.5e273cec/smartgwttests.2b792b4/run/www/test/sc/system/schema/builtinTypes.xml:
      looking more at the output, it seems the compilation works. I have this in the log also:

      Code:
      Compiling module XX
         Validating units:
            Ignored 2 units with compilation errors in first pass.
      Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
         Compiling 1 permutation
            Compiling permutation 0...
            Source Maps Enabled
         Compile of permutations succeeded
      ...
         Invoking Linker Cross-Site-Iframe
            Ignoring the following script tags in the gwt.xml file
      sc/initsc.js
      sc/modules/ISC_Core.js
      sc/modules/ISC_Foundation.js
      sc/modules/ISC_Containers.js
      sc/modules/ISC_Grids.js
      sc/modules/ISC_Forms.js
      sc/modules/ISC_RichTextEditor.js
      sc/modules/ISC_Calendar.js
      sc/modules/ISC_DataBinding.js
      sc/skins/EnterpriseBlue/load_skin.js
      
         Invoking Linker SmartGwtScriptInjector
            Creating loadScriptTagFiles.js to manually load the following script tags:
      sc/initsc.js
      sc/modules/ISC_Core.js
      sc/modules/ISC_Foundation.js
      sc/modules/ISC_Containers.js
      sc/modules/ISC_Grids.js
      sc/modules/ISC_Forms.js
      sc/modules/ISC_RichTextEditor.js
      sc/modules/ISC_Calendar.js
      sc/modules/ISC_DataBinding.js
      sc/skins/EnterpriseBlue/load_skin.js
         Link succeeded
         Compilation succeeded -- 4.355s
      Compile completed in 4434 ms
      However, when i look into the directory in /Library, where i know the files end up in "classic" dev mode, the /sc directory is completely empty! the /ds and other web-inf-folders are there with all the same files.

      Any idea why the sc-folder is missing when it does seem like it compiles properly?
      Last edited by mathias; 2 Jun 2017, 07:28.

      Comment


        #4
        There are a few different issues here - mainly the missing sc resources that you've observed, and the fact that you're using script tags, which are supportedly only via our custom SmartGWT linker and not directly by GWT 2.6.1 SDM . We would suggest taking a look at our online SmartGWT doc section titled SuperDevModeTroubleshooting and reading starting with "Understanding the Relevant Behavior of SDM," and continuing on to the troubleshooting matrix.

        What's slightly different in your case is that you're not using Eclipse, but IntelliJ. Are you using the GWT Plugin, or running the SDM CodeServer as a Java App? In Eclipse, the solution here is to go to the GWT Plugin configuration tab in your Run/Debug Configuration, and toggle the radio button to "Classic Dev Mode," run it once, and then switch back. That should extract the sc resources into the project's directory tree.

        If that's not possible in IntelliJ, and you have another project currently using Classic Dev Mode, it may easiest just to copy the the sc directory from that location - it would have to be using the same version of SmartGWT obviously. The other alternative is to do a command-line build using "ant". You'd only have to do this once to extract the resources - then you could go back to using IntelliJ.

        If you can upgrade to GWT 2.7.0, that may also solve the sc resource issue - as we've not seen it with GWT 2.7.0.

        Once the sc resources are extracted, then you'll potentially face a second issue with not seeing the loadScriptTagFiles.js file generated by our custom linker to provide support for the script tags that GWT SDM 2.6.1+ rejects. (That's discussed in the documentation link above.) Note that if you switch your project to inherit SmartGwtEENoScriptNoTheme and manually load our Framework files in HTML as we do in the Showcase Project, you won't need this file. Eclipse/GWT Plugin users can simply run Classic Dev Mode once, and it will be generated, but you'll need to switch to GWT 2.7.0+ temporarily as non-SDM GWT 2.6.1 supports script tags so Classic Dev Mode in that version doesn't generate the file.

        In summary, you can generate the sc resource by running Classic Dev Mode or a command-line build - upgrading to GWT 2.7.0 seems to avoid the problem for those running SDM via the GWT Plugin in Eclipse. Turning to the other issue, you can generate the loadScriptTagFile.js file by running Classic Dev Mode in GWT 2.7.0+ or a command-line build, or avoid the need for it by removing script tags from your project (inheriting only "NoScript" module variations) and loading the needed script tags directly in your base HTML page.


        Comment

        Working...
        X