Re: surefire : classloader issue with GWTTestCase

2008-07-25 Thread nicolas de loof
I trie to remove all classpath references from the surefiretmp file, that
includes all my dependencies even when useManifestOnlyJar is set to false.

I then cannot run the test anymore :
org.apache.maven.surefire.booter.SurefireExecutionException:
com/google/gwt/junit/client/GWTTestCase; nested exception is
java.lang.NoClassDefFoundError: com/google/gwt/junit/client/GWTTestCase
 - but the required jar is set on command line as -classpath !


I may be wrong, but in [useManifestOnlyJar=false] mode, surefire still uses
the tmpFile to load classes, not the command line classpath.


2008/7/25 nicolas de loof <[EMAIL PROTECTED]>:

> I also tried to drastically reduce the command line (removing all
> unecessary dependencies) but have the same issue.
>
>
>
>> 2008/7/25 Jeff MAURY <[EMAIL PROTECTED]>:
>>
>> Using false may lead to classpath
>>> too long for your environment and leading to ClassNotFoundException or
>>> ClassNotFoundError. May be this is what you have ?
>>>
>>> Jeff MAURY
>>>
>>>
>>> On 7/25/08, nicolas de loof <[EMAIL PROTECTED]> wrote:
>>> >
>>> > Using false makes things work
>>> > better, as the full classpath is scanned for java source files by the
>>> GWT
>>> > compiler, but now I get
>>> >
>>> > "javax.servlet.ServletException: Class
>>> > com.google.gwt.dev.shell.GWTShellServlet is not a Servlet"
>>> > (looks like a classloader conflict)
>>> >
>>> >
>>> > 2008/7/25 nicolas de loof <[EMAIL PROTECTED]>:
>>> >
>>> > > Hello,
>>> > >
>>> > > I'm trying to setup surefire plugin to run GWTTestCase. This requires
>>> > some
>>> > > custom setup as the "hosted mode browser" requires GWT to read the
>>> java
>>> > > source code :
>>> > >
>>> > > maven-surefire-plugin
>>> > > 
>>> > >   
>>> > >
>>> > > src/it/java
>>> > >
>>> > >
>>> src/main/java
>>> > >   
>>> > >   
>>> > > 
>>> > >   gwt.args
>>> > >   -out target/www-test -logLevel ALL
>>> > > 
>>> > >   
>>> > >   -Xmx256M
>>> > > 
>>> > >
>>> > >
>>> > > Myissue is that - according to GWT log -- GWT does only lookup the
>>> > > surefire.class.path (JRE rt.jar + surefirebooter.jar), and not all
>>> other
>>> > > dependencies or additionalClassPathElements. It seems the classloader
>>> > > hierarchy used by surefire that is not supported by GWTTestCase.
>>> > >
>>> > > Any suggestion to get this working ?
>>> > >
>>> > >
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> La mélancolie c'est communiste
>>> Tout le monde y a droit de temps en temps
>>> La mélancolie n'est pas capitaliste
>>> C'est même gratuit pour les perdants
>>> La mélancolie c'est pacifiste
>>> On ne lui rentre jamais dedans
>>> La mélancolie oh tu sais ça existe
>>> Elle se prend même avec des gants
>>> La mélancolie c'est pour les syndicalistes
>>> Il faut juste sa carte de permanent
>>>
>>> Miossec (2006)
>>>
>>> http://www.jeffmaury.com
>>> http://riadiscuss.jeffmaury.com
>>> http://www.lastfm.fr/listen/user/jeffmaury/personal
>>>
>>
>>
>


Re: surefire : classloader issue with GWTTestCase

2008-07-25 Thread nicolas de loof
I also tried to drastically reduce the command line (removing all unecessary
dependencies) but have the same issue.


> 2008/7/25 Jeff MAURY <[EMAIL PROTECTED]>:
>
> Using false may lead to classpath
>> too long for your environment and leading to ClassNotFoundException or
>> ClassNotFoundError. May be this is what you have ?
>>
>> Jeff MAURY
>>
>>
>> On 7/25/08, nicolas de loof <[EMAIL PROTECTED]> wrote:
>> >
>> > Using false makes things work
>> > better, as the full classpath is scanned for java source files by the
>> GWT
>> > compiler, but now I get
>> >
>> > "javax.servlet.ServletException: Class
>> > com.google.gwt.dev.shell.GWTShellServlet is not a Servlet"
>> > (looks like a classloader conflict)
>> >
>> >
>> > 2008/7/25 nicolas de loof <[EMAIL PROTECTED]>:
>> >
>> > > Hello,
>> > >
>> > > I'm trying to setup surefire plugin to run GWTTestCase. This requires
>> > some
>> > > custom setup as the "hosted mode browser" requires GWT to read the
>> java
>> > > source code :
>> > >
>> > > maven-surefire-plugin
>> > > 
>> > >   
>> > >
>> > > src/it/java
>> > >
>> > > src/main/java
>> > >   
>> > >   
>> > > 
>> > >   gwt.args
>> > >   -out target/www-test -logLevel ALL
>> > > 
>> > >   
>> > >   -Xmx256M
>> > > 
>> > >
>> > >
>> > > Myissue is that - according to GWT log -- GWT does only lookup the
>> > > surefire.class.path (JRE rt.jar + surefirebooter.jar), and not all
>> other
>> > > dependencies or additionalClassPathElements. It seems the classloader
>> > > hierarchy used by surefire that is not supported by GWTTestCase.
>> > >
>> > > Any suggestion to get this working ?
>> > >
>> > >
>> > >
>> >
>>
>>
>>
>> --
>> La mélancolie c'est communiste
>> Tout le monde y a droit de temps en temps
>> La mélancolie n'est pas capitaliste
>> C'est même gratuit pour les perdants
>> La mélancolie c'est pacifiste
>> On ne lui rentre jamais dedans
>> La mélancolie oh tu sais ça existe
>> Elle se prend même avec des gants
>> La mélancolie c'est pour les syndicalistes
>> Il faut juste sa carte de permanent
>>
>> Miossec (2006)
>>
>> http://www.jeffmaury.com
>> http://riadiscuss.jeffmaury.com
>> http://www.lastfm.fr/listen/user/jeffmaury/personal
>>
>
>


Re: surefire : classloader issue with GWTTestCase

2008-07-25 Thread nicolas de loof
I tried to copy/paste the command line executed by surefire :

java -Xmx256M -classpath blablablablalba
org.apache.maven.surefire.booter.SurefireBooter
C:\WINDOWS\TEMP\surefire17025tmp C:\WINDOWS\TEMP\surefire17026tmp

As surefire executes, it seems the line is not too long (evn it is very long
;-) ) so that the class name argument is used by java to run surefire
booter.

I then get :

@HL
@HL---
@HL T E S T S
@HL---
@SLRunning com.capgemini.bios.gwt.client.ApplicationITest
Starting HTTP on port 0
   HTTP listening on port 1538
StandardContext[]Marking servlet shell as unavailable
[WARN] StandardWrapperValve[shell]: Allocate exception for servlet shell
javax.servlet.ServletException: Class
com.google.gwt.dev.shell.GWTShellServlet is not a Servlet


I just remembered that gwt-user.jar contains a copy of the servlet-api, that
may conflict with my servlet-api.jar declared as a project dependency. But
removing this dependency did not change the bad result :-(





2008/7/25 Jeff MAURY <[EMAIL PROTECTED]>:

> Using false may lead to classpath
> too long for your environment and leading to ClassNotFoundException or
> ClassNotFoundError. May be this is what you have ?
>
> Jeff MAURY
>
>
> On 7/25/08, nicolas de loof <[EMAIL PROTECTED]> wrote:
> >
> > Using false makes things work
> > better, as the full classpath is scanned for java source files by the GWT
> > compiler, but now I get
> >
> > "javax.servlet.ServletException: Class
> > com.google.gwt.dev.shell.GWTShellServlet is not a Servlet"
> > (looks like a classloader conflict)
> >
> >
> > 2008/7/25 nicolas de loof <[EMAIL PROTECTED]>:
> >
> > > Hello,
> > >
> > > I'm trying to setup surefire plugin to run GWTTestCase. This requires
> > some
> > > custom setup as the "hosted mode browser" requires GWT to read the java
> > > source code :
> > >
> > > maven-surefire-plugin
> > > 
> > >   
> > >
> > > src/it/java
> > >
> > > src/main/java
> > >   
> > >   
> > > 
> > >   gwt.args
> > >   -out target/www-test -logLevel ALL
> > > 
> > >   
> > >   -Xmx256M
> > > 
> > >
> > >
> > > Myissue is that - according to GWT log -- GWT does only lookup the
> > > surefire.class.path (JRE rt.jar + surefirebooter.jar), and not all
> other
> > > dependencies or additionalClassPathElements. It seems the classloader
> > > hierarchy used by surefire that is not supported by GWTTestCase.
> > >
> > > Any suggestion to get this working ?
> > >
> > >
> > >
> >
>
>
>
> --
> La mélancolie c'est communiste
> Tout le monde y a droit de temps en temps
> La mélancolie n'est pas capitaliste
> C'est même gratuit pour les perdants
> La mélancolie c'est pacifiste
> On ne lui rentre jamais dedans
> La mélancolie oh tu sais ça existe
> Elle se prend même avec des gants
> La mélancolie c'est pour les syndicalistes
> Il faut juste sa carte de permanent
>
> Miossec (2006)
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.lastfm.fr/listen/user/jeffmaury/personal
>


Re: surefire : classloader issue with GWTTestCase

2008-07-25 Thread Jeff MAURY
Using false may lead to classpath
too long for your environment and leading to ClassNotFoundException or
ClassNotFoundError. May be this is what you have ?

Jeff MAURY


On 7/25/08, nicolas de loof <[EMAIL PROTECTED]> wrote:
>
> Using false makes things work
> better, as the full classpath is scanned for java source files by the GWT
> compiler, but now I get
>
> "javax.servlet.ServletException: Class
> com.google.gwt.dev.shell.GWTShellServlet is not a Servlet"
> (looks like a classloader conflict)
>
>
> 2008/7/25 nicolas de loof <[EMAIL PROTECTED]>:
>
> > Hello,
> >
> > I'm trying to setup surefire plugin to run GWTTestCase. This requires
> some
> > custom setup as the "hosted mode browser" requires GWT to read the java
> > source code :
> >
> > maven-surefire-plugin
> > 
> >   
> >
> > src/it/java
> >
> > src/main/java
> >   
> >   
> > 
> >   gwt.args
> >   -out target/www-test -logLevel ALL
> > 
> >   
> >   -Xmx256M
> > 
> >
> >
> > Myissue is that - according to GWT log -- GWT does only lookup the
> > surefire.class.path (JRE rt.jar + surefirebooter.jar), and not all other
> > dependencies or additionalClassPathElements. It seems the classloader
> > hierarchy used by surefire that is not supported by GWTTestCase.
> >
> > Any suggestion to get this working ?
> >
> >
> >
>



-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.lastfm.fr/listen/user/jeffmaury/personal


Re: surefire : classloader issue with GWTTestCase

2008-07-25 Thread nicolas de loof
Using false makes things work
better, as the full classpath is scanned for java source files by the GWT
compiler, but now I get

"javax.servlet.ServletException: Class
com.google.gwt.dev.shell.GWTShellServlet is not a Servlet"
(looks like a classloader conflict)


2008/7/25 nicolas de loof <[EMAIL PROTECTED]>:

> Hello,
>
> I'm trying to setup surefire plugin to run GWTTestCase. This requires some
> custom setup as the "hosted mode browser" requires GWT to read the java
> source code :
>
> maven-surefire-plugin
> 
>   
>
> src/it/java
>
> src/main/java
>   
>   
> 
>   gwt.args
>   -out target/www-test -logLevel ALL
> 
>   
>   -Xmx256M
> 
>
>
> Myissue is that - according to GWT log -- GWT does only lookup the
> surefire.class.path (JRE rt.jar + surefirebooter.jar), and not all other
> dependencies or additionalClassPathElements. It seems the classloader
> hierarchy used by surefire that is not supported by GWTTestCase.
>
> Any suggestion to get this working ?
>
>
>


surefire : classloader issue with GWTTestCase

2008-07-25 Thread nicolas de loof
Hello,

I'm trying to setup surefire plugin to run GWTTestCase. This requires some
custom setup as the "hosted mode browser" requires GWT to read the java
source code :

maven-surefire-plugin

  

src/it/java

src/main/java
  
  

  gwt.args
  -out target/www-test -logLevel ALL

  
  -Xmx256M



Myissue is that - according to GWT log -- GWT does only lookup the
surefire.class.path (JRE rt.jar + surefirebooter.jar), and not all other
dependencies or additionalClassPathElements. It seems the classloader
hierarchy used by surefire that is not supported by GWTTestCase.

Any suggestion to get this working ?