directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Upgrade Issues / Dealing with OSGI
Date Fri, 24 Apr 2015 00:00:23 GMT
Le 24/04/15 01:25, Gregory Chanan a écrit :
> I wanted to upgrade the LDAP API version of my application to pick up
> https://issues.apache.org/jira/browse/DIRAPI-219.  Unfortunately, I hit
> some problems, namely:
>
>  java.lang.IllegalAccessError: tried to access field
> org.apache.directory.api.ldap.codec.osgi.DefaultLdapCodecService.controlFactories
> from class
> org.apache.directory.api.ldap.codec.standalone.StandaloneLdapApiService
>
> I tracked this down to upgrading from M21 to M22 (i.e. my code works with
> M21, doesn't work with M22), where it looks like DefaultLdapCodecService is
> now a superclass of StandaloneLdapApiService.  StackOverflow suggests this
> can be caused by different class loaders:
> http://stackoverflow.com/questions/3386662/illegalaccesserror-accessing-a-protected-method/3387520#3387520
>
> Has anyone seen this? 
Most certainly a classloader issue.

Another exampel of such a siutation, in a OSGi context is described in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=152568


>  Is there a suggested workaround?
Well, the best would be to encapsulate the field into a public getter. I
can do that.


Mime
View raw message