bnd osgi project not running through the Firefox

127 Views Asked by At

I just start learning how to build a bnd OSGI project. I try to run a very simple project without any error message,but when I go to localhost, it shows "HTTP ERROR: 404".

the simple class:

enter image description here

an Activator class: enter image description here

rest build dependencies

enter image description here

Run dependencies

enter image description here

http error:

enter image description here

Thanks for your helps!!

2

There are 2 best solutions below

6
On

Your class is annotated with jax-rs annotations and publishes an OSGi service. If this exposes the services as a REST resources depends on the bundles you install.

You have to install a bundle that watches for such services and creates the REST endpoints for them.

See enter link description here I think you at least need to also add the org.amdatu.web.wink bundle to your bdnrun file.

1
On

The latest 2.0.4 release of the org.amdatu.web.rest.wink bundle doesn't play well with Felix Http Jetty 3.x.

If you pin the version of that bundle to the 2.0.3 version things should work as expected. To do this change the org.amdatu.web.rest.wink entry your runbnd.bndrun -runbundles to:

org.amdatu.web.rest.wink;version='[2.0.3,2.0.3]'