Flex 3: ConcurrencyError using HTTPService - apache-flex

I'm getting occasional ConcurrencyError faults when using HTTPService in Flex 3. I have four HTTPService objects, all configured with concurrency=single. I'm not sure though how to continue to diagnose, as I don't see in the FaultEvent what service object caused the issue, and I can't easily reproduce it on-demand.
One feature of my app is that I am also using a URLRequest to load a sound shortly after receiving a result from one of the HTTPService calls. Could this be related to the concurrency error?
The fault looks like this:
[FaultEvent fault=[RPC Fault faultString="Attempt to invoke while another call is pending. Either change concurrency options or avoid multiple calls." faultCode="ConcurrencyError" faultDetail="null"] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2]

Huh. I'm going to call it a bug in Flex 3.2 because upgrading to 3.4 got rid of it.

Related

NoHandlerForCommandException: observed when command raised just after application starts

When my spring aplication come up and makes an attempt to issue any command using send method NoHandlerForCommandException is observed. This exception is observed just after the startup of the application and after a few moments it can find the handler and everything works as expected.
How can I know if the command bus and all other command handling components are setup before initiating any command?
I have read somewhere on stackoverflow that in coming version of Axon Framework an event would be emitted after setting up or after receiving the start signal from command handling configuration, has that been introduced?
I believe the issue you are talking about is this one which is not done yet but you can follow it up there.
To your problem, the only way to do that right now is to wait a few seconds before you start your testing (not the best approach).
There are ways to check using Axon Server API if the command handlers are already registered there or not but that's not an easy task and not beautiful as well so I would stick with the wait approach by now until it gets properly fixed.

Strange behavior of RemoteObject after application built, no fault no result

When i run it in Flash Builder (debug mode) the remote object called successfully. but whenever i build the application (AIR application), then the remote object will return no result nor fault, the busy cursor is showing about 3 seconds. then no clue at all.
Any idea how to get advance fault or something than regular fault event or result event?
or anyone have the same experience?
UPDATE:
Actually it was failed only for ONE service method, for other method (some of them took longer time to call) the service call is work fine.
CASE SOLVED
So the problem was not on the service call, but on my result conversion that cause the advanced datagrid failed to render.
Best regards
ktutnik.
Try using a software like Charles to see what happens during the network call.

Getting http 500 response body with flex

I am using a HttpService object in flex to communicate with the server.
I am using java in the server (tomcat), and once an exception occurs the fault event listener in the flex is called.
I am passing data on the exception in the response body in a xml form.
The thing is the flex fault event does not read the data from the response.
How can i read the response body?
In my experience, you can't. Flex turns any 400-599 response codes into a generic IOError and only gives the status code. My understanding is that this is a browser-plugin limitation, but I'm not sure of the extent/reason.
The way we've gotten around it is that all 400-599's get wrapped as 200-OK with a response showing the details of the error. I've heard many argue that this means Flex/Flash can never truly be a RESTful client.

AS3 LocalConnection asyncError

I'm working on implementing communication between an Adobe AIR app and a browser Flash object, and the LocalConnection documentation mentions an asyncError as a potential event:
asyncError: Dispatched when an exception is thrown asynchronously — that is, from native asynchronous code.
However, that's the only documentation I can find on it. Does anyone know what this error actually means? I've searched around but couldn't find any reference -- most sample code I found does an addEventListener() for the asyncError but doesn't give any clue as to what it means or when it could occur (i.e. if it could occur when sending or when recieving).
The Adobe documentation page also lists potential events for each method, but asyncError isn't listed under any specific method, only for the general class.
Has anyone ever had an asyncError occur?
Thanks!
This error is also dispatched from NetConnection. In that case it's used as expected: to handle errors thrown asynchronously by the connection. In the handler for the NetConnection if you do something like:
trace(event.text);
You will get something back like:
Error #2095: flash.net.NetStream was unable to invoke callback onMetaData.
You can use the same technique to figure out why the LocalConnection is throwing this error and handle it according to the message.

Flex httpservice faults

I've been given a Flex application which made use of a RESTFUL service.
I've managed to create a SQLite DB which stored data from the service and now I would like the application to be able to run offline and make use of the data existing in it's local DB. This works fine the only problem is that the httpService object throws a fault when it cannot connect.
If I don't provide a method to handle the fault event then it is displayed in an error window.
If I provide a blank method to handle the fault then it is still displayed in an error window.
How can I get it to stop displaying this error Window?
Regards,
Craig
Check for a network connection before making the httpservice request.
Flex 3 - Adobe Flex 3 Help - Network Connectivity
That way, when an exception occurs it's really an unexpected behavior instead of something that could be regular program usage.
Never Mind... Problem was that something else was generating the same fault...

Resources