[
https://issues.apache.org/jira/browse/TIKA-1559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14333749#comment-14333749
]
Alexander Pogrenbyak commented on TIKA-1559:
--------------------------------------------
See this issue in elasticsearch-mapper-attachments project for use case:
https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/113
> SecureContentHandler.SecureSAXException is not serializable
> -----------------------------------------------------------
>
> Key: TIKA-1559
> URL: https://issues.apache.org/jira/browse/TIKA-1559
> Project: Tika
> Issue Type: Bug
> Components: parser
> Affects Versions: 1.7
> Reporter: Alexander Pogrenbyak
>
> I am using [elasticsearch-mapper-attachments
> plugin|https://github.com/elasticsearch/elasticsearch-mapper-attachments]
> It is, in turn, uses Tika library to convert attachments to plain text.
> If things do not go according to plan, it wraps the TikaException in its own,
> and tries to send it down the wire to client (me).
> Unfortunately, if exception is not serializable, it gets converted to
> somewhat cryptic *NotSerializableTransportException*, which makes it harder
> to parse on the client side.
> The reason {{SecureContentHandler.SecureSAXException}} is not serializable,
> because it is an inner class of {{SecureContentHandler}} and it is, in turn,
> not serializable, and is present as the parent object on the Exception object.
> One fix would be to convert {{SecureSAXException}} to inner *static* class,
> and add {{SecureContentHandler}} as a transient field, and explicitly
> initialize it in constructor. With this minimal modifications, this
> {{SecureSAXException}} will become fully serializable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)