Mantis - Hessian
Viewing Issue Advanced Details
2511 minor always 03-10-08 11:32 07-11-08 09:06
emil  
 
normal  
closed 3.1.5  
fixed  
none    
none 3.1.6  
0002511: fault() called even when result returned in Hessian/Flex
(Reported by Chris Scott)

Fault retrieving data...
(mx.rpc.events::FaultEvent)0
  bubbles = false
  cancelable = true
  currentTarget = (null)
  eventPhase = 2
  fault = (mx.rpc::Fault)0000001
    errorID = 0
    faultCode = "InvokeFailed"
    faultDetail = "Couldn't establish a connection to ''"
    faultString = "[MessagingError message='The MessageAgent's destination must
be set to send messages.']"
    message = "faultCode:InvokeFailed faultString:'[MessagingError message='The
MessageAgent's destination must be set to send messages.']'
faultDetail:'Couldn't establish a connection to '''"
    name = "Error"
    rootCause = (null)
  headers = (null)
  message = (hessian.client::HessianMessage)0000002
    body = (Array)0000003
    clientId = (null)
    destination = "http://localhost:8080/automator-web/remoting/ [^]
AutomatorService"
    headers = (Object)0000004
      DSMessageStore = (Object)0000005
    messageId = (null)
    timestamp = NaN
    timeToLive = NaN
  messageId = (null)
  target = (null)
  token = (mx.rpc::AsyncToken)0000006
    message = (hessian.client::HessianMessage)0000002
    responders = (Array)0000007
      [0] (com.maned.commons.swiz::DynamicResponder)0000008
    result = (null)
  type = "fault"

Notes
(0002927)
emil   
03-27-08 17:24   
I have not been able to reproduce this bug. If you have additional information, please feel free to add it here. So far, this bug has only been encountered by one person to our knowledge. If you have also run into this, please let me know and I will increase the priority of the bug.

Since I have not been able to reproduce this bug, there is no workaround.
(0002940)
bdespres   
04-04-08 12:28   
I also get this error when using Flex 3. The good news is that I was able to get the message to go away by adding this line to HessianOperation.send():

      mx_internal::asyncRequest.destination = service.destination;

right before the call to mx_internal::invoke(). The bad news is I got this fault() instead:

    [MessagingError message='Destination '/usermgmt-6.3/remoting/authService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']

That destination is my Spring-remoted service url. (I also tried using a fully qualified URL http://host:port/etc [^] instead of a relative URL but get the same error.
(0002944)
bdespres   
04-07-08 12:49   
From digging into this further, it seems that the call to mx_internal::invoke() is failing... after the above change, it's trying to lookup a Channel object for this destination from the flex-services.xml file. Since it can't find one, its spits out that Destination error. So it would appear we're running into a code path that's used with Flex Data Services.

The actual request seems to be sent by dispatching the InvokeEvent... I got things to work just by making this change to HessianOperation.as:

132c132
< var token:AsyncToken = mx_internal::invoke(msg);
---
> var token:AsyncToken = new AsyncToken(msg);

Tested against Flex 2.01 and Flex 3 and it works ok (no erroneous faults)

(0003072)
aburak   
05-15-08 09:48   
We're using hessian protocol from Flex (3.1.2) and this issue is ALWAYS present - we need to remove all "fault" handlers from our code, because otherwise the screen is overloaded with error messages
(0003234)
Boubalou   
07-02-08 10:42   
I also experienced this issue with Flex 3 + Hessian 3.1.6 (sources, not the SWC).

I also edited the sources to use the proposed fix from bdespres and it worked perfectly.
(0003257)
emil   
07-11-08 09:06   
Thanks to the reporters for such a detailed report!