Skip to main content



      Home
Home » Newcomers » Newcomers » JAX-RS project, using Maven and deploying with Tomcat, not working(Requested resource always not found, after build, compilation and deploying success)
icon9.gif  JAX-RS project, using Maven and deploying with Tomcat, not working [message #1725992] Tue, 08 March 2016 16:46 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:External tools, outputting to console, and clicking on output to go to line
Next Topic:Auto-completion configuration options
Goto Forum:
  


Current Time: Wed Jul 09 23:23:28 EDT 2025

Powered by FUDForum. Page generated in 0.07761 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top