• Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple enough why the 405 and 404 errors?

 
Colin Roberts
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

This is my first RESTful CRUD application. Everything works except for DELETE, which I am attempting to use, curiously enough, to delete something. I'm getting either a 405 (Method not allowed) or a 404, and I can't see why. I am posting two versions (405 and 404) of my delete problem. To me, they should both work.

I'm using the Drop Wizard 0.8.0 product, which has Jersey under the hood.

I would appreciate it if someone could point out to me the error of my ways.

Thanks

The 405 call:



The 405 error:



The 404 call:



The 404 error:



The code:

Everything works except the two DELETE methods.

 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about the product you are using but did you try some samples with Jersey as in here?
 
Colin Roberts
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

Solved my own problem and yes it was something dumb. Stared a hole through my computer screen but couldn't see it.

Everything that works is declared as public. The two problem methods are declared as private. Make the private public and life gets better.

Cut-and-paste--that most primitive form of code reuse--can be both a friend and an enemy. This time it turned on me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!