[jersey-Servlet]: com.sun.jersey.api.container.Containerexception: The Resourceconfig instance does not contain any root Resource classes

Asked

Viewed 103 times

0

I’m trying to get application up in WAS 8.5, but I’m making this mistake when deploying, and with that the application does not run.

WEB.XML

<servlet>
    <servlet-name>jersey-servlet</servlet-name>
    <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
    <init-param>
        <param-name>com.sun.jersey.config.property.packages</param-name>
        <param-value>br.com.mypack.gestaoacesso.services;br.com.mypack.gestaoacesso.helper.jersey</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>jersey-servlet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

Class annotation:

@Path("/AutenticacaoRest")
public class AutenticacaoWsImpl

Can anyone tell me the root cause or solution for this problem?

Thanks in advance.

  • What version of Jersey are you wearing?

  • I’m using version 1.19

  • 1

    Can you change the version? If so, try placing these dependencies on Pastebin. http://pastebin.com/hi4XvnYW. I had several problems with Jersey, with these dependencies worked perfectly.

  • All right, @adelmo00 I’ll change it and take the test. Thank you!

  • The amendment worked?

  • No, the error persisted and even exploded classNotFoundException. I think the problem is the conflict of libraries embedded in the jersey application with the libraries that WAS already contains in it.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.