ant-problem after upgrading from junit 4.4 to junit 4.6

2009-05-14 Thread Walter, Matthias
Hello there,

I'm not quite sure if this is the correct mailing list for my problem,
please forgive me, if not.

I have a problem after upgrading junit from 4.4 to 4.6 on a Hudson
Server.

I get the error message:

[junit] Running org.path.to.my.test.class.SqliteBackupManagerTest
[junit] Testsuite: org.path.to.my.test.class.SqliteBackupManagerTest

/some/path/to/my/build.xml:188: java.lang.NoClassDefFoundError:
org/junit/Assume$AssumptionViolatedException

If I downgrade to junit 4.4 the problem disappears.

Hudson uses a build.xml for performing the tests:


target name=test depends=test-compile description=runs the
testcases
junit fork=yes forkmode=once printsummary=true 
jvmarg
value=-Dprojekte.home=${projekte.home}/
!-- cobertura.ser Datei einbinden --
sysproperty
key=net.sourceforge.cobertura.datafile
file=${build(folder)}/${build.instrumented-classes(folder)}/${cobertura
(file)} /
classpath
!-- instrumented-cobertura-classes
einbinden --
!--
Note the classpath order:
instrumented classes are before the
original (uninstrumented)
classes.  This is important.
--
pathelement
location=${build(folder)}/${build.instrumented-classes(folder)} /
pathelement
location=${build(folder)}/${build.classes(folder)} / 
pathelement
location=${source(folder)}/${source.resources(folder)} /
pathelement
location=${test(folder)}/${test.build(folder)}/${test.build.classes(fol
der)} /
pathelement
location=${test(folder)}/${test.source(folder)}/${test.source.resources
(folder)} /
fileset
dir=${test(folder)}/${test.lib(folder)} includes=**/*.jar /
fileset dir=${lib(folder)}
includes=**/*.jar /
path refid=cobertura.classpath /
/classpath
formatter type=brief usefile=false /
formatter type=xml /
batchtest
todir=${build(folder)}/${build.reports(folder)}/${build.reports.junit(f
older)}
fileset
dir=${test(folder)}/${test.source(folder)} includes=**/*Test.java /
/batchtest

/junit
junitreport
todir=${build(folder)}/${build.reports(folder)}/${build.reports.junit(f
older)} /
/target
 

I reported the problem in the junit-forum and I was given the advice:

This appears to be a hard-coded dependency from ant to an internal class
in JUnit. Can you bring it up on an ant forum? Encourage them to report
problems to ju...@yahoogroups.com, or the JUnit issue tracker.

This is why I'm posting it here.

Can you help me?


Thanks in advance, Matthias


Informationen (einschliesslich Pflichtangaben) zu einzelnen, innerhalb der EU
taetigen Gesellschaften und Zweigniederlassungen der CITTI-Gruppe finden Sie 
unter
http://www.citti.de/html/pflichtangaben.html. Diese E-Mail enthaelt vertrauliche
und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige 
Adressat
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort
den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

Please refer to http://www.citti.de/html/pflichtangaben.html for information
(including mandatory corporate particulars) on selected CITTI branches and group
companies registered or incorporated in the European Union. This e-mail may 
contain
confidential and/or privileged information. If you are not the intended 
recipient
(or have received this e-mail in error) please notify the sender immediately and
delete this e-mail. Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.



-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: ant-problem after upgrading from junit 4.4 to junit 4.6

2009-05-14 Thread Stefan Bodewig
Hi Matthias,

On 2009-05-14, Walter, Matthias m.wal...@citti.de wrote:

 Hello there,

 I'm not quite sure if this is the correct mailing list for my problem,
 please forgive me, if not.

 I have a problem after upgrading junit from 4.4 to 4.6 on a Hudson
 Server.

 I get the error message:

 [junit] Running org.path.to.my.test.class.SqliteBackupManagerTest
 [junit] Testsuite: org.path.to.my.test.class.SqliteBackupManagerTest

 /some/path/to/my/build.xml:188: java.lang.NoClassDefFoundError:
 org/junit/Assume$AssumptionViolatedException

could you provide the full stacktrace (running ant in verbose mode, if
necessary)?

I've grepped through Ant's sources and can't find any reference to
AssumptionViolatedException or he Assume class in Ant's trunk or Ant
1.7.1.

It may be some other library/tool that you are using during your test.
Cobertura is a likely candidate.

Stefan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: ant-problem after upgrading from junit 4.4 to junit 4.6

2009-05-14 Thread Peter Reilly
It is very very unlikely that cobertura is the problem
Most likely the use'r code was compiled against one
version of junit and tested with a different version.

Peter


On Thu, May 14, 2009 at 10:31 AM, Stefan Bodewig bode...@apache.org wrote:
 Hi Matthias,

 On 2009-05-14, Walter, Matthias m.wal...@citti.de wrote:

 Hello there,

 I'm not quite sure if this is the correct mailing list for my problem,
 please forgive me, if not.

 I have a problem after upgrading junit from 4.4 to 4.6 on a Hudson
 Server.

 I get the error message:

 [junit] Running org.path.to.my.test.class.SqliteBackupManagerTest
 [junit] Testsuite: org.path.to.my.test.class.SqliteBackupManagerTest

 /some/path/to/my/build.xml:188: java.lang.NoClassDefFoundError:
 org/junit/Assume$AssumptionViolatedException

 could you provide the full stacktrace (running ant in verbose mode, if
 necessary)?

 I've grepped through Ant's sources and can't find any reference to
 AssumptionViolatedException or he Assume class in Ant's trunk or Ant
 1.7.1.

 It may be some other library/tool that you are using during your test.
 Cobertura is a likely candidate.

 Stefan

 -
 To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
 For additional commands, e-mail: dev-h...@ant.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



AW: ant-problem after upgrading from junit 4.4 to junit 4.6

2009-05-14 Thread Walter, Matthias
Hi there,

the stacktrace is

[junit] Exception in thread main java.lang.NoClassDefFoundError: 
org/junit/Assume$AssumptionViolatedException
[junit] at 
org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:240)
[junit] at 
org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333)
[junit] at 
org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217)
[junit] at 
org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197)
[junit] at 
org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143)
[junit] at 
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:142)
[junit] at 
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:61)
[junit] at 
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:54)
[junit] at 
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
[junit] at 
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
[junit] at 
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:52)
[junit] at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:743)


The files are compiled against 4.6 and run with 4.6. However, the problem 
disappears if I change forkmode from once to perTest. This is doing the job 
for me

Thanks a lot for your help,

Matthias


-Ursprüngliche Nachricht-
Von: Stefan Bodewig [mailto:bode...@apache.org] 
Gesendet: Donnerstag, 14. Mai 2009 11:32
An: dev@ant.apache.org
Betreff: Re: ant-problem after upgrading from junit 4.4 to junit 4.6

Hi Matthias,

On 2009-05-14, Walter, Matthias m.wal...@citti.de wrote:

 Hello there,

 I'm not quite sure if this is the correct mailing list for my problem,
 please forgive me, if not.

 I have a problem after upgrading junit from 4.4 to 4.6 on a Hudson
 Server.

 I get the error message:

 [junit] Running org.path.to.my.test.class.SqliteBackupManagerTest
 [junit] Testsuite: org.path.to.my.test.class.SqliteBackupManagerTest

 /some/path/to/my/build.xml:188: java.lang.NoClassDefFoundError:
 org/junit/Assume$AssumptionViolatedException

could you provide the full stacktrace (running ant in verbose mode, if
necessary)?

I've grepped through Ant's sources and can't find any reference to
AssumptionViolatedException or he Assume class in Ant's trunk or Ant
1.7.1.

It may be some other library/tool that you are using during your test.
Cobertura is a likely candidate.

Stefan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Informationen (einschliesslich Pflichtangaben) zu einzelnen, innerhalb der EU
taetigen Gesellschaften und Zweigniederlassungen der CITTI-Gruppe finden Sie 
unter
http://www.citti.de/html/pflichtangaben.html. Diese E-Mail enthaelt vertrauliche
und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige 
Adressat
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort
den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

Please refer to http://www.citti.de/html/pflichtangaben.html for information
(including mandatory corporate particulars) on selected CITTI branches and group
companies registered or incorporated in the European Union. This e-mail may 
contain
confidential and/or privileged information. If you are not the intended 
recipient
(or have received this e-mail in error) please notify the sender immediately and
delete this e-mail. Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.



-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: ant-problem after upgrading from junit 4.4 to junit 4.6

2009-05-14 Thread Stefan Bodewig
On 2009-05-14, Walter, Matthias m.wal...@citti.de wrote:

 Hi there,

 the stacktrace is

   [junit] Exception in thread main java.lang.NoClassDefFoundError: 
 org/junit/Assume$AssumptionViolatedException
   [junit] at 
 org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:240)

I don't think this is the current source, but
http://springframework.cvs.sourceforge.net/viewvc/springframework/spring/tiger/mock/org/springframework/test/context/junit4/SpringMethodRoadie.java?revision=1.13view=markup
contains a hard reference to the class in question.

So it's not Ant but the Spring test context that fails when used with
JUnit 4.6.

 The files are compiled against 4.6 and run with 4.6. However, the
 problem disappears if I change forkmode from once to
 perTest. This is doing the job for me

This is something I don't understand, at all.

Stefan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



AW: ant-problem after upgrading from junit 4.4 to junit 4.6

2009-05-14 Thread Walter, Matthias
Ok, I got it.

SpringMethodRoadie uses AssumptionViolatdException, but this Exception 
disappeared in 4.6.

Thanks a lot for your help!

Matthias

-Ursprüngliche Nachricht-
Von: Stefan Bodewig [mailto:bode...@apache.org] 
Gesendet: Donnerstag, 14. Mai 2009 14:37
An: dev@ant.apache.org
Betreff: Re: ant-problem after upgrading from junit 4.4 to junit 4.6

On 2009-05-14, Walter, Matthias m.wal...@citti.de wrote:

 Hi there,

 the stacktrace is

   [junit] Exception in thread main java.lang.NoClassDefFoundError: 
 org/junit/Assume$AssumptionViolatedException
   [junit] at 
 org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:240)

I don't think this is the current source, but
http://springframework.cvs.sourceforge.net/viewvc/springframework/spring/tiger/mock/org/springframework/test/context/junit4/SpringMethodRoadie.java?revision=1.13view=markup
contains a hard reference to the class in question.

So it's not Ant but the Spring test context that fails when used with
JUnit 4.6.

 The files are compiled against 4.6 and run with 4.6. However, the
 problem disappears if I change forkmode from once to
 perTest. This is doing the job for me

This is something I don't understand, at all.

Stefan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Informationen (einschliesslich Pflichtangaben) zu einzelnen, innerhalb der EU
taetigen Gesellschaften und Zweigniederlassungen der CITTI-Gruppe finden Sie 
unter
http://www.citti.de/html/pflichtangaben.html. Diese E-Mail enthaelt vertrauliche
und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige 
Adressat
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort
den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

Please refer to http://www.citti.de/html/pflichtangaben.html for information
(including mandatory corporate particulars) on selected CITTI branches and group
companies registered or incorporated in the European Union. This e-mail may 
contain
confidential and/or privileged information. If you are not the intended 
recipient
(or have received this e-mail in error) please notify the sender immediately and
delete this e-mail. Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.



-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org