Announcement Announcement Module
Collapse
No announcement yet.
messageBroker just stops Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • messageBroker just stops

    Hi,

    I'm using spring 3.0.2, spring-flex 1.0.3, and flex/blazeDS 4.0 jars. I have previously gotten this combination to work, but I only had Spring beans as destination endpoints. Now I have added legacy destination endpoints to the remoting-config.xml configuration. So now I have Spring beans in flex-servlet.xml and legacy remote destinations in remoting-config.xml. I have never done this before, but the Spring-flex documentation says it is supported. When I try to access these remote destinations things it does not work and the BlazeDS log shows:

    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    WRS 2010-06-09 11:05:39,900[http-8080-Processor25] WARN WRSLogonFilter - /CrossDomainProxyServlet
    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    WRS 2010-06-09 11:05:40,103[http-8080-Processor23] WARN WRSLogonFilter - /CrossDomainProxyServlet
    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    [BlazeDS]Endpoint 'my-polling-amf' created with security: None
    at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling
    [BlazeDS]Endpoint 'my-amf' created with security: None
    at URL: HTTP://d22274:8080/SASWebReportStudio/messagebroker/amf
    [BlazeDS]Endpoint 'my-secure-amf' created with security: None
    at URL: https://localhost:8080/SASWebReportS...oker/amfsecure
    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    [BlazeDS]HttpSession to FlexSession map not created in message broker for 7CFFC719C4F8913103DD81E3B092B2A2
    [BlazeDS]Unable to get HttpSession to FlexSession map for 7CFFC719C4F8913103DD81E3B092B2A2 flex.messaging.MessageException: Session map not initialized for session with id: '7CFFC719C4F8913103DD81E3B092B2A2'.
    [BlazeDS]MessageBroker id: _messageBroker classLoader is: the MessageBroker's class loader and the context class loader (classLoader hashCode: 4148925 (parent hashCode: 31346136 (parent hashCode: 19272103 (parent system)))
    WRS 2010-06-09 11:05:40,400[http-8080-Processor25] WARN WRSLogonFilter - /CrossDomainProxyServlet
    WRS 2010-06-09 11:05:40,556[http-8080-Processor23] WARN WRSLogonFilter - /CrossDomainProxyServlet
    WRS 2010-06-09 11:05:40,728[http-8080-Processor22] WARN WRSLogonFilter - /CrossDomainProxyServlet
    [BlazeDS]MessageBroker stopping: _messageBroker
    [BlazeDS]MessageBroker stopped: _messageBroker
    WRS 2010-06-09 11:05:40,884[http-8080-Processor25] WARN WRSLogonFilter - /CrossDomainProxyServlet

    Seems like the MessageBroker just stops for no apparent reason.

    Any ideas?

  • #2
    Looks like it could very well be a bug, but I can't say for sure without reproducing locally. Any chance you can open a Jira, ideally with a small sample to help reproduce? http://jira.springframework.org/browse/FLEX

    Comment


    • #3
      Hi guys.
      Is there any suggestions on that problem, cause I am experiencing the same issue on tomcat 5.5?
      Here is my tomcat's starting log:


      Mar 22, 2011 11:16:59 AM org.apache.catalina.core.AprLifecycleListener init
      INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C :\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Syst em32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1 .0;.;C:\Apache\apache-maven-2.2.1;C:\Apache\apache-maven-2.2.1/bin
      Mar 22, 2011 11:16:59 AM org.apache.coyote.http11.Http11BaseProtocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      Mar 22, 2011 11:16:59 AM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 484 ms
      Mar 22, 2011 11:17:00 AM org.apache.catalina.core.StandardService start
      INFO: Starting service Catalina
      Mar 22, 2011 11:17:00 AM org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/5.5.33
      Mar 22, 2011 11:17:00 AM org.apache.catalina.core.StandardHost start
      INFO: XML validation disabled
      Mar 22, 2011 11:17:00 AM org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring root WebApplicationContext
      Mar 22, 2011 11:17:00 AM org.springframework.web.context.ContextLoader initWebApplicationContext
      INFO: Root WebApplicationContext: initialization started
      Mar 22, 2011 11:17:00 AM org.springframework.context.support.AbstractApplic ationContext prepareRefresh
      INFO: Refreshing Root WebApplicationContext: startup date [Tue Mar 22 11:17:00 EDT 2011]; root of context hierarchy
      Mar 22, 2011 11:17:00 AM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
      INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL [email protected]: defining beans []; root of factory hierarchy
      Mar 22, 2011 11:17:00 AM org.springframework.web.context.ContextLoader initWebApplicationContext
      INFO: Root WebApplicationContext: initialization completed in 172 ms
      Mar 22, 2011 11:17:00 AM org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring FrameworkServlet 'flex'
      Mar 22, 2011 11:17:00 AM org.springframework.web.servlet.FrameworkServlet initServletBean
      INFO: FrameworkServlet 'flex': initialization started
      Mar 22, 2011 11:17:00 AM org.springframework.context.support.AbstractApplic ationContext prepareRefresh
      INFO: Refreshing WebApplicationContext for namespace 'flex-servlet': startup date [Tue Mar 22 11:17:00 EDT 2011]; parent: Root WebApplicationContext
      Mar 22, 2011 11:17:00 AM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
      INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/flex-servlet.xml]
      Mar 22, 2011 11:17:00 AM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
      INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL [email protected]: defining beans [_messageBrokerHandlerAdapter,_messageBrokerDefault HandlerMapping,_jsonConfigMapEditorConfigurer,_mes sageBrokerMessagingProcessor,_flexRemotingAnnotati onPostProcessor,_messageBrokerRemotingProcessor,or g.springframework.flex.core.ExceptionTranslationAd vice#0,org.springframework.flex.core.EndpointServi ceMessagePointcutAdvisor#0,org.springframework.fle x.core.MessageInterceptionAdvice#0,org.springframe work.flex.core.EndpointServiceMessagePointcutAdvis or#1,_messageBrokerEndpointProcessor,_messageBroke r,chat,defaultMessageTemplate]; parent: org.springframework.beans.factory.support.DefaultL [email protected]
      Mar 22, 2011 11:17:01 AM org.springframework.flex.config.FlexConfigurationM anager$ResourceResolverAdapter getConfigurationFile
      INFO: Loading Flex services configuration from: ServletContext resource [/WEB-INF/flex/services-config.xml]
      Mar 22, 2011 11:17:01 AM org.springframework.flex.core.MessageBrokerFactory Bean afterPropertiesSet
      INFO: BlazeDS - Community Edition: 4.0.1.16258
      [BlazeDS]03/22/2011 11:17:01.995 [WARN] [Configuration] No login command was found for 'Apache Tomcat/5.5.33'. Please ensure that the login-command tag has the correct server attribute value, or use 'all' to use the login command regardless of the server.
      [BlazeDS]03/22/2011 11:17:02.042 [INFO] [Configuration] Endpoint 'my-streaming-amf' created with security: None
      at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf
      [BlazeDS]03/22/2011 11:17:02.042 [INFO] [Configuration] Endpoint 'my-amf' created with security: None
      at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amf
      [BlazeDS]03/22/2011 11:17:02.042 [INFO] [Configuration] Endpoint 'my-longpolling-amf' created with security: None
      at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpolling
      [BlazeDS]03/22/2011 11:17:02.042 [INFO] [Configuration] Endpoint 'my-polling-amf' created with security: None
      at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling
      [BlazeDS]03/22/2011 11:17:02.042 [INFO] [Configuration] Endpoint 'my-secure-amf' created with security: None
      at URL: https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure
      Mar 22, 2011 11:17:02 AM org.springframework.flex.core.MessageBrokerFactory Bean afterPropertiesSet
      INFO: MessageBroker with id '_messageBroker' is starting.
      [BlazeDS]03/22/2011 11:17:02.073 [DEBUG] [Configuration] MessageBroker id: _messageBroker classLoader is: the MessageBroker's class loader and the context class loader (classLoader hashCode: 23930419 (parent hashCode: 23414511 (parent hashCode: 19551481 (parent system)))
      Mar 22, 2011 11:17:02 AM org.springframework.flex.core.MessageBrokerFactory Bean afterPropertiesSet
      INFO: MessageBroker with id '_messageBroker' is ready (startup time: '343' ms)
      Mar 22, 2011 11:17:02 AM org.springframework.web.servlet.handler.AbstractUr lHandlerMapping registerHandler
      INFO: Default mapping to handler '_messageBroker'
      Mar 22, 2011 11:17:02 AM org.springframework.web.servlet.FrameworkServlet initServletBean
      INFO: FrameworkServlet 'flex': initialization completed in 1921 ms
      Mar 22, 2011 11:17:02 AM org.apache.coyote.http11.Http11BaseProtocol start
      INFO: Starting Coyote HTTP/1.1 on http-8080
      Mar 22, 2011 11:17:02 AM org.apache.jk.common.ChannelSocket init
      INFO: JK: ajp13 listening on /0.0.0.0:8009
      Mar 22, 2011 11:17:02 AM org.apache.jk.server.JkMain start
      INFO: Jk running ID=0 time=0/16 config=null
      Mar 22, 2011 11:17:02 AM org.apache.catalina.storeconfig.StoreLoader load
      INFO: Find registry server-registry.xml at classpath resource
      Mar 22, 2011 11:17:02 AM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 2765 ms
      Mar 22, 2011 11:17:44 AM org.apache.coyote.http11.Http11BaseProtocol pause
      INFO: Pausing Coyote HTTP/1.1 on http-8080
      Mar 22, 2011 11:17:45 AM org.apache.catalina.core.StandardService stop
      INFO: Stopping service Catalina
      Mar 22, 2011 11:17:45 AM org.apache.catalina.core.ApplicationContext log
      INFO: Destroying Spring FrameworkServlet 'flex'
      Mar 22, 2011 11:17:45 AM org.springframework.context.support.AbstractApplic ationContext doClose
      INFO: Closing WebApplicationContext for namespace 'flex-servlet': startup date [Tue Mar 22 11:17:00 EDT 2011]; parent: Root WebApplicationContext
      Mar 22, 2011 11:17:45 AM org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry destroySingletons
      INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL [email protected]: defining beans [_messageBrokerHandlerAdapter,_messageBrokerDefault HandlerMapping,_jsonConfigMapEditorConfigurer,_mes sageBrokerMessagingProcessor,_flexRemotingAnnotati onPostProcessor,_messageBrokerRemotingProcessor,or g.springframework.flex.core.ExceptionTranslationAd vice#0,org.springframework.flex.core.EndpointServi ceMessagePointcutAdvisor#0,org.springframework.fle x.core.MessageInterceptionAdvice#0,org.springframe work.flex.core.EndpointServiceMessagePointcutAdvis or#1,_messageBrokerEndpointProcessor,_messageBroke r,chat,defaultMessageTemplate]; parent: org.springframework.beans.factory.support.DefaultL [email protected]
      [BlazeDS]03/22/2011 11:17:45.968 [DEBUG] [Configuration] MessageBroker stopping: _messageBroker
      [BlazeDS]03/22/2011 11:17:45.968 [DEBUG] [Configuration] MessageBroker stopped: _messageBroker
      Mar 22, 2011 11:17:45 AM org.apache.catalina.core.ApplicationContext log
      INFO: Closing Spring root WebApplicationContext
      Mar 22, 2011 11:17:45 AM org.springframework.context.support.AbstractApplic ationContext doClose
      INFO: Closing Root WebApplicationContext: startup date [Tue Mar 22 11:17:00 EDT 2011]; root of context hierarchy
      Mar 22, 2011 11:17:45 AM org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry destroySingletons
      INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL [email protected]: defining beans []; root of factory hierarchy
      Mar 22, 2011 11:17:46 AM org.apache.coyote.http11.Http11BaseProtocol destroy
      INFO: Stopping Coyote HTTP/1.1 on http-8080

      Comment


      • #4
        That looks like a completely different problem. If the ApplicationContext is immediately shutting down like that, then you've probably got an exception being thrown somewhere, not shown in that log. Try turning up the logging level or perhaps check other possible log files that may be targeted for errors in your setup.

        Comment


        • #5
          Thank you Jeremy.
          I found the problem. It was just a bad settings.

          Comment


          • #6
            I need to have 2 messagebroker instances which sens msgs to the same consumer on a destination. These 2 messagebrokers sends msgs from different threads
            with different clientIDs. In my web.xml I have made 2 messagebroker instances:

            <!-- MessageBroker Servlet -->
            <servlet>
            <servlet-name>MessageBrokerServlet1</servlet-name>
            <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
            <init-param>
            <param-name>services.configuration.file</param-name>
            <param-value>/WEB-INF/flex/services-config.xml</param-value>
            </init-param>
            <init-param>
            <param-name>messageBrokerId</param-name>
            <param-value>MB1</param-value>
            </init-param>
            <init-param>
            <param-name>flex.write.path</param-name>
            <param-value>/WEB-INF/flex</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
            </servlet>

            <servlet-mapping>
            <servlet-name>MessageBrokerServlet1</servlet-name>
            <url-pattern>/messagebroker/*</url-pattern>
            </servlet-mapping>

            <!-- MessageBroker Servlet -->
            <servlet>
            <servlet-name>MessageBrokerServlet2</servlet-name>
            <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
            <init-param>
            <param-name>services.configuration.file</param-name>
            <param-value>/WEB-INF/flex/services-config.xml</param-value>
            </init-param>
            <init-param>
            <param-name>messageBrokerId</param-name>
            <param-value>MB2</param-value>
            </init-param>
            <init-param>
            <param-name>flex.write.path</param-name>
            <param-value>/WEB-INF/flex</param-value>
            </init-param>
            <load-on-startup>0</load-on-startup>
            </servlet>

            <servlet-mapping>
            <servlet-name>MessageBrokerServlet2</servlet-name>
            <url-pattern>/messagebroker/*</url-pattern>
            </servlet-mapping>


            When I send msgs from the 2 messagebroker instances with messageBrokerId "MB1" and "MB2" then I have 2 diffrent instances of the messagebrokers and my server is able to send msgs successfully from 2 messagebrokers without any exception but at the consumer side I am able to receive msgs only from the MessageBroker with messageBrokerId "MB2" which I have defined 2nd in my web.xml and which I have instanciated second in my server side.

            So can someone help me as how will I receive msgs from both my messagebrokers on same consumer for same application.

            Comment

            Working...
            X