Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to resolve 128.0: missing requirement javax.ws.rs.client

Zhivko Dimitrov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2018

Hi guys! I'm trying to implement a repository hook for bitbucket server, which communicates with a REST service. I'm having issues with configuring the maven dependencies in such way that OSGi can find them during runtime or installation.

The first thing I've tried was to specify the version range for the package javax.ws.rs.client like that:

<Import-Package>
...other packages
javax.ws.rs*;version="[2.0,3.0)",
*"
</Import-Package>

 When doing this, I'm getting the following error message:

 Unable to resolve 139.0: missing requirement [139.0] osgi.wiring.package; (&(osgi.wiring.package=javax.ws.rs.client)(version>=2.0.0)(!(version>=3.0.0)))

 When I mark the package as optional, the installation of the plugin is successful, but I get an exception:

Caused by: java.lang.ClassNotFoundException: javax.ws.rs.client.ClientBuilder not found by myhook
[INFO] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)

The javax.ws.rs-api depencency comes from this maven dependency in my pom:

<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.19</version>
<scope>compile</scope>
</dependency>

I've also tried with scope provided, but no success.

When I look in the OSGi browser in Bitbucket, I can see the following:

image.png

The entries are not red (as described in the Atlassian documentation about the OSGi browser), but I can see they don't have "Provided by..."

 

Does someone have an idea where is the problem? Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events