Announcement Announcement Module
No announcement yet.
Setup problem: can't connect, two warnings Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setup problem: can't connect, two warnings

    Could someone help me to get started?

    I am setting up BlazeDS using Spring BlazeDS Integration and I can't connect to the server. When I launch webapp I see the following warnings:

    [BlazeDS]No login command was found for 'Apache Tomcat/6.0.18'. 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.

    After some googling I figured out that it relates to BlazeDS security. What I could not find is if I still should be able to connect with this warning in place or not. Our BlazeDS service does not require authorization to be used.

    The second warning appears when I try to connect to the server from our flash client:

    [BlazeDS]HttpFlexSession has not been registered as a listener in web.xml for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register flex.messaging.HttpFlexSession as a listener in web.xml.

    My search did not produce any results. I follow this introduction article and it does not mention any HttpFlexSession registration or something like this.

    Any help is appreciated.

    The config files are below. Thanks.

    --- services-config.xml ---

    <?xml version="1.0" encoding="UTF-8"?>

    <channel ref="my-amf"/>


    <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
    <endpoint url="http://localhost:8080/test/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>


    <target class="flex.messaging.log.ConsoleTarget" level="Warn">
    <prefix>[BlazeDS] </prefix>



    --- end of services-config.xml ---

    --- spring-blazeds-context.xml ---

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""

    <flex:message-service default-channels="my-amf" />

    <!-- Expose the productService bean for BlazeDS remoting -->
    <flex:remoting-destination ref="testService" />


    --- end of spring-blazeds-context.xml ---

    --- web.xml servlet config ---

    <description>Spring MVC Dispatcher Servlet for web application</description>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>

    <description>Spring MVC Dispatcher Servlet for remote access</description>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>



    --- end of web.xml servlet config ---
    Last edited by mhv; Aug 14th, 2009, 11:03 AM.

  • #2
    Both of the log warning messages you're getting are harmless and don't affect anything. Shouldn't have anything to do with not being able to connect.

    I don't see anything clearly wrong in your config. (BTW, please use the code tags in the future to make such snippets more readable.)

    Exactly what sort of error are you getting when you try to invoke a method on your remote service?


    • #3

      Thanks for the feedback. I did not have any useful error code on the client side. We use a pure AS3 client instead of Flex and Adobe does not really provide a lot of info about how to handle it so it's a bit tricky. We have to get through the initial setup from the both server and client side.

      I have just been able to make the prototype working. It seems like it was a client side problem. But while messing withe the server side code I have noticed that if I add the following line to web.xml then the second warning disappears.

      I am not sure if it makes sense to have this line there. It does not seem to affect the way it works. What would be your recommendation?



      • #4
        You only need to have the HttpFlexSession in the web.xml if you want to register a server-side listener that can be notified of certain events such as attributes being added or removed from the session. (Of course, having it there also makes the warning message go away.) BlazeDS does not use this internally in any way, and I would say it's a rarely used capability which is why we don't show it configured in the sample (one less thing to have to remember to configure is always good in my view). Not having it in there doesn't effect the functionality otherwise.


        • #5
          I see.Thanks.

          Just a suggestion, for someone who is new to BlazeDS this warning ( events will be dispatched to FlexSessionAttributeListeners...) looks like a potential source of troubles. May be it makes sense to put a "don't panic" line about it somewhere in the documentation.