2 Replies Latest reply on Apr 29, 2009 6:17 AM by softie.blr

    RemoteObject throwing "Send failed" error

    DavidTheJavaProgramm

      I'm trying to read some data through a java class using Tomcat and blazeds.  I'll post some of my config and code here.

      Here's the destination block of my remoting-config.xml

       

         <destination id="olapQuery">
            <properties>
               <source>com.zencos.OLAP.OLAPQuery</source>
               <scope>application</scope>
            </properties>
         </destination>

       

       

      Here is where I setup the RemoteObject in my mxml

       

          <mx:RemoteObject id="olapQuery" destination="olapQuery">
              <mx:method name="query" result="olapQueryHandler(event)"/>
          </mx:RemoteObject>


      Here's my olapQueryHandler method

       

                  private function olapQueryHandler(event:ResultEvent):void {
                      var olapData:ArrayCollection = event.result as ArrayCollection;
                  }

       

      I call the remote object in a method called initApp that is called by the preinitialize event, like this

       

      <mx:Application
          xmlns:mx="http://www.adobe.com/2006/mxml"
          xmlns:ilog="http://www.ilog.com/2007/ilog/flex"
          layout="absolute"
          preinitialize="initApp()"
          creationComplete="complete()">

       

      Here is the method

       

                  private function initApp():void {
                      olapQuery.query(["TimeYQM"],["ServiceOrder"],["Trouble_Ticket_countSUM"]);
                  }

       

       

      And here is the error I'm seeing when the application starts:

       

      [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/Dashboard/messagebroker/amf'"]
          at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\p rojects\rpc\src\mx\rpc\AbstractInvoker.as:220]
          at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder .as:53]
          at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:103]
          at mx.messaging::ChannelSet/faultPendingSends()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\ChannelSet.as:1482]
          at mx.messaging::ChannelSet/channelFaultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc \src\mx\messaging\ChannelSet.as:975]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.messaging::Channel/connectFailed()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\m essaging\Channel.as:997]
          at mx.messaging.channels::PollingChannel/connectFailed()[C:\autobuild\3.2.0\frameworks\proje cts\rpc\src\mx\messaging\channels\PollingChannel.as:354]
          at mx.messaging.channels::AMFChannel/statusHandler()[C:\autobuild\3.2.0\frameworks\projects\ rpc\src\mx\messaging\channels\AMFChannel.as:390]

       

      Where am I going wrong here?  I'm sure I've missed a step but I can't see where in any of the documentation.  I can supply any other information needed to figure this out.

       

      Thanks for the help