Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10119

ContentNegotiatingViewResolver - Upgrade from 3.1 to 3.2 causes ClassCastException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.2 GA
    • Fix Version/s: 3.2.1
    • Component/s: Core, Web
    • Labels:
      None

      Description

      After having upgraded an existing web application from 3.1 to 3.2, the ContentNegotiatingViewResolver does not initialize correctly anymore and a ClassCastException exception is being thrown:

      java.lang.String cannot be cast to org.springframework.http.MediaType
      

      Using the new ContentNegotiationManager solves the issue. This issue is also described in the following forum thread:

      http://forum.springsource.org/showthread.php?133343-3-1-2-gt-3-2-issue-with-ContentNegotiatingViewResolver

        Attachments

          Activity

            People

            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              hillert Gunnar Hillert
              Last updater:
              Rossen Stoyanchev
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 21 weeks, 2 days ago