2 Replies Latest reply on Aug 20, 2008 8:52 AM by phani_bhyri

    Flex3+BlazeDS+Spring

    phani_bhyri
      Hi

      I am using Flex3 with flash player 9.0.28 and BlazeDS for Remoting and Java at the server side code. I was able to access my java classes using Remoting but suddenly I am getting error today and I am unable to fix it. I captured the exact problem by using Flex debugging

      Note: I am able to do file uploading the same application in the same server using FileReference but for remoting the error is NetConnection.failed.


      Please find the error description below:

      [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: ' http://localhost:8180/reclassification/messagebroker/amf'"
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:216
      at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]
      at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
      at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\ messaging\ChannelSet.as:1399]
      at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\m x\messaging\ChannelSet.as:935]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.messaging::Channel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messagi ng\Channel.as:997]
      at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rp c\src\mx\messaging\channels\PollingChannel.as:354]
      at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\AMFChannel.as:369]


      thanks in advance..

      phani.

        • 1. Re: Flex3+BlazeDS+Spring
          riesvantwisk Level 1
          Check your web.xml and see if it has something like :

          <!-- MessageBroker Servlet -->
          <servlet>
          <servlet-name>MessageBrokerServlet</servlet-name>
          <display-name>MessageBrokerServlet</display-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>
          <load-on-startup>1</load-on-startup>
          </servlet>


          and
          <servlet-mapping>
          <servlet-name>MessageBrokerServlet</servlet-name>
          <url-pattern>/messagebroker/*</url-pattern>
          </servlet-mapping>


          Ries
          • 2. Re: Flex3+BlazeDS+Spring
            phani_bhyri Level 1
            thanks for Reply.

            I am still struggling with this issue. Now it is not at all working..

            I am getting this message as fault message in the browser

            faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: ' http://localhost:8180/reclassification/messagebroker/amf''


            I have those entries you have mentioned in my web.xml

            Please find my web.xml :

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " http://java.sun.com/dtd/web-app_2_3.dtd">
            <web-app>

            <display-name>Reclassification</display-name>
            <description>Reclass Application</description>


            <!-- Required for Spring configuration -->
            <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/applicationContext.xml</param-value>
            </context-param>


            <!-- Required for Spring configuration -->
            <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener </listener-class>
            </listener>


            <!-- Http Flex Session attribute and binding listener support -->
            <listener>
            <listener-class>flex.messaging.HttpFlexSession</listener-class>
            </listener>

            <!-- MessageBroker Servlet -->
            <servlet>
            <servlet-name>MessageBrokerServlet</servlet-name>
            <display-name>MessageBrokerServlet</display-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>
            <load-on-startup>1</load-on-startup>
            </servlet>


            <!-- Servlet definition for Upload of documents -->
            <servlet>
            <servlet-name>UploadServlet</servlet-name>
            <servlet-class>gov.uspto.patent.reclass.servlet.UploadServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
            </servlet>



            <!-- servlet mappings for upload and download servlets for schedule, definition and worklist documents upload -->

            <servlet-mapping>
            <servlet-name>UploadServlet</servlet-name>
            <url-pattern>/upload/schedule</url-pattern>
            </servlet-mapping>

            <servlet-mapping>
            <servlet-name>UploadServlet</servlet-name>
            <url-pattern>/upload/definition</url-pattern>
            </servlet-mapping>

            <servlet-mapping>
            <servlet-name>UploadServlet</servlet-name>
            <url-pattern>/upload/worklists</url-pattern>
            </servlet-mapping>


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

            <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <!-- <welcome-file>index.htm</welcome-file>-->
            <!-- <welcome-file>flex/flex.html</welcome-file> -->
            </welcome-file-list>

            <!-- for WebSphere deployment, please uncomment -->
            <!--
            <resource-ref>
            <description>Flex Messaging WorkManager</description>
            <res-ref-name>wm/MessagingWorkManager</res-ref-name>
            <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
            </resource-ref>
            -->

            </web-app>


            thanks,
            phani