Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-495

resteasy-jaxrs-2.1.0.GA/examples/oreilly-workbook/ex07_1/ example incorrectly not returning "Customer not found."

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • Hide

      Navigate to the Ch 7 -1 example, and run "mvn clean install", you won't see the "Customer not found" string output as you should.

      This example throws different exceptions with CXF's JAX-RS implementation, but I would like to see it fully working with RESTEasy before exploring with that stack.

      Show
      Navigate to the Ch 7 -1 example, and run "mvn clean install", you won't see the "Customer not found" string output as you should. This example throws different exceptions with CXF's JAX-RS implementation, but I would like to see it fully working with RESTEasy before exploring with that stack.

      According to the explanation for example 07-1 in Bill Burke's RESTful Java with JAX-RS book (page 238): "One thing to notice about this client code is that if the server returns a 404 response code, HttpURLConnection will throw a java.io.FileNotFoundException." The book may be wrong, because the server is returning a 404 but no FNFE is being thrown. (I've tested it by putting a debugging statement in CustomerResourceTest.testCustomerResource()). If the book is in error, this example should be rewritten to return the "Customer not found" string even though the FNFE is not being thrown. Or, fix the code so the FNFE will be thrown so the user will see this message.

            patriot1burke@gmail.com Bill Burke (Inactive)
            mazzag Glen Mazza (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: