0
votes

I tried to start an OSGI REST bundle. i put the following import package : javax.ws.rs, org.codehaus.jackson.jaxrs, org.apache.cxf.jaxrs.client,

When I run the bundle I get the following error: osgi.wiring.package; filter:="(&(osgi.wiring.package=javax.ws.rs)(version>=2.0.0)(!(version>=3.0.0)))"]]]

1
Sounds like a dependency issue. Can you the dependencies you are pulling in? Are you bringing in cxf-rt-frontend-jaxrs and/or javax.ws.rs-api? - J Woodchuck
The data is incomplete. Can you put full logs and manifest.mf of your bundle ? - CourseTriangle

1 Answers

0
votes

Step1: check that you imported(runtime import) those packages into your bundle:

-if you are building your bundle using maven-bundle-plugin, in the pom.xml do like this:

    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
            <instructions>
              ...
              <Import-Package>
                javax.ws.rs*,
                org.codehaus.jackson*,
                org.apache.cxf.jaxrs*,
              </Import-Package>
              ...
           </instructions>
        </configuration>
    </plugin>
  • Unless, list those packages in the manifest.mf.

Step 2: ckeck that those packages are well deployed in your container: provided or manually deployed in the container. If using Apache Karaf, there is a feature called cxf-jaxrs => install/start it.