Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST module with specific scanned packages

Ricardo Herrera October 8, 2019

Hi, I'm making a plugin with REST module where I want to only specific packages to be scanned searching for providers, I read on official documentation that this can be done by using the element <package> inside <rest> element, something like this:

<rest name="myRestModule" key="rest" path="/myservices" version="1.0">
    <package>com.example.mypackage</package>
</rest>

App is deployed well, but when I try to invoke some service at that path I get:

Caused by: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.RootResourceUriRules.<init>(RootResourceUriRules.java:99)
at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1359)
at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:180)
at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:799)
at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:795)
... 1 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.initiate(RestDelegatingServletFilter.java:164)

I found on Internet that this is due Jersey didn't find any Provider to register, so I assume <package> is not working properly or am I missing something?

1 answer

1 accepted

0 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2019

Hi @Ricardo Herrera ,

 

If you don't manage to get anything useful in here, you may want to reach to the resources listed in https://developer.atlassian.com/resources. 

Suggest an answer

Log in or Sign up to answer