<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Handling Java Exceptions in Flex application</title>
	<atom:link href="http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/</link>
	<description></description>
	<lastBuildDate>Mon, 16 Nov 2009 08:57:21 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jashraj Deshpande</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-27026</link>
		<dc:creator>Jashraj Deshpande</dc:creator>
		<pubDate>Tue, 30 Jun 2009 07:04:12 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-27026</guid>
		<description>Hi sujit 

This exception handling is straight forward when we call a remote object method and add a Fault event listener to it. I have a case which is different. 

details :  From flex call a servlet to upload file from flex side. The servlet gets invoked and reads the data , does some processing by calling some helper classes. If any error occurs while processing  i throw exception , which indirectly comes out of servlet as ServletException . 

But at flex side we cannot add a fault event listener for uploading file. So how to catch such servlet exceptions.... 

Thanks &amp; Regards
Jash</description>
		<content:encoded><![CDATA[<p>Hi sujit </p>
<p>This exception handling is straight forward when we call a remote object method and add a Fault event listener to it. I have a case which is different. </p>
<p>details :  From flex call a servlet to upload file from flex side. The servlet gets invoked and reads the data , does some processing by calling some helper classes. If any error occurs while processing  i throw exception , which indirectly comes out of servlet as ServletException . </p>
<p>But at flex side we cannot add a fault event listener for uploading file. So how to catch such servlet exceptions&#8230;. </p>
<p>Thanks &amp; Regards<br />
Jash</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kammy Wesley</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-25676</link>
		<dc:creator>Kammy Wesley</dc:creator>
		<pubDate>Mon, 15 Jun 2009 20:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-25676</guid>
		<description>Thanks for this post!  Exactly what I needed!</description>
		<content:encoded><![CDATA[<p>Thanks for this post!  Exactly what I needed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frankie</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-25151</link>
		<dc:creator>Frankie</dc:creator>
		<pubDate>Thu, 11 Jun 2009 18:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-25151</guid>
		<description>I was using your approach succesfully until we have switched using the Flex-Spring Integration.
After that I can no longer access my custom exception from Flex client, instead server returns a UndeclaredThrowableException just like reported here.
http://forum.springsource.org/showthread.php?t=72571
Can you think of a workaround ?</description>
		<content:encoded><![CDATA[<p>I was using your approach succesfully until we have switched using the Flex-Spring Integration.<br />
After that I can no longer access my custom exception from Flex client, instead server returns a UndeclaredThrowableException just like reported here.<br />
<a href="http://forum.springsource.org/showthread.php?t=72571" rel="nofollow">http://forum.springsource.org/showthread.php?t=72571</a><br />
Can you think of a workaround ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerry Christiansen</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-24014</link>
		<dc:creator>Gerry Christiansen</dc:creator>
		<pubDate>Wed, 03 Jun 2009 01:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-24014</guid>
		<description>Very nice example and explanation.  I am currently using this in our application project and it works like a champ.  Much thanks for taking the time to create this explanation.  Saved me many, many hours.</description>
		<content:encoded><![CDATA[<p>Very nice example and explanation.  I am currently using this in our application project and it works like a champ.  Much thanks for taking the time to create this explanation.  Saved me many, many hours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Setting up BlazeDS &#171; Sujit Reddy G - The Evangelist</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-15350</link>
		<dc:creator>Setting up BlazeDS &#171; Sujit Reddy G - The Evangelist</dc:creator>
		<pubDate>Tue, 07 Apr 2009 13:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-15350</guid>
		<description>[...] Flex and Blaze DSBlazeDS and LCDS Feature differenceRendering PDF content in Adobe AIR applicationHandling Java Exceptions in Flex applicationAS3 library for Google Calendar (as3googlecalendarlib)Ask [...]</description>
		<content:encoded><![CDATA[<p>[...] Flex and Blaze DSBlazeDS and LCDS Feature differenceRendering PDF content in Adobe AIR applicationHandling Java Exceptions in Flex applicationAS3 library for Google Calendar (as3googlecalendarlib)Ask [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kranthi</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-3897</link>
		<dc:creator>kranthi</dc:creator>
		<pubDate>Thu, 18 Dec 2008 18:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-3897</guid>
		<description>HI Sujit,

Thankyou for the response,
you  are right, even the regular exception class is throwing some error message,
i could get the base error with the rootCause object.

Thankyou,
Regards,
V.Kranthi.</description>
		<content:encoded><![CDATA[<p>HI Sujit,</p>
<p>Thankyou for the response,<br />
you  are right, even the regular exception class is throwing some error message,<br />
i could get the base error with the rootCause object.</p>
<p>Thankyou,<br />
Regards,<br />
V.Kranthi.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sujit Reddy G</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-3890</link>
		<dc:creator>Sujit Reddy G</dc:creator>
		<pubDate>Thu, 18 Dec 2008 14:11:39 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-3890</guid>
		<description>Hi Kranthi,

I don&#039;t think you need to create custom exception classes. Even the regular Exception classes thrown are returned to you in Flex.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Hi Kranthi,</p>
<p>I don&#8217;t think you need to create custom exception classes. Even the regular Exception classes thrown are returned to you in Flex.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kranthi</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-3874</link>
		<dc:creator>kranthi</dc:creator>
		<pubDate>Wed, 17 Dec 2008 20:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-3874</guid>
		<description>Hi Sujit,

I am working on flex with java as backend and blazeds in the middle.

I found this doc very useful as this is what i have been looking for,
but i could not apply this exactly to my project as i don&#039;t want to changed anything in my services, i cannot have my custom exceptions class,

but i want to get the error message from down the stack,
i could get the error message from down the stack in java using exception.getCause(),
can u suggest me a way to get this in flex.

Thankyou,
V.Kranthi.</description>
		<content:encoded><![CDATA[<p>Hi Sujit,</p>
<p>I am working on flex with java as backend and blazeds in the middle.</p>
<p>I found this doc very useful as this is what i have been looking for,<br />
but i could not apply this exactly to my project as i don&#8217;t want to changed anything in my services, i cannot have my custom exceptions class,</p>
<p>but i want to get the error message from down the stack,<br />
i could get the error message from down the stack in java using exception.getCause(),<br />
can u suggest me a way to get this in flex.</p>
<p>Thankyou,<br />
V.Kranthi.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: elearning</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-3370</link>
		<dc:creator>elearning</dc:creator>
		<pubDate>Sun, 16 Nov 2008 18:55:05 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-3370</guid>
		<description>Really thanks alot for these great tutorials!

Your blog has valuable and great tutorials.</description>
		<content:encoded><![CDATA[<p>Really thanks alot for these great tutorials!</p>
<p>Your blog has valuable and great tutorials.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kranthi</title>
		<link>http://sujitreddyg.wordpress.com/2008/02/12/handling-java-exceptions-in-flex-application/#comment-591</link>
		<dc:creator>Kranthi</dc:creator>
		<pubDate>Wed, 20 Aug 2008 17:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://sujitreddyg.wordpress.com/?p=36#comment-591</guid>
		<description>Hi Sujit,

Can you please tell how to do Exception handling for Flex-HTTPServices communication.

Class on Backend is as below.
 
----------------------------------------
public class ServiceAcceptor extends javax.servlet.http.HttpServlet {

	 private Logger logger=Logger.getLogger(ServiceAcceptor.class);

	public ServiceAcceptor() {
		super();
	}

	public void init(){
 	   // ClarityAgent.getInstance();
	}

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doAction(request,response);

	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doAction(request,response);
	}

	protected void doAction(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
		IAction action = (IAction)ctx.getBean(&quot;ServicesController&quot;);
		try{
			action.doAction(request,response);
		}catch(Exception e){
			throw new ServletException(&quot;Exception from BackEnd&quot;);
		}


	}
----------------------------------

On flex side we see the following variables. I dont see the cutom error which I put on backend side.

----------------------------------

message = mx.messaging.messages.ErrorMessage (@b3e29d1)
	body = Object (@b3ce269)
	clientId = &quot;DirectHTTPChannel0&quot;
	correlationId = &quot;DB42658C-64A1-2618-156A-E11B7AFCE636&quot;
	destination = &quot;&quot;
	extendedData = null
	faultCode = &quot;Server.Error.Request&quot;
	faultDetail = &quot;Error: [IOErrorEvent type=&quot;ioError&quot; bubbles=false cancelable=false eventPhase=2 text=&quot;Error #2032: Stream Error. URL: http://161.15.160.169:7070/ProductWS/services/GetClientReports&quot;]. URL: /ProductWS/services/GetClientReports&quot;
	faultString = &quot;HTTP request error&quot;
	headers = Object (@b3ce179)
	messageId = &quot;B355B8AC-7B18-AC77-5604-E11BA1FDC34A&quot;
	rootCause = flash.events.IOErrorEvent (@b1b83f9)
		bubbles = false
		cancelable = false
		currentTarget = flash.net.URLLoader (@b3e2a81)
		eventPhase = 2
		target = flash.net.URLLoader (@b3e2a81)
		text = &quot;Error #2032: Stream Error. URL: http://161.15.160.169:7070/ProductWS/services/GetClientReports&quot;
		type = &quot;ioError&quot;
	timestamp = 0
	timeToLive = 0

-------------------------------------

If you can find solution please let me know.
Thanks a lot in advance

Kranthi</description>
		<content:encoded><![CDATA[<p>Hi Sujit,</p>
<p>Can you please tell how to do Exception handling for Flex-HTTPServices communication.</p>
<p>Class on Backend is as below.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
public class ServiceAcceptor extends javax.servlet.http.HttpServlet {</p>
<p>	 private Logger logger=Logger.getLogger(ServiceAcceptor.class);</p>
<p>	public ServiceAcceptor() {<br />
		super();<br />
	}</p>
<p>	public void init(){<br />
 	   // ClarityAgent.getInstance();<br />
	}</p>
<p>	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />
		doAction(request,response);</p>
<p>	}</p>
<p>	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />
		doAction(request,response);<br />
	}</p>
<p>	protected void doAction(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />
		WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());<br />
		IAction action = (IAction)ctx.getBean(&#8220;ServicesController&#8221;);<br />
		try{<br />
			action.doAction(request,response);<br />
		}catch(Exception e){<br />
			throw new ServletException(&#8220;Exception from BackEnd&#8221;);<br />
		}</p>
<p>	}<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>On flex side we see the following variables. I dont see the cutom error which I put on backend side.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>message = mx.messaging.messages.ErrorMessage (@b3e29d1)<br />
	body = Object (@b3ce269)<br />
	clientId = &#8220;DirectHTTPChannel0&#8243;<br />
	correlationId = &#8220;DB42658C-64A1-2618-156A-E11B7AFCE636&#8243;<br />
	destination = &#8220;&#8221;<br />
	extendedData = null<br />
	faultCode = &#8220;Server.Error.Request&#8221;<br />
	faultDetail = &#8220;Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: <a href="http://161.15.160.169:7070/ProductWS/services/GetClientReports" rel="nofollow">http://161.15.160.169:7070/ProductWS/services/GetClientReports</a>"]. URL: /ProductWS/services/GetClientReports&#8221;<br />
	faultString = &#8220;HTTP request error&#8221;<br />
	headers = Object (@b3ce179)<br />
	messageId = &#8220;B355B8AC-7B18-AC77-5604-E11BA1FDC34A&#8221;<br />
	rootCause = flash.events.IOErrorEvent (@b1b83f9)<br />
		bubbles = false<br />
		cancelable = false<br />
		currentTarget = flash.net.URLLoader (@b3e2a81)<br />
		eventPhase = 2<br />
		target = flash.net.URLLoader (@b3e2a81)<br />
		text = &#8220;Error #2032: Stream Error. URL: <a href="http://161.15.160.169:7070/ProductWS/services/GetClientReports" rel="nofollow">http://161.15.160.169:7070/ProductWS/services/GetClientReports</a>&#8221;<br />
		type = &#8220;ioError&#8221;<br />
	timestamp = 0<br />
	timeToLive = 0</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>If you can find solution please let me know.<br />
Thanks a lot in advance</p>
<p>Kranthi</p>
]]></content:encoded>
	</item>
</channel>
</rss>
