Results 1 to 4 of 4

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

  1. #1
    Join Date
    Feb 2007
    Posts
    21

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

    Hi,

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

    Code:
    	<!-- 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:
    Code:
    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(DispatcherServlet.java:1100)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
    How can I have the two working in parallel?

  2. #2

    Default

    Try registering additional HandlerAdapter into spring web app context.

    Code:
    <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. #3

    Default

    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. #4
    Join Date
    Feb 2007
    Posts
    21

    Default

    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •