1. Axis2
  2. AXIS2-5245

Information from RuntimeExceptions escapes Axis2 error handling mechanism


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.4
    • Fix Version/s: None
    • Component/s: kernel


      RuntimeExceptions result in abnormal behavior from Axis2.

      When an AxisFault is thrown, generally the fault is recorded in the message context, then a FaultFlow is invoked. Handlers operating in the FaultFlow context may then discover the fault through examination of the message contexts attached to its operation context.

      If a runtime exception is thrown, however, the exception is lost, even though the FaultFlow is properly invoked. FaultFlow Handlers can no longer discover the exception which caused their invocation.

      I recognize that best practice would include packaging every thrown exception in an AxisFault or AxisFault derivative. However, given that Axis2 does attempt to respond sensibly to RuntimeExceptions, I do not believe that having a "silent" FaultFlow invocation with no access to the originating exception is proper behavior.

      The fix for this issue would involve (minimally) adding a catch clause to various methods in AxisEngine to set the failure reason on the message context when a runtime exception is intercepted, then rethrowing the original exception. Fault handlers would then be able to recover information from the originating exception.


        James Grahn created issue -
        James Grahn made changes -
        Field Original Value New Value
        Affects Version/s 1.5.4 [ 12315568 ]
        Affects Version/s 1.5.2 [ 12315174 ]
        James Grahn made changes -
        Attachment [ 12543112 ]


          • Assignee:
            James Grahn
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: