directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <akaras...@apache.org>
Subject Re: [OSGi] Shared bundles update
Date Tue, 18 Jan 2011 19:31:12 GMT
On Tue, Jan 18, 2011 at 4:32 PM, Pierre-Arnaud Marcelot <pa@marcelot.net> wrote:
> 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.

Yeah but I was thinking it can be exported by the bundle that actually
has classes in this base package. The shared-ldap-schema module has no
classes in this package. Maybe it has to export the package too, I
don't know.

> 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.

Ahh yes I thought this might happen, a test using PAX exam would have
helped me detect this but thanks for catching it.

> 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... :)

Awesome. So now Studio is fully integrated directly with the Shared
bundles. We could refactor them while including Studio in our IDE.

-- 
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
To set up a meeting with me: http://tungle.me/AlexKarasulu

Mime
View raw message