Oh dear, maven seems to be using a different java to my eclipse
installation;
[tomh@localhost simple]$
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/bin/java -version
java version "1.5.0"
gij (GNU libgcj) version 4.4.0 20090506 (Red Hat 4.4.0-4)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[tomh@localhost simple]$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.5) (fedora-22.b16.fc11-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b15, mixed mode)
Tom
On 02/07/09 21:07, Tom H wrote:
> Hi,
>
> Thanks for the reply, I've some comments in-lined below;
>
>
> On 02/07/09 20:09, Anders Hammar wrote:
>> Hi,
>>
>> As a starter, you should probably upgrade Maven as version 2.0.4 is
>> VERY old. You can tell from your attached output that there are newer
>> surefire plugin versions that can't be used with Maven 2.0.4.
>
> I am pretty much stuck with what's in the fedora11 repos, so I am
> hoping to fix the problem or send in a bug report...
>
>> Regarding your problem: Try running with "-X" (debug) instead of "-e"
>> and then check the output. Look for the test classpath and verify that
>> ./target/test-classes/ is included in the path.
>
> Just before the ClassNotFoundException it tries to run this;
>
> Forking command line: /bin/sh -c "cd
> /home/tomhodder/eclipse/workspace/simple &&
> /usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/bin/java -jar
> /tmp/surefirebooter4m1yoz.jar /tmp/surefire4m1yoxtmp
> /tmp/surefire4m1yoytmp"
> org.apache.maven.surefire.booter.SurefireExecutionException: Unable to
> create test class 'com.mytutorial.AppTest';
>
> the surefire booter jar only contains this;
> [tomhodder@localhost simple]$ unzip -t /tmp/surefirebooter4m1yoz.jar
> Archive: /tmp/surefirebooter4m1yoz.jar
> testing: META-INF/MANIFEST.MF OK
> No errors detected in compressed data of /tmp/surefirebooter4m1yoz.jar.
>
> And the MANIFEST file contains the correct test-classes path....
>
> If I strace that fork command it does what looks like find the correct
> AppTest class, and then gives up;
>
> stat("/home/tomhodder/eclipse/workspace/simple/target/test-classes/com/mytutorial/AppTest.class",
> {st_mode=S_IFREG|0664, st_size=1006, ...}) = 0
> stat("/home/tomhodder/eclipse/workspace/simple/target/test-classes/com/mytutorial/AppTest.class",
> {st_mode=S_IFREG|0664, st_size=1006, ...}) = 0
> ftruncate(9, 69632) = 0
> mmap(NULL, 4096, PROT_READ|PROT_EXEC, MAP_SHARED, 9, 0x10000) =
> 0x7ff109a66000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0x10000) =
> 0x7ff109a65000
> write(2, "org.apache.maven.surefire.booter."...,
> 500org.apache.maven.surefire.booter.SurefireExecutionException: Unable
> to create test class 'com.mytutorial.AppTest'; nested exception is
> java.lang.ClassNotFoundException: com.mytutorial.AppTest not found in
> gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooter4m1yoz.jar],
> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}};
> nested exception is
> org.apache.maven.surefire.testset.TestSetFailedException: Unable to
> create test class 'com.mytutorial.AppTest'; nested exception i) = 500
> write(2, "s java.lang.ClassNotFoundExceptio"..., 100s
> java.lang.ClassNotFoundException: com.mytutorial.AppTest not found in
> gnu.gcj.runtime.SystemClassL) = 100
>
>
>
>
> any ideas on that?
>
> Tom
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
users-unsubscribe@...
> For additional commands, e-mail:
users-help@...
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe@...
For additional commands, e-mail:
users-help@...