You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Eran Chinthaka <ch...@opensource.lk> on 2005/08/12 14:11:09 UTC

[Axis2] Exception Handling

This relates to the "Build failure" thread.

I agree with Dims here. I ran that test case in IDEA, there I saw the
exception, but for the client he will not see the exception.

In general, I should say the way people have handled the exception is not
satisfactory. For example, exception was caught and has thrown again without
any logging.

}catch (MyException e){
   throw new AxisFault (e.getMessage());
}

What I'd like to see everybody doing is like this.

}catch (MyException e){
   log.error("Exception has thrown in xxxxxx ", e);
   throw new AxisFault (e.getMessage(), e);
}



I think the problem Dims is pointing is occurring due to that.

If you agree on the way I propose, I will add a JIRA which should be fixed
before the next release.

-- EC



> 
> Ajith,
> 
> i know...but either way if there is a fault/error, that fault/error
> should get back to the client. right? (with or without timeout).
> 
> -- dims
> 
> On 8/12/05, Ajith Ranabahu <aj...@gmail.com> wrote:
> > Hi Dims,
> >  The infinite wait was due to a bug in the in-out mep client that
> prevented
> > it from time-outing. Why it should have timed-out is a problem with the
> > dispatching!
> >   :)
> >
> >
> > On 8/12/05, Davanum Srinivas <da...@gmail.com> wrote:
> > > Eran,
> > >
> > > here's one thing that bothers me...for this infinite wait build
> > > problem. there was an exception but that did not get reported in any
> > > of the logs and did not get back to the caller and the caller was
> > > waiting...right?
> > >
> > > we always land up in such trouble because we make the "correct" path
> > > work and forget the fault path.
> > >
> > > thanks,
> > > dims
> > >
> > > On 8/11/05, Eran Chinthaka < chinthaka@opensource.lk> wrote:
> > > > Fixed the build.
> > > >
> > > > But I had to revert the WSA Action based dispatching. And I think we
> > need to
> > > > re-think about WSA based dispatching in the engine.
> > > >
> > > > Regards,
> > > > EC
> > > >
> > > > > -----Original Message-----
> > > > > From: Davanum Srinivas [mailto:davanum@gmail.com]
> > > > > Sent: Friday, August 12, 2005 5:23 AM
> > > > > To: axis-dev@ws.apache.org
> > > > > Subject: [Axis2] build failure
> > > > >
> > > > > Build gets stuck here....both in command line and on intellij
> > > > >
> > > > > test:test:
> > > > >     [junit] Running
> > org.apache.axis2.engine.CallUnregisteredServiceTest
> > > > >     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
> 3.105
> > sec
> > > > >     [junit] Running
> > org.apache.axis2.engine.CharctersetEncodingTest
> > > > >     [junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed:
> > 23.545
> > > > > sec
> > > > >     [junit] Running
> > org.apache.axis2.engine.CommonsHTTPEchoRawXMLTest
> > > > >     [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed:
> 6.79
> > sec
> > > > >     [junit] Running
> > org.apache.axis2.engine.EchoRawXMLChunckedTest
> > > > >     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
> 2.955
> > sec
> > > > >     [junit] Running
> > org.apache.axis2.engine.EchoRawXMLLoadTest
> > > > >     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
> 2.994
> > sec
> > > > >     [junit] Running
> > > > >
> > org.apache.axis2.engine.EchoRawXMLOnTwoChannelsSyncTest
> > > > >
> > > > >
> > > > > Thanks,
> > > > > dims
> > > > >
> > > > > --
> > > > > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service
> > Platform
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service
> Platform
> > >
> >
> >
> >
> > --
> > Ajith Ranabahu
> 
> 
> --
> Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform




Re: [Axis2] Exception Handling

Posted by Thilina Gunarathne <cs...@gmail.com>.
I have already open an issue related to this. - axis2-142
 Thanks,
~Thilina

 On 8/12/05, Eran Chinthaka <ch...@opensource.lk> wrote: 
> 
> This relates to the "Build failure" thread.
> 
> I agree with Dims here. I ran that test case in IDEA, there I saw the
> exception, but for the client he will not see the exception.
> 
> In general, I should say the way people have handled the exception is not
> satisfactory. For example, exception was caught and has thrown again 
> without
> any logging.
> 
> }catch (MyException e){
> throw new AxisFault (e.getMessage());
> }
> 
> What I'd like to see everybody doing is like this.
> 
> }catch (MyException e){
> log.error("Exception has thrown in xxxxxx ", e);
> throw new AxisFault (e.getMessage(), e);
> }
> 
> 
> 
> I think the problem Dims is pointing is occurring due to that.
> 
> If you agree on the way I propose, I will add a JIRA which should be fixed
> before the next release.
> 
> -- EC
> 
> 
> 
> >
> > Ajith,
> >
> > i know...but either way if there is a fault/error, that fault/error
> > should get back to the client. right? (with or without timeout).
> >
> > -- dims
> >
> > On 8/12/05, Ajith Ranabahu <aj...@gmail.com> wrote:
> > > Hi Dims,
> > > The infinite wait was due to a bug in the in-out mep client that
> > prevented
> > > it from time-outing. Why it should have timed-out is a problem with 
> the
> > > dispatching!
> > > :)
> > >
> > >
> > > On 8/12/05, Davanum Srinivas <da...@gmail.com> wrote:
> > > > Eran,
> > > >
> > > > here's one thing that bothers me...for this infinite wait build
> > > > problem. there was an exception but that did not get reported in any
> > > > of the logs and did not get back to the caller and the caller was
> > > > waiting...right?
> > > >
> > > > we always land up in such trouble because we make the "correct" path
> > > > work and forget the fault path.
> > > >
> > > > thanks,
> > > > dims
> > > >
> > > > On 8/11/05, Eran Chinthaka < chinthaka@opensource.lk> wrote:
> > > > > Fixed the build.
> > > > >
> > > > > But I had to revert the WSA Action based dispatching. And I think 
> we
> > > need to
> > > > > re-think about WSA based dispatching in the engine.
> > > > >
> > > > > Regards,
> > > > > EC
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Davanum Srinivas [mailto:davanum@gmail.com]
> > > > > > Sent: Friday, August 12, 2005 5:23 AM
> > > > > > To: axis-dev@ws.apache.org
> > > > > > Subject: [Axis2] build failure
> > > > > >
> > > > > > Build gets stuck here....both in command line and on intellij
> > > > > >
> > > > > > test:test:
> > > > > > [junit] Running
> > > org.apache.axis2.engine.CallUnregisteredServiceTest
> > > > > > [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
> > 3.105
> > > sec
> > > > > > [junit] Running
> > > org.apache.axis2.engine.CharctersetEncodingTest
> > > > > > [junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed:
> > > 23.545
> > > > > > sec
> > > > > > [junit] Running
> > > org.apache.axis2.engine.CommonsHTTPEchoRawXMLTest
> > > > > > [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed:
> > 6.79
> > > sec
> > > > > > [junit] Running
> > > org.apache.axis2.engine.EchoRawXMLChunckedTest
> > > > > > [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
> > 2.955
> > > sec
> > > > > > [junit] Running
> > > org.apache.axis2.engine.EchoRawXMLLoadTest
> > > > > > [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
> > 2.994
> > > sec
> > > > > > [junit] Running
> > > > > >
> > > org.apache.axis2.engine.EchoRawXMLOnTwoChannelsSyncTest
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > dims
> > > > > >
> > > > > > --
> > > > > > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web 
> Service
> > > Platform
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service
> > Platform
> > > >
> > >
> > >
> > >
> > > --
> > > Ajith Ranabahu
> >
> >
> > --
> > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service 
> Platform
> 
> 
> 
> 


-- 
"May the SourcE be with u" 
http://www.bloglines.com/blog/thilina