Announcement Announcement Module
No announcement yet.
Problem with MessageBrokerHandlerAdapter - Does your handler [...] like Controller? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with MessageBrokerHandlerAdapter - Does your handler [...] like Controller?


    As soon as I add the following bean config to my existing Spring MVC application (based on spring 2.5.6):

    	<!-- Dispatches requests mapped to a MessageBroker -->
     	<bean class="org.springframework.flex.messaging.servlet.MessageBrokerHandlerAdapter"/>
    I get the following error when trying to access a URL handled by a traditional spring mvc controller:
    javax.servlet.ServletException: No adapter for handler [eu.emea.scorecard.web.example.ExampleController@1cf5ee4]: Does y
    our handler implement a supported interface like Controller?
            at org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(
            at org.springframework.web.servlet.DispatcherServlet.doService(
            at org.springframework.web.servlet.FrameworkServlet.processRequest(
            at org.springframework.web.servlet.FrameworkServlet.doGet(
    How can I have the two working in parallel?

  • #2
    Try registering additional HandlerAdapter into spring web app context.

    <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"/>
    I had the same problem, and this seems to solve it. But now I have some other problems (can't receive response from remote sevice), so I can't confirm this solution.

    Try it, and say the result.


    • #3
      I finally got the reply from my remote service, so I can tell that this solution is ok for my case. I have classic spring MVC web application, lots of controllers and .jsp-s and this allows 'hybrid' approach, not just pure flex client.


      • #4
        Thank you so much for your help.

        As per your indication, by adding a bean of type org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter, the spring servlet dispatcher handles both:
        • the traditional requests
        • and the Flex communication

        This is superb.

        I add also a problem to have the Blaze DS remote object invokations working: it was because I had not mapped /spring/* to the Servlet dispatcher in the web.xml file.

        Looking for trying the M2 release launched yesterday.... and the RC1 lining on the horizon.

        Have a beautiful day!