jetty - Jersey resource not resolving in OSGI -


i have been following tutorial video shows how run jersey server(edit: jax-rs server via apache wink, see accepted answer) in osgi. short video , process seems clear. i'm not clear on how helloworldresource loaded jersey. helloworldresource registered osgi container service using apache felix dependencyactivatorbase (which works great). gather apache felix whiteboard supposed somehow magically map jersey resource, when go run 404.

i know service mapped correctly shows in console when issue 'services' command. know server running or wouldn't 404 not found. i've double checked bundles , believe installed correctly.

any hints appreciated.

first of all, amdatu not based on jersey. jersey 1 of many jax-rs implementations available. amdatu based on apache wink. shouldn't matter however, since should programming standard anyway.

amdatu looks services registered object.class in service registry, , checks if registered service annotated @path annotation. if case, service registered jax-rs resource. way development model similar using jax-rs in java ee environment.

you can install apache felix dependency manager shell bundle debug services registered using dm. type following command in shell: dm <bundleid>. list registered services bundle. should see service registered java.lang.object. same bundle id of org.amdatu.web.rest.wink bundle. should see service: javax.servlet.servlet(init.applicationconfiglocation=/conf/application.properties,alias=/somepath,init.requestprocessorattribute=/somepath) registered.

also check if looking @ correct url. default, restful resources in amdatu registered root path (e.g. 'localhost:8080/myresource').


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -