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

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • None
    • REST
    • None
    • 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

            rhn-support-asoldano Alessio Soldano
            gopalkrishnams Gopal Krishna
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: