Announcement

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

    Unit test error - Unable to find 'isomorphic.gwt.xml' on your classpath

    I get the following error when i try to run GWTTestCase within eclipse or even from command line. The smartgwt jars are already in the classpath.

    [ERROR] Unable to find 'isomorphic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
    The development shell servlet received a request for 'skins/Enterprise/skin_styles.css' in module 'isomorphic.gwt.xml'
    [ERROR] Unable to find 'isomorphic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
    [WARN] CSS error: null [1:22] Error in style rule. Invalid token "skins/Enterprise/skin_styles.css\' in the public path of module \'isomorphic". Was expecting one of: <S>, <LBRACE>, <COMMA>, <PLUS>, <GREATER>, <IDENT>, "*", <HASH>, ".", "[", ":".
    [WARN] CSS warning: null [1:22] Ignoring the following declarations in this rule.



    I am using GWT 2.0.4 with SmartGwt 2.2.
    Tried both "gwt-maven-plugin" as well as "gwt plugin for eclipse" but this error is consistent in these two environments.


    Here is how my module xml looks like;

    <module>
    <inherits name="com.google.gwt.user.User"/>
    <inherits name="com.smartgwt.SmartGwt"/>
    <entry-point class="com.arrisi.gwt.sample.stockwatcher.StockWatcher.client.StockWatcher"/>
    </module>

    Also tried to follow instructions posted in gwt websites, like
    http://code.google.com/webtoolkit/tools/gwtdesigner/wizards/gwt/junit_testcase.html

    #2
    This suggests that you or a co-worker might have repackaged the SmartClient skin assets (like load_skin.js) into a GWT module of your own (isomorphic.gwt.xml), and something's wrong with the definition of that module.

    Comment


      #3
      Originally posted by Isomorphic
      This suggests that you or a co-worker might have repackaged the SmartClient skin assets (like load_skin.js) into a GWT module of your own (isomorphic.gwt.xml), and something's wrong with the definition of that module.
      No, this is a new application and we haven't changed anything with smartgwt packages.
      Just to mention that, the application runs fine, but Unit test are giving this problem.

      Comment


        #4
        Ok, there is no "isomorphic.gwt.xml" provided in the product. Try figuring out where this is coming from - something has generated it, or generated a reference to it.

        Comment


          #5
          Also look for the use of a directory named "isomorphic" and the structure of your GWT testcases project. It appears you have it setup incorrectly.

          Comment


            #6
            I do not have any file/folder called "isomorphic" within my project.
            This error starts as soon as i put the "smartgwt" reference within my project.
            If i use "SmartGwtNoTheme" then the error disapprear, but i need to have the "Enterprise" skin for my app.

            Comment


              #7
              Try to isolate whats different between your unit test GWT project structure and the Hello World sample shipped with Smart GWT that inherits the SmartGwt module just like you've posted.

              Sanjiv

              Comment


                #8
                This behavior is easily reproducible within eclipse.

                1. Create a sample GWT project using - GWT Plugin for Eclipse
                2. Create a sample GWTTestCase under the "test" folder

                Code:
                package com.mathew.sample.client;
                import org.junit.Test;
                import com.google.gwt.junit.client.GWTTestCase;
                public class SampleGwtTest extends GWTTestCase {
                	public String getModuleName() {
                		return "com.mathew.sample.SampleProj";
                	}	
                	@Test
                	public void test() throws Exception {
                		assertTrue(true);
                	}
                }
                3. Right-click the file-name and choose "Run as --> GWT JUnit Test to run the test.
                This time the test RUNS WITHOUT ANY ERRORS.

                4. Now add "smartgwt" to the project, Add the "jar" and add the reference within the "module.gwt.xml" file.
                5. Just to see SmartGwt is working, Just add a smart gwt alert statement to the EntryPoint class.
                Code:
                SC.say("Testing SmartGwt!!!");
                5. Run the application to make sure SmartGwt is properly configured. The applications runs fine , shows the alert message without nay rendering issues.

                6. NOW try to execute step (3) again, execute the same Junit test again.
                This time Junit throws the following error:

                Code:
                Starting HTTP on port 0
                   HTTP listening on port 4922
                Starting http://10.109.30.249:4922/com.mathew.sample.SampleProj.JUnit/junit.html?gwt.codesvr=10.109.30.249:4920 on browser FF3
                [ERROR] Unable to find 'isomorphic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
                The development shell servlet received a request for 'skins/Graphite/skin_styles.css' in module 'isomorphic.gwt.xml' 
                   [ERROR] Unable to find 'isomorphic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
                   [WARN] CSS error: null [1:22] Error in style rule. Invalid token "skins/Graphite/skin_styles.css\' in the public path of module \'isomorphic". Was expecting one of: <S>, <LBRACE>, <COMMA>, <PLUS>, <GREATER>, <IDENT>, "*", <HASH>, ".", "[", ":".
                   [WARN] CSS warning: null [1:22] Ignoring the following declarations in this rule.
                Module com.mathew.sample.SampleProj.JUnit has been loaded
                All clients connected (Limiting future permutations to: gecko1_8)

                Comment


                  #9
                  okay, I'll try to reproduce the issue and see whats going on.

                  Comment


                    #10
                    Originally posted by sjivan
                    okay, I'll try to reproduce the issue and see whats going on.
                    Are you able to reproduce this issue ? Or do you think is there some issues with my setup ?

                    Could you please point to me any other thread here, discuss about a successful usage of unit testing with "Smart GWT" framework.

                    Comment


                      #11
                      hmm, I'm seeing these log warnings with GWT 2.0 but they appear harmless. Are you seeing any actual failure? I set a breakpoint and evaluated JSOHelper.eval("$wnd.isc") and it does return a valid object.

                      The GWTTestCase class seems to be trying to process injected JS from the SmartGwt module and logs these messages. I'll look into it further and report to the GWT team however you should be able to continue as these messages appear harmless and the tests do run.

                      Sanjiv

                      Comment


                        #12
                        Originally posted by sjivan
                        hmm, I'm seeing these log warnings with GWT 2.0 but they appear harmless. Are you seeing any actual failure? I set a breakpoint and evaluated JSOHelper.eval("$wnd.isc") and it does return a valid object.

                        The GWTTestCase class seems to be trying to process injected JS from the SmartGwt module and logs these messages. I'll look into it further and report to the GWT team however you should be able to continue as these messages appear harmless and the tests do run.

                        Sanjiv

                        Thank you Sanjeev.
                        Yes, the tests are running fine along with these errors/warnings.

                        Comment


                          #13
                          FYI: the error does not occur with GWT 2.04 and SmartGwt 2.1

                          Comment


                            #14
                            Hi,

                            Any update on this issue?

                            Cheers
                            Rob

                            Comment


                              #15
                              SmartGWT 2.2

                              I'm having a similar issue but my tests blow up. It doesn't just say once about

                              Code:
                                 [ERROR] Unable to find 'isomorphic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
                              It says it over and over and over again. Like a few hundred times each time my junit tests try to run.

                              Also it complains about being unable to find a particular item:
                              Code:
                              The development shell servlet received a request for 'system/schema/schemaTranslator.xsl' in module 'isomorphic.gwt.xml' 
                                      at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1246)
                              I'm not sure what I'm not including.

                              This is my unit test class
                              Code:
                              
                              package com.baa.client;
                              
                              import com.baa.client.model.WebAppRestDataSource;
                              import com.baa.client.presentation.DynamicFormPresentation;
                              import com.google.gwt.junit.client.GWTTestCase;
                              import com.smartgwt.client.data.DSRequest;
                              import com.smartgwt.client.data.DSResponse;
                              
                              /**
                               *
                               * @author mmagliocca
                               */
                              public class BaseDynamicFormTest extends GWTTestCase{
                              
                                  public BaseDynamicFormTest() 
                                  {
                                      //ClasspathUtility.printDuplicates();
                                  }
                              
                                  @Override
                                  public String getModuleName() {
                                      return "com.baa.Scaffolding";
                                  }
                              
                              
                              
                              /*
                                  @Test
                                  public void testTest() {
                                  }
                              
                                  @Test
                                  public void testSave() {
                                  }
                              
                                  @Test
                                  public void testCancel() {
                                  }
                              
                                  @Test
                                  public void testGetPermissionsObject() {
                                  }
                              */
                                  //@Test
                                  public void testFetchData()
                                  {
                                      //finishTest();
                                  }
                              
                                  //@Test
                                  public void testGetXSD() 
                                  {
                                      BaseDynamicFormImpl impl = new BaseDynamicFormImpl();
                                      TestDynamicFormXSDDSCallBack xsdCallBack = new TestDynamicFormXSDDSCallBack();
                                      TestDynamicFormDataDSCallBack dataCallBack = new TestDynamicFormDataDSCallBack();
                                      dataCallBack.setForm(impl);
                                      xsdCallBack.setForm(impl);
                              
                                      xsdCallBack.setDsCallback(dataCallBack);
                                      this.delayTestFinish(5000);
                                      impl.fetchXSD(null, xsdCallBack);
                                  }
                              
                              /*
                                  @Test
                                  public void testSetValidator() {
                                  }
                              */
                                  public class BaseDynamicFormImpl extends BaseDynamicForm {
                              
                                      public DynamicFormPresentation getPermissionsObject() {
                                          return null;
                                      }
                                  }
                              
                                  public class TestDynamicFormXSDDSCallBack extends DynamicFormXSDCallBack
                                  {
                                      protected BaseDynamicFormTest test;
                                      @Override
                                      public void execute(WebAppRestDataSource ds) {
                                          super.execute(ds);
                                          //validate correctness
                                          test.finishTest();
                                      }
                                  }
                              
                                  public class TestDynamicFormDataDSCallBack extends DynamicFormDataCallBack
                                  {
                                      protected BaseDynamicFormTest test;
                                      @Override
                                      public void execute(DSResponse response, Object rawData, DSRequest request)
                                      {
                                          super.execute(response, rawData, request);
                                          //validate correctness
                                          test.finishTest();
                                      }
                                  }
                              }
                              This is my Module file
                              Code:
                              <?xml version="1.0" encoding="UTF-8"?>
                              <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
                              <module>
                                <!-- Inherit the core Web Toolkit stuff.                        -->
                                <inherits name="com.google.gwt.user.User"/>
                                <inherits name="com.smartgwt.SmartGwt"/>
                              
                                <!-- provides access to SmartGWT console for debugging, to start console enter javascript:isc.showConsole() in browser URL -->
                                <inherits name="com.smartgwt.tools.SmartGwtTools"/>
                               <inherits name="com.google.gwt.junit.JUnit"/>
                                <!-- SmartGWT skins, not sure how these interact with the GWT style sheet -->
                                <inherits name="com.smartclient.theme.silverwave.SilverWave"/>
                              
                              
                                 <set-property name="user.agent" value="gecko1_8"/> 
                                  
                              
                                <entry-point class="com.baa.client.ScaffoldingEntryPoint"/>
                              
                                 <!-- Include client-side source we might like to test -->
                                 <source path="client"/>
                                 <!-- Include client-side source for the test cases -->
                                 <source path="test"/>
                              
                                <!-- Do not define servlets here, use web.xml -->
                              </module>

                              Am I doing something wrong? Do we know what causes these issues?
                              Thanks

                              Comment

                              Working...
                              X