Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9643

Getting Internal server error on exception if the rest service content type is "application/xml"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: REST
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1) create a rest service

      @RestController
      @RequestMapping({"security/testController"})
      public class TestController
      {
        @RequestMapping(value={"/applicationList"}, method={org.springframework.web.bind.annotation.RequestMethod.GET}, headers={"Accept=application/xml"} , produces=MediaType.APPLICATION_JSON_VALUE)
        public TreeDataProvider getListOfApplication()
        {
          return new TreeDataProvider();
        }
      }
      

      2) Create a Spring interceptor and throw an exception
      3) create a spring exception handler to return exception as json

      Show
      1) create a rest service @RestController @RequestMapping({ "security/testController" }) public class TestController { @RequestMapping(value={ "/applicationList" }, method={org.springframework.web.bind.annotation.RequestMethod.GET}, headers={ "Accept=application/xml" } , produces=MediaType.APPLICATION_JSON_VALUE) public TreeDataProvider getListOfApplication() { return new TreeDataProvider(); } } 2) Create a Spring interceptor and throw an exception 3) create a spring exception handler to return exception as json

      Description

      We are getting Internal server error if any exception is thrown from spring interceptor when rest API header is set as "application/xml". This works if the rest API header is set as "application/json".

      we didnt see this issue in jboss 7 and WAS

        Attachments

          Activity

            People

            Assignee:
            rhn-support-asoldano Alessio Soldano
            Reporter:
            gopalkrishnams test tesing (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: