You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "nicolas de loof (JIRA)" <ji...@codehaus.org> on 2008/07/28 10:48:26 UTC

[jira] Created: (SUREFIRE-508) cannot run GWTTestCases with surefire

cannot run GWTTestCases with surefire
-------------------------------------

                 Key: SUREFIRE-508
                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
             Project: Maven Surefire
          Issue Type: Bug
          Components: classloading
    Affects Versions: 2.4.3
            Reporter: nicolas de loof


GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <additionalClasspathElements>
            <additionalClasspathElement>src/main/java</additionalClasspathElement>
            <additionalClasspathElement>src/test/java</additionalClasspathElement>
            <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
          </additionalClasspathElements>
          <useManifestOnlyJar>false</useManifestOnlyJar>
          <systemProperties>
            <property>
              <name>gwt.args</name>
              <value>-out target/www-test</value>
            </property>
          </systemProperties>
          <argLine>-Xmx256M</argLine>
        </configuration>
      </plugin>

Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"

I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252096#action_252096 ] 

Olivier Lamy commented on SUREFIRE-508:
---------------------------------------

you can find one here : http://svn.codehaus.org/mojo/trunk/mojo/gwt-maven-plugin/src/it/gwt-test-fail/ 
BTW as this is covered by gwt maven plugin @codehaus, why to fix that here ?

> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "Zaccret (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154209#action_154209 ] 

zaccret edited comment on SUREFIRE-508 at 11/14/08 10:39 AM:
-------------------------------------------------------------

I had the same problem. Wow... I gave a lot of effort to workaround the issue. I was able to give up... but finally... I got it!
I'm using 2.4.3 version. In the plugin configuration, try :
					<useSystemClassLoader>true</useSystemClassLoader>
					<useManifestOnlyJar>false</useManifestOnlyJar>
					<forkMode>always</forkMode>

It seems to be the only configuration working, and it requires that you don't have a command line length problem (I guess it will be OK on Windows XP/Mac OS X/Linux).

Tell me if it works for you.

      was (Author: zaccret):
    I have the same problem. Wow... I gave a lot of effort to workaround the issue. I was able to give up... but finally... I got it!
I'm using 2.4.3 version. In the plugin configuration, try :
					<useSystemClassLoader>true</useSystemClassLoader>
					<useManifestOnlyJar>false</useManifestOnlyJar>
					<forkMode>always</forkMode>

It seems to be the only configuration working, and it requires that you don't have a command line length problem (I guess it will be OK on Windows XP/Mac OS X/Linux).

Tell me if it works for you.
  
> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-508.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.11
         Assignee: Kristian Rosenvold

Since the claspath length limit has been largely eliminated, I updated the FAQ with the proper settings to run GWT in r1206339. The faq also contains reference to the codehaus plugin.

> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>            Assignee: Kristian Rosenvold
>             Fix For: 2.11
>
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252088#action_252088 ] 

Kristian Rosenvold commented on SUREFIRE-508:
---------------------------------------------

If someone can supply a minimal test project as a zip file (pom.xml plus just one GWTTestCase or similar), I can give this issue another look to see if there's something more that can be done.

> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "Zaccret (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154209#action_154209 ] 

Zaccret commented on SUREFIRE-508:
----------------------------------

I have the same problem. Wow... I have given a lot of effort to workaround the issue. I was able to give up... but finally... I got it!
I'm using 2.4.3 version. In the plugin configuration, try :
					<useSystemClassLoader>true</useSystemClassLoader>
					<useManifestOnlyJar>false</useManifestOnlyJar>
					<forkMode>always</forkMode>

It seems to be the only configuration working, and it requires that you don't have a command line length problem (I guess it will be OK on Windows XP/Mac OS X/Linux).

Tell me if it works for you.

> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=266627#action_266627 ] 

Kristian Rosenvold commented on SUREFIRE-508:
---------------------------------------------

As of SUREFIRE-727 (Surefire 2.8.2) the limitation of wiundows command lines should be raised to 32768 characters. This may be sufficient to solve the GWT problem. I'd be happy about some feedback on this one when 2.8.2 is released



> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "nicolas de loof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=173433#action_173433 ] 

nicolas de loof commented on SUREFIRE-508:
------------------------------------------

The command line limitation is blocking here. As GWT apps are web-layer they pull all project (business, persistence..) dependencies and get a long dependencies list. With maven repo path we end with CLASSPAHT far longer than the Windows XP 8191 chars limitation.




> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (SUREFIRE-508) cannot run GWTTestCases with surefire

Posted by "Zaccret (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154209#action_154209 ] 

zaccret edited comment on SUREFIRE-508 at 11/14/08 10:24 AM:
-------------------------------------------------------------

I have the same problem. Wow... I gave a lot of effort to workaround the issue. I was able to give up... but finally... I got it!
I'm using 2.4.3 version. In the plugin configuration, try :
					<useSystemClassLoader>true</useSystemClassLoader>
					<useManifestOnlyJar>false</useManifestOnlyJar>
					<forkMode>always</forkMode>

It seems to be the only configuration working, and it requires that you don't have a command line length problem (I guess it will be OK on Windows XP/Mac OS X/Linux).

Tell me if it works for you.

      was (Author: zaccret):
    I have the same problem. Wow... I have given a lot of effort to workaround the issue. I was able to give up... but finally... I got it!
I'm using 2.4.3 version. In the plugin configuration, try :
					<useSystemClassLoader>true</useSystemClassLoader>
					<useManifestOnlyJar>false</useManifestOnlyJar>
					<forkMode>always</forkMode>

It seems to be the only configuration working, and it requires that you don't have a command line length problem (I guess it will be OK on Windows XP/Mac OS X/Linux).

Tell me if it works for you.
  
> cannot run GWTTestCases with surefire
> -------------------------------------
>
>                 Key: SUREFIRE-508
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-508
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.4.3
>            Reporter: nicolas de loof
>
> GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <additionalClasspathElements>
>             <additionalClasspathElement>src/main/java</additionalClasspathElement>
>             <additionalClasspathElement>src/test/java</additionalClasspathElement>
>             <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
>           </additionalClasspathElements>
>           <useManifestOnlyJar>false</useManifestOnlyJar>
>           <systemProperties>
>             <property>
>               <name>gwt.args</name>
>               <value>-out target/www-test</value>
>             </property>
>           </systemProperties>
>           <argLine>-Xmx256M</argLine>
>         </configuration>
>       </plugin>
> Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"
> I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira