javax.servlet.ServletException: No adapter for handler [XController@e24bd0]: Does your handler implement a supported interface like Controller?

Spring JIRA | Jose Noheda | 9 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Whenever you try to add some kind of proxy/aspect to a controller bean (@Controller), for example, adding @Transactional to the method generates the following exception: DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter@151b413]> DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter@10568cb]> DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter [org.springframework.web.servlet.mvc.throwaway.ThrowawayControllerHandlerAdapter@22f963]> DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter@22ef60]> 2007-10-29 18:47:02,835 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Exception thrown in getLastModified> javax.servlet.ServletException: No adapter for handler [XController@e24bd0]: Does your handler implement a supported interface like Controller? at org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(DispatcherServlet.java:1068) at org.springframework.web.servlet.DispatcherServlet.getLastModified(DispatcherServlet.java:938) at javax.servlet.http.HttpServlet.service(HttpServlet.java:714) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) It seems it cannot detect the annotations (RequestMapping, InitBinder) as present (are they visible in the JDK proxy?). It's a shame that these controllers cannot support advices. I know that extending the old class hierarchy does not allow this but, with all the work that has been done, it seemed like a good time to add this kind of support.

    Spring JIRA | 9 years ago | Jose Noheda
    javax.servlet.ServletException: No adapter for handler [XController@e24bd0]: Does your handler implement a supported interface like Controller?
  2. 0

    Whenever you try to add some kind of proxy/aspect to a controller bean (@Controller), for example, adding @Transactional to the method generates the following exception: DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter@151b413]> DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter@10568cb]> DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter [org.springframework.web.servlet.mvc.throwaway.ThrowawayControllerHandlerAdapter@22f963]> DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Testing handler adapter [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter@22ef60]> 2007-10-29 18:47:02,835 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Exception thrown in getLastModified> javax.servlet.ServletException: No adapter for handler [XController@e24bd0]: Does your handler implement a supported interface like Controller? at org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(DispatcherServlet.java:1068) at org.springframework.web.servlet.DispatcherServlet.getLastModified(DispatcherServlet.java:938) at javax.servlet.http.HttpServlet.service(HttpServlet.java:714) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) It seems it cannot detect the annotations (RequestMapping, InitBinder) as present (are they visible in the JDK proxy?). It's a shame that these controllers cannot support advices. I know that extending the old class hierarchy does not allow this but, with all the work that has been done, it seemed like a good time to add this kind of support.

    Spring JIRA | 9 years ago | Jose Noheda
    javax.servlet.ServletException: No adapter for handler [XController@e24bd0]: Does your handler implement a supported interface like Controller?
  3. 0

    Issue on using Spring MVC framework on GAE.

    Google Groups | 8 years ago | xueqiang.mi
    javax.servlet.ServletException: No adapter for handler [org.springframework.web.servlet.mvc.SimpleFormController@1533c8] : Does your handler implement a supported interface like Controller?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HTTPServlet error in runttime

    Stack Overflow | 6 years ago | Jose Hdez
    javax.servlet.ServletException: non-HTTP request or response

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.servlet.ServletException

      No adapter for handler [XController@e24bd0]: Does your handler implement a supported interface like Controller?

      at org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter()
    2. Spring MVC
      DispatcherServlet.getLastModified
      1. org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(DispatcherServlet.java:1068)
      2. org.springframework.web.servlet.DispatcherServlet.getLastModified(DispatcherServlet.java:938)
      2 frames
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:714)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      2 frames