UIMA
  1. UIMA
  2. UIMA-2304

UIMA AS service serializes Exception object which may contain user defined Exception class not available to the client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.0AS
    • Component/s: Async Scaleout
    • Labels:
      None

      Description

      When AE throws an exception UIMA wraps it in AnalysisEngineProcessException which is handed off to UIMA AS. This exception is subsequently serialized as a java object and sent in a reply to the client. The client deserializes the cargo back to a java Exception and hands it off to the application via a callback. The problem is that the Exception stack trace may include user defined Exception class(es) which are not available to the client thus causing ClassNotFound while deserializing a reply. Modify UIMA AS service side to serialize an exception to a String and send that to the client.

        Activity

        Jerry Cwiklik made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 2.4.0AS [ 12316312 ]
        Resolution Fixed [ 1 ]
        Hide
        Jerry Cwiklik added a comment -

        Turns out that serializing remote service exception into a String is not a good idea. There are use cases where the client code may need to look at the stack trace to determine the kind of failure and act on this accordingly. One example of this is the AdvancedFlowController which can be defined to ignore certain types of Exceptions happening in the remote delegate and allow a CAS to flow downstream despite the error. Also, there may be existing uima applications that depend on receiving full stack traces on failed CASes. Added a small fix to uima-as client to catch any exception that occurs during deserialization, wrap it in a generic uima-as exception and pass that on to the client.

        Show
        Jerry Cwiklik added a comment - Turns out that serializing remote service exception into a String is not a good idea. There are use cases where the client code may need to look at the stack trace to determine the kind of failure and act on this accordingly. One example of this is the AdvancedFlowController which can be defined to ignore certain types of Exceptions happening in the remote delegate and allow a CAS to flow downstream despite the error. Also, there may be existing uima applications that depend on receiving full stack traces on failed CASes. Added a small fix to uima-as client to catch any exception that occurs during deserialization, wrap it in a generic uima-as exception and pass that on to the client.
        Marshall Schor made changes -
        Field Original Value New Value
        Fix Version/s 2.4.0SDK [ 12315996 ]
        Jerry Cwiklik created issue -

          People

          • Assignee:
            Jerry Cwiklik
            Reporter:
            Jerry Cwiklik
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development