Announcement Announcement Module
Collapse
No announcement yet.
Air App / DuplicateSessionDetected Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Air App / DuplicateSessionDetected

    In my AIR-Testapplication I get the following error-message:

    Code:
    [RPC Fault faultString="Detected duplicate HTTP-based FlexSessions, generally due to the remote host disabling session cookies. Session cookies must be enabled to manage the client connection correctly." faultCode="Server.Processing.DuplicateSessionDetected" faultDetail="null"]
    	at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:240]
    	at mx.rpc::Responder/fault()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53]
    	at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
    	at NetConnectionMessageResponder/statusHandler()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:569]
    	at mx.messaging::MessageResponder/status()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222]
    After a click on "Dismiss All" the app works and tomcat receives the data.
    If I click on "Continue" and resend the data tomcat also receives the data.
    Something wired is going on here.
    Please help me to solve this problem...

    Here are all my config-files. Sorry for posting all the files but I don't know where the search for the error anymore.

    (Everything works fine in the Flex-Sample-Appliction)

    web.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      
      <display-name>EOSFlexServer</display-name>
      
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
    			/WEB-INF/config/web-application-config.xml
    			/WEB-INF/config/web-application-security.xml  
    	</param-value>
      </context-param>
    
    
      <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
      </filter>
      
      <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
      </filter-mapping>
    
    
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
    
       <listener>
        <listener-class>flex.messaging.HttpFlexSession</listener-class>
       </listener>
      
      <servlet>
        <servlet-name>testdrive</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      
      <servlet-mapping>
        <servlet-name>testdrive</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
      </servlet-mapping>
      
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
      </welcome-file-list>
    </web-app>
    web-application-conf:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:flex="http://www.springframework.org/schema/flex" 
    	xmlns:security="http://www.springframework.org/schema/security"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="
    		http://www.springframework.org/schema/beans
    		http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    		http://www.springframework.org/schema/flex 
    		http://www.springframework.org/schema/flex/spring-flex-1.0.xsd
    		http://www.springframework.org/schema/security
    		http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
    
        <!-- START Load application properties -->
         <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
           <property name="location"><value>classpath:../application.properties</value></property>
         </bean>
       	<!-- END Load application properties -->
       	
    	<flex:message-broker>
    		<flex:message-service 
    			default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" /> 
    		<!-- <flex:secured />  -->
    	</flex:message-broker>
    
    	<!--
    	...iBatis config...
    	-->
    
    	<!-- Contact-bean -->
    	<bean id="contactDao" class="at.mikemitterer.eosflex.db.dao.ContactDao">
    		<property name="sqlMapClientTemplate" ref="sqlMapClientTemplate" />
    	</bean>
    		
    	<bean id="contactService" class="at.mikemitterer.eosflex.db.service.ContactService">
    		<property name="contactDao"><ref bean="contactDao"/></property> 
    	</bean>
    
    	<!-- Expose the productDAO bean for BlazeDS remoting -->
    	<flex:remoting-destination ref="contactService" />
    
    </beans>
    web-application-security:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns="http://www.springframework.org/schema/security"
    	xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                            http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.1.xsd">
    
    	<http auto-config="true" session-fixation-protection="none">
    		<concurrent-session-control max-sessions="10" exception-if-maximum-exceeded="true" /> 
    	</http>
    	
    	<authentication-provider>
    		<user-service>
    			<user name="john" password="john" authorities="ROLE_USER, ROLE_ADMIN" />
    			<user name="guest" password="guest" authorities="ROLE_GUEST" />
    		</user-service>
    	</authentication-provider>
    
    </beans:beans>
    proxy-config:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <service id="proxy-service" 
        class="flex.messaging.services.HTTPProxyService">
    
        <properties>
            <connection-manager>
                <max-total-connections>100</max-total-connections>
                <default-max-connections-per-host>20</default-max-connections-per-host>
            </connection-manager>
            <allow-lax-ssl>true</allow-lax-ssl>
        </properties>
    
        <adapters>
            <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
            <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
        </adapters>
    
        <default-channels>
            <channel ref="my-amf"/>
        </default-channels>
    
        <destination id="DefaultHTTP">
        </destination>
    	
    </service>
    services-config:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
    
        <services>
            <service-include file-path="proxy-config.xml" />
    
            <default-channels>
               <channel ref="my-amf"/>
            </default-channels>
    
        </services>
    
        <security>
            <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
        </security>
    
        <channels>
            <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/EOSFlexServer/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
                <!-- {context.root}/ -->
            </channel-definition>
        </channels>
    
        <logging>
            <target class="flex.messaging.log.ConsoleTarget" level="Warn">
                <properties>
                    <prefix>[BlazeDS] </prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>false</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
                <filters>
                    <pattern>Endpoint.*</pattern>
                    <pattern>Service.*</pattern>
                    <pattern>Configuration</pattern>
                </filters>
            </target>
        </logging>
    
        <system>
            <redeploy>
                <enabled>false</enabled>
            </redeploy>
        </system>
    
    </services-config>
    AIR-Application:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
            xmlns:mx="http://www.adobe.com/2006/mxml"
            backgroundColor="#FFFFFF"
            creationComplete="init()">
    
        <mx:Script>
            <![CDATA[
                import mx.messaging.Channel;
                import mx.messaging.ChannelSet;
                import mx.messaging.channels.AMFChannel;
    
    			private var channel:String = 'http://localhost:8080//EOSFlexServer/messagebroker/amf';
    			
                public function init():void
                {
                    var cs:ChannelSet = new ChannelSet();
                    var customChannel:Channel = new AMFChannel("my-amf", channel);
                    cs.addChannel(customChannel);
                    srv.channelSet = cs;
                }
                
                public function login() : void {
                	srv.channelSet.login('john','john');
                }
                
                public function logout() : void {
                	srv.channelSet.logout();
                }
            ]]>
        </mx:Script>
    
    
        <mx:RemoteObject id="srv" destination="contactService"/>
        <mx:TextArea text="{srv.getData.lastResult}" width="100%" height="100%" backgroundColor="#CBCBCB" borderStyle="solid" borderColor="#595959" editable="false"/>
    
    	<mx:HBox>
    	    <mx:Button label="Get Data" click="srv.setContacts('abc')"/>
    	    <mx:Button label="Login" click="login()"/>
    	    <mx:Button label="Logout" click="logout()"/>
    	</mx:HBox>
    
    </mx:WindowedApplication>

  • #2
    I don't see anything immediately obvious that could be causing the problem. If you would like to open a Jira and attach a sample app to help us reproduce the issue, that would be ideal.

    Comment

    Working...
    X