Announcement Announcement Module
No announcement yet.
org.springframework.web.HttpMediaTypeNotAcceptable Exception Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.web.HttpMediaTypeNotAcceptable Exception

    I have a web application that is making a json call on a annotated controller. The call returns json as expected. I noticed that if I invoke the controller from the browser url using eclipse and tomcat that the browser returns the json representation of object I requested. So far so good, when I deploy the application to Oracle Iplanet 7 and do the same thing, I get a org.springframework.web.HttpMediaTypeNotAcceptable Exception: Could not find acceptable representation. The regular json call works fine when invoked from Oracle Iplanet 7 as well. It just fails if I call the controller directly from a browser url.

    Does anyone have any idea why it works on tomcat but does not work on Oracle Iplanet 7? The browser is sending over the following accept headers: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8". The "*/*" should allow it to be handled by the MappingJacksonHttpMessageConverter.

    I am stumped.

    I am running Spring 3.0.7.

    Any suggestions would be greatly appreciated.

    Last edited by MartyJones; Jul 30th, 2012, 10:37 AM.

  • #2
    I did some debugging and found a bug in the HttpHeaders class.

    Here is a link to the Jira issue if anyone is interested.