directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot ...@marcelot.net>
Subject Re: [OSGi] Shared bundles update
Date Tue, 18 Jan 2011 14:32:17 GMT
On 18 janv. 2011, at 10:44, Alex Karasulu wrote:
> [SNIP]
> 
>>>> After fixing an issue with a wrong version used in Studio for Commons Lang
>>>> (2.3 instead of 2.5) I was able to replace Studio's libraries plugins of
>>>> Shared by the OSGI-fied Shared dependencies within Eclipse.
>>>> Studio seems to work like a charm. :)
>> 
>> Unfortunately, Studio only seemed to work like a charm yesterday.
>> On the afternoon I ran into an issue with the loading of Schema elements (syntaxes,
matching rules). The classes couldn't be found.
>> This is related to the fact that two modules, shared-ldap and shared-ldap-schema,
share a package with the same name 'org.apache.directory.shared.ldap.schema'.
>> Since we're using the 'Import-Package' directive to link bundles in the MANIFEST.MF
file, having two bundles with an identical package name messes things up.
>> I'm going to rename of these packages to solve this issue.
>> 
> 
> Just thinking this might not be needed if for ldap-schema we simple omit or explicitly
use '-' prefix for this package in the manifest to prevent the export of oadsl.schema pkg.
This pkg has no classes in ldap-schema so it could work.

Actually the 'o.a.d.shared.ldap.schema' package must be exported because it used heavily by
other modueles in Shared, ApacheDS and Studio.

I've renamed the packages in the 'shared-ldap-schema' to have them not colliding with the
o.a.d.shared.ldap.schema' package name.
That fixed a first issue but it lead me to another one with some nasty ClassNotFoundExceptions.
In order to fix that second issue I had to explicitly add some package names from 'shared-ldap'
in the Import-Package directive of the 'shared-ldap-schema' bundle.
Some classes inside those packages are implicitly used by the DefaultSchemaManager class (class
names are taken from LDIF files and objects are instantiated via the Class.forName(className)
method).

Now, that's fixed and Studio works again... :)

Regards,
Pierre-Arnaud
Mime
View raw message