Announcement Announcement Module
No announcement yet.
AcceptHeaderLocaleResolver cannot be cast to LocaleResolver Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AcceptHeaderLocaleResolver cannot be cast to LocaleResolver

    I'm trying to rewrite pluto's dispatcher servlet using spring mvc. I'm running into what I think are classloading issues when I use Spring's dispatcher servlet instead of pluto's driver servlet OR a re-written plain servlet (extending HttpServlet). Specifically, when I try to access the portlets, I'm getting any number of classcastexceptions such as:

    java.lang.ClassCastException: icationContext cannot be cast to org.springframework.web.context.WebApplicationCont ext
    java.lang.ClassCastException: org.springframework.web.servlet.i18n.AcceptHeaderL ocaleResolver cannot be cast to org.springframework.web.servlet.LocaleResolver

    My controller class is defined as follows and is loaded by spring's dispatcher servlet
    public class PortalController implements ServletContextAware, InitializingBean {
    If instead I specify my own servlet, I don't get those errors, although the doGet and doPost implementations look exactly the same.
    My class is simply defined as follows:
    public class PortalDriverServlet extends HttpServlet {
    I have gone through ALL possible dependency cleanup to ensure that there is no classpath/classloader contamination in any way. Spring dependencies are part of the webapp and not shared in Tomcat (the container that I'm using).

    One more thing: I am using crossContext="true" in my webapps and portlets.

    Any hints would be appreciated!

  • #2

    any specifics that I can supply to get an insight would be appreciated!