[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: junit issue



On 06/18/2013 03:06 PM, James Page wrote:
> Hi Olivier
>
> On 18/06/13 12:11, Olivier Sallou wrote:
>> What is strange is it fails at junit time (via ant task) with error:
>> java.lang.NoClassDefFoundError: junit/framework/JUnit4TestAdapterCache
>>
>>      [junit] Running org.biojava3.core.sequence.DNATest
>>      [junit] Testsuite: org.biojava3.core.sequence.DNATest
>>      [junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time
>> elapsed: 0 sec
>>      [junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time
>> elapsed: 0 sec
>>      [junit]
>>      [junit]     Caused an ERROR
>>      [junit] junit/framework/JUnit4TestAdapterCache
>>      [junit] java.lang.NoClassDefFoundError:
>> junit/framework/JUnit4TestAdapterCache
>>      [junit]     at java.lang.ClassLoader.defineClass1(Native Method)
>>      [junit]     at
>> java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>>      [junit]     at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>>
>> I looked at Junit4.jar content and JUnit4TestAdapterCache is still there
>> (and biojava code does not call it).
>> Looks like the noclassdeffounderror hides the name of the class it is
>> looking for.
>>
>> Any idea what's going on  or how I could debug this?
>
> I think I just fixed something similar in commons-compress; could you
> check that you have ant-junit4.jar on your classpath for ant?  without
> this the ant junit task appears to struggle detect JUnit4 test stuff.
ant-junit4 is in ant path. My build.xml has not changed since last
successful build (not source), only my system (dependencies update).

I just tried to set fork="true" to junit, and it worked. But I do not
know why? What is the difference with previous versions.

Olivier
>
> Cheers
>
> James
>
>

-- 
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95

gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438


Reply to: