You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason this is an issue is that exceptions aren't always made to be serialized. As an example, StatementException in the JDBI package provides an accessor to the JDBC connection that triggered the exception; this connection contains a circular reference, which causes the default Jackson serializer used by JsonDataConverter to eventually throw a StackOverflowError.
To fix this, POJOActivityImplementation should only serialize exceptions that it knows will serialize safely, and should instead extract the message (and possibly the stack trace) from any unknown errors that it encounters to be serialized some other way. Otherwise, end users have to defend against this behavior by catching and wrapping problematic exceptions within Activity code, or otherwise live with Activity timeouts.
From @christophercurrie on February 26, 2015 4:30
When an exception is thrown in an Activity implementation,
POJOActivityImplementation
attempts to serialize the exception using the currentDataConverter
. If this fails, however, it throwsActivityFailureException
, for which there is no catch block to handle. This results in the exception being logged, but not returned to the Workflow, and the activity ultimately times out.The reason this is an issue is that exceptions aren't always made to be serialized. As an example,
StatementException
in the JDBI package provides an accessor to the JDBC connection that triggered the exception; this connection contains a circular reference, which causes the default Jackson serializer used byJsonDataConverter
to eventually throw aStackOverflowError
.To fix this,
POJOActivityImplementation
should only serialize exceptions that it knows will serialize safely, and should instead extract the message (and possibly the stack trace) from any unknown errors that it encounters to be serialized some other way. Otherwise, end users have to defend against this behavior by catching and wrapping problematic exceptions within Activity code, or otherwise live with Activity timeouts.Copied from original issue: aws/aws-sdk-java#364
The text was updated successfully, but these errors were encountered: