0

After update my spring from 3.1.2.RELEASE to 4.2.3.RELEASE and spring-security from 3.1.2.RELEASE to 3.2.9.RELEASE I'm having this error:

java.lang.IllegalStateException: Unable to locate object to be marshalled in model: {}
org.springframework.web.servlet.view.xml.MarshallingView.renderMergedOutputModel(MarshallingView.java:105)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)

Could someone help me out with what I might be missing here?

Thanks.

  • Why didn't you upgrade spring-security to 4.2.3.RELEASE to match your general spring version? Spring usually does not "mash" well between major releases. – Dan W Aug 31 '17 at 14:09
  • 1
    Can you please provide a bit more details here? What controller is being called when this exception occurs? How does the model of response look like? How it is annotated? There is a lot of similar questions and answer depends on details (check [this one](https://stackoverflow.com/questions/44075284/spring-4-jax2bmarshaller-error-when-using-setpackagestoscan) or [that one](https://stackoverflow.com/questions/7068628/spring-mvc-jaxb-servletexception-unable-to-locate-object-to-be-marshalled-in) - and pay attention to the level of details provided in those questions) – Kostiantyn Aug 31 '17 at 14:15
  • Spring and Spring Security have completely different versioning schemes... There is no reason to match those versions... – M. Deinum Aug 31 '17 at 14:23
  • @Kostiantyn the controller is default login – Wagner Santos Aug 31 '17 at 17:47

1 Answers1

0

I had a look on Samebug for you and our users mentioned the following:

This is a bug in Spring Framework, issue SPR-4518 and it's fixed in v3.0 M3.

jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.

If that doesn't help, here are a couple of other Stack Overflow questions that may help with this.MarshallingVJxBMarshaller