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

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.

Cheers
Niclas