Hi Jérôme,

The com.sun.jersey.api package is provided by jersey-core jar.
It's exported by the jersey-core bundle (according to the MANIFEST).

You are right, the package shouldn't be imported and exported.

The bundle package statement should looks like :

<Export-Package>
   com.sun.jersey*...
</Export-Package>
<Import-Package>
   !com.sun.jersey*,
   *
</Import-Package>

Like this, it can support several version of jersey-core bundle in the same OSGi framework and avoid this kind of issue.

A possible workaround is to create your own jersey-core bundle using maven-bundle-plugin for example.

Regards
JB

On 08/26/2010 10:10 AM, Jérôme Pochat wrote:

Hi

I tried to install Jersey REST implementation into fresh Karaf 2.0.0
instance without any success. This was working fine in previous version of
Karaf. What is strange is that there is no problem to install it inside
Felix 3.0.*.

install jsr311-api-1.1.1.jar ==>  Success
install jersey-core-1.3.jar ==>  Failed

Error executing command: Unresolved constraint in bundle
com.sun.jersey.jersey-core [34]: Unable to resolve 34.0: missing requirement
[34.0] package; (package=com.sun.jersey.api.representation) - [34.0]
package; (package=com.sun.jersey.api.representation)

This package is imported and exported by the same bundle. Could it be a
reason of the issue?

Thanks in advance for help.

Reply via email to