[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] IllegalAccessError

Niclas Hedhman wrote:
> On Monday 11 September 2006 23:43, Costin Leau wrote:
>> Hi,
>> I'm working on a OSGi-Junit integration (as part of Spring-OSGi
>> initiative) and I've run into a strange issue when I deploy my bundles -
>> I get an IllegalAccessError. I've tried the code on both KF 2.0.0 and
>> Equinox 3.1.2 and 3.2.0 and all of them throw the same exception which
>> makes me believe that this is a generic OSGi issue.
>> Below is the stacktrace:
>> java.lang.IllegalAccessError: tried to access method
>> junit.framework.TestCase.<init>()V from class
> This should indicate that TestCase doesn't have a public default 
> constructor...
> IIRC, way/way/way back in time, didn't Junit have a 
>   public TestCase( String name )
> constructor only??
> So, are you sure you are using junit 3.8 ?  Perhaps junit sits hiding in some 
> other bundle, so print out the package resolution map and check.

Niclas you are completely right! - a junit I was using was 3.7; probably
while doing development I replaced the 3.8.1 jar with this one.
Thanks for the suggestion and pointing me to the right direction (I was
chasing OSGi ghosts :) ).

> Cheers
> Niclas
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev