简体   繁体   中英

bnd osgi project not running through the Firefox

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:

在此处输入图片说明

an Activator class: 在此处输入图片说明

rest build dependencies

在此处输入图片说明

Run dependencies

在此处输入图片说明

http error:

在此处输入图片说明

Thanks for your helps!!

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]'

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM