Results 1 to 3 of 3

Thread: MessageBroker initialization failed

  1. #1
    Join Date
    Feb 2011
    Posts
    3

    Default MessageBroker initialization failed

    So hello.

    I am using Spring 3.0.5 and spring-flex 1.5.M2. The build is done using Maven 2.2.1. Additionally I use JUnit 4.

    So, let's cut to the point. As soon as I define message-broker in my context by:
    <flex:message-broker />

    I get very long stack trace: http://pastebin.com/VUQG3zM4

    Literally, at this point I'm not sure what I am doing wrong. Do you have any idea what might be wrong?

    web.xml: http://pastebin.com/mkxKWcMU
    applicationContext.xml: http://pastebin.com/a0LpEaqH

    Thanks!

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    Using the <flex:message-broker/> tag will not work in a standalone integration test (as you are trying to run) unless you do something to mock the Servlet environment.

    Though this can be done (for an example see org.springframework.flex.config.AbstractFlexConfig urationTests and org.springframework.flex.config.MessageBrokerConte xtLoader in the Spring BlazeDS source distro), the more common approach is to separate things that have such environmental dependencies in such a way that they don't get loaded in your integration tests.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3
    Join Date
    Feb 2011
    Posts
    3

    Default

    To tell you the truth that was my idea too but I wasn't sure. What I should do at this point is separate web.xml for test purposes and for production, or even better exclude it altogether.

    Thanks!
    Last edited by travikk; Feb 18th, 2011 at 02:55 AM.

Posting Permissions

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