Problem and fix related to: Rest with Java Tutorial

142 views
Skip to first unread message

Mert Nuhoglu

unread,
Jun 10, 2013, 4:24:33 AM6/10/13
to vog...@googlegroups.com
Hi,

Thank you for your tutorials Lars.

I followed the instructions in "Rest with Java" (http://www.vogella.com/articles/REST/article.html)

I work in Jersey 1.17. In step 6, I got the following error:

com.sun.jersey.api.client.UniformInterfaceException: GET http://localhost:8080/de.vogella.jersey.jaxb/rest/todo returned a response status of 404 Not Found

To solve the problem I changed the following line:

return UriBuilder.fromUri("http://localhost:8080/de.vogella.jersey.jaxb").build();

to

return UriBuilder.fromUri("http://localhost:8080/").build();

Now, it works properly.

Fyi and thank you very much for sharing your knowledge genereously.

Mert Nuhoglu

http://twitter.com/mertnuhoglu

Lars Vogel

unread,
Jun 17, 2013, 4:28:22 AM6/17/13
to vog...@googlegroups.com
Hi,

how the URL is constructed depends on your setup, if you do exactly as described in the tutorial the URL from the tutorial should be correct.

Best regards, Lars


2013/6/10 Mert Nuhoglu <mert.n...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vogella+u...@googlegroups.com.
To post to this group, send email to vog...@googlegroups.com.
Visit this group at http://groups.google.com/group/vogella.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages