Topic
  • No replies
MRKB
MRKB
9 Posts

Pinned topic OSGI and REST service getting 404 Error

‏2012-10-06T01:49:57Z |
Team,

I have a REST service developed in Dynamic web Application, Using rest client tested the service and worked good.

Moved the same code to OSGi Bundle and getting the following error:

10/5/12 21:13:28:183 VET 00000027 RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (404 - Not Found) with message 'null' while processing GET request sent to http://localhost:9080/restservice/jaxrs/catalog/tasks
10/5/12 21:14:01:372 VET 00000027 RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (404 - Not Found) with message 'null' while processing GET request sent to http://localhost:9080/restservice/jaxrs/catalog/tasks

url used: http://localhost:9080/restservice/jaxrs/catalog/tasks

@Path("/catalog")
public class TaskCatalogResource {

@GET
@Produces( MediaType.APPLICATION_JSON)
@Path("/tasks")
public JSONArray getTasks() throws IOException {
System.out.println("GetTasks Called");

...
}
}
web.xml
<init-param>
<param-name >javax.ws.rs.Application</param-name>
<param-value >rest.test.service.MyRestApplication</param-value>
</init-param>

Any help is much appreciated.
Got stuck here with this issue

Thank you,
MRKB