dev@glassfish.java.net

Re: Unresolved constraint in bundle - external jar for module

From: Sahoo <Sahoo_at_Sun.COM>
Date: Thu, 08 Jan 2009 22:07:54 +0530

Looking at the manifest.mf, I don't see the packages being exported with
any version, so the version defaults to 0.0.0. That explains why there
is an unresolved import package as the importer is looking for version
>=1.6.0. You need to add a version attribute to your Export-Package
header in pom.xml. Again, look asm-all/pom.xml for reference.

By the way, do you know how to enable Felix remote shell in GFv3? It is
a very convenient tool to debug OSGi issues. Take a look at
$GlassFishRoot/felix/conf/config.properties. Search for "shell" in that
file and you shall find instructions to enable the shell. Once you do
that, from any host in the network, you can do "telnet <host> 6666". On
the telnet prompt, you can run Felix shell commands to administer the
OSGi runtime. Type help to find all the supported commands.

Thanks,
Sahoo

Claudio Miranda wrote:
> Thanks for the advice Sahoo.
>
> I am not an osgi/felix expert, but could take a look at
> distributions/external/asm-all/pom.xml as a sample, I could create the
> attached pom file.
>
> It produced a file of 536K as the same size of the jodatime.jar
> ~/.m2/repository/org/glassfish/external/jodatime-repackaged/3.0-SNAPSHOT/jodatime-repackaged-3.0-SNAPSHOT.jar
>
> But deploying those files to $GFV3/modules and restarting gfv3, throws
> the following
>
> [#|2009-01-08T03:07:35.863-0200|SEVERE|glassfish|null|_ThreadID=15;_ThreadName=Thread-4;|Caused
> by: org.osgi.framework.BundleException: Unresolved constraint in
> bundle 76: package;
> (&(package=org.joda.time.chrono)(version>=1.6.0))|#]
>
> Unfortunately I could not advance, I started to read osgi/felix
> guides, but they are not easy to digest in a short time.
> Please, could you take a look and see if there is any misconfiguration ?
>
> The manifest file is attached, there are osgi info there.
>
> Thanks
>
> Claudio
>
> On Thu, Jan 8, 2009 at 6:13 AM, Sahoo <Sahoo_at_sun.com> wrote:
>
>> An OSGi bundle can't resolve classes from non-OSGi bundles. So, you have to
>> convert/wrap those libraries to/as OSGi bundles.
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>