Announcement Announcement Module
No announcement yet.
Problems running the spring-comet integration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems running the spring-comet integration

    Hi guys,

    I'm trying to integrate comet with spring in my application, but Im exeriencing some difficulties. So here's what I did:
    1) I pulled the spring-integration-comet from the spring integration sandbox and built it.
    2) Declared it as a dependency in my pom.xml:

    3) Declared the MeteorServlet in my web.xml as the following:
        <!-- Handles Comet requests -->
    4) Declared my-comet.xml as the following:

        <bean name="/recent/notifications" class="org.springframework.integration.comet.AsyncHttpRequestHandlingMessageAdapter">
            <property name="messageChannel" ref="recentActivity" />
            <property name="messageThreshold" value="2" />
        <bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter"/>
    5) And finally I have a page with the atmosphere jquery plugin and the following Javascript:
        /* transport can be : long-polling, streaming or websocket */
        $.atmosphere.subscribe(basePath, activityNotificationHandler,
            $.atmosphere.request = {
                transport : "websocket",
                maxRequest : 2,
                timeout: 10000,
                headers : { "Accept" : "application/json" }
    Now the problem.. Going to that page throws the following warning:
    WARN  PageNotFound - No mapping found for HTTP request with URI [/flows/test/recent/notifications] in DispatcherServlet with name 'cometServlet'
    Does anybody know what is the problem here?

  • #2

    I sure do, just went through this exact problem myself. You don't have anything mapping your URL to that HandlerAdapter. Keith seems to have it configured in the Greenhouse example to map the bean name of the adapter as the URL (notice your bean's name is defined as /recent/notifications), but I sure don't see where he did it. But add this to your application context somewhere and see if that doesn't fix your problem.

    	<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" >
    		<property name="order" value="3" />
    That should get you past that issue, but I still have problems after that with atmosphere and have yet to actually get this implementation working outside of greenhouse. Let me know if you have any better luck or if this helps at all.