JAX-RS project, using Maven and deploying with Tomcat, not working [message #1725992] |
Tue, 08 March 2016 16:46  |
Eclipse User |
|
|
|
I've developed a RESTful service with JAX-RS, using Jersey libraries. I've builded and compiled it (with no errors) and I've deployed it with Tomcat 8.0.
But when I access to the service through the browser, always the same error:
Status HTTP 404 - Not Found
type Informe de estado
message Not Found
description The requested resource is not available
Apache Tomcat/8.0.21
I've already past several days struggling with this, and I can't find a solution. I've followed multiples tutorials, some of them very easy ones, but none of them got my service working.
You can download the project and try the service from my Github (can't post link directly):
user: daniegarcia254
project: SmartCULM
branch: develop_eclipse
Project use Eclipse plugin for Maven repositories for the needed libraries that are in the pom.xml file.
I think my final mistake is that I don't nail the service URL, but I've tried in a thousand different ways. Maybe I have the wrong structure of project or the wrong web.xml config, don't sure anymore about anythin!
For extra info, here the URL I'think should be the one valid to access the RESTful service once it's deployed:
http://localhost:8080/smartculm/api/service/noticias
|
|
|
Re: JAX-RS project, using Maven and deploying with Tomcat, not working [message #1726005 is a reply to message #1725992] |
Tue, 08 March 2016 18:37  |
Eclipse User |
|
|
|
On 03/08/2016 03:05 PM, Daniel Garcia wrote:
> I've developed a RESTful service with JAX-RS, using Jersey libraries.
> I've builded and compiled it (with no errors) and I've deployed it with
> Tomcat 8.0.
>
> But when I access to the service through the browser, always the same
> error:
>
> Status HTTP 404 - Not Found
>
> type Informe de estado
>
> message Not Found
>
> description The requested resource is not available
>
> Apache Tomcat/8.0.21
>
> I've already past several days struggling with this, and I can't find a
> solution. I've followed multiples tutorials, some of them very easy
> ones, but none of them got my service working.
>
> You can download the project and try the service from my Github (can't
> post link directly):
>
> user: daniegarcia254
> project: SmartCULM
> branch: develop_eclipse
>
> Project use Eclipse plugin for Maven repositories for the needed
> libraries that are in the pom.xml file.
>
> I think my final mistake is that I don't nail the service URL, but I've
> tried in a thousand different ways. Maybe I have the wrong structure of
> project or the wrong web.xml config, don't sure anymore about anythin!
>
> For extra info, here the URL I'think should be the one valid to access
> the RESTful service once it's deployed:
>
> http://localhost:8080/smartculm/api/service/noticias
Daniel,
The forum to post such a question in is the Eclipse Web Tools Platform
(WTP) forum.
I looked at your web.xml. You do not specify a <servlet-class>.
Depending on where Jersey's gone since I stopped using it a couple of
years ago, you should have something like:
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
typically the next line after <servlet-name> (where I put it).
The rest looks good (no pun intended).
Hope this helps.
|
|
|
Powered by
FUDForum. Page generated in 0.07761 seconds