{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/issues/113","labels_url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/issues/113/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/issues/113/events","html_url":"https://github.com/elastic/elasticsearch-mapper-attachments/issues/113","id":58641529,"number":113,"title":"Add check if TikaException is serializable, before wrapping with MapperParsingException","user":{"login":"apogrebnyak","id":399063,"avatar_url":"https://avatars.githubusercontent.com/u/399063?v=3","gravatar_id":"","url":"https://api.github.com/users/apogrebnyak","html_url":"https://github.com/apogrebnyak","followers_url":"https://api.github.com/users/apogrebnyak/followers","following_url":"https://api.github.com/users/apogrebnyak/following{/other_user}","gists_url":"https://api.github.com/users/apogrebnyak/gists{/gist_id}","starred_url":"https://api.github.com/users/apogrebnyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apogrebnyak/subscriptions","organizations_url":"https://api.github.com/users/apogrebnyak/orgs","repos_url":"https://api.github.com/users/apogrebnyak/repos","events_url":"https://api.github.com/users/apogrebnyak/events{/privacy}","received_events_url":"https://api.github.com/users/apogrebnyak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/labels/2.5.0","name":"2.5.0","color":"0052cc"},{"url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/milestones/13","html_url":"https://github.com/elastic/elasticsearch-mapper-attachments/milestones/2.5.0","labels_url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/milestones/13/labels","id":827116,"number":13,"title":"2.5.0","description":"For elasticsearch 1.5.0","creator":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":4,"state":"open","created_at":"2014-10-15T10:09:21Z","updated_at":"2015-03-30T13:26:41Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-02-23T20:15:50Z","updated_at":"2015-03-30T13:26:41Z","closed_at":"2015-03-30T13:26:41Z","body":"If you try to parse a Zip Bombed attachment, such as the one pointed to here -> https://github.com/apache/tika/blob/trunk/tika-parsers/src/test/resources/test-documents/TIKA-216.tgz, it generates `TikaException` that is not serializable (I submitted issue to Tika as well -> https://issues.apache.org/jira/browse/TIKA-1559).\r\n\r\nBecasue of this, on the client side, I do not receive `MapperParsingException`, but instead `NotSerializableTransportException`.\r\n\r\nI think the `AttachmentMapper` code should be fortified, to check if 3-rd party exceptions are serializable, and if not, then wrap `NotSerializableTransportException` into `MapperParsingException`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/issues/comments/87679626","html_url":"https://github.com/elastic/elasticsearch-mapper-attachments/issues/113#issuecomment-87679626","issue_url":"https://api.github.com/repos/elastic/elasticsearch-mapper-attachments/issues/113","id":87679626,"user":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T13:26:41Z","updated_at":"2015-03-30T13:26:41Z","body":"I was trying to reproduce that and did not manage to reproduce the exception using the same [tgz](https://github.com/apache/tika/blob/trunk/tika-parsers/src/test/resources/test-documents/TIKA-216.tgz) file.\r\nCould you tell me on which version you ran into this issue?\r\n\r\nHere is the result I got with mapper 2.5.0-SNAPSHOT.\r\n\r\n```json\r\n{\r\n  \"took\" : 196,\r\n  \"timed_out\" : false,\r\n  \"_shards\" : {\r\n    \"total\" : 7,\r\n    \"successful\" : 7,\r\n    \"failed\" : 0\r\n  },\r\n  \"hits\" : {\r\n    \"total\" : 1,\r\n    \"max_score\" : 1.0,\r\n    \"hits\" : [ {\r\n      \"_index\" : \"test\",\r\n      \"_type\" : \"person\",\r\n      \"_id\" : \"AUxq2kryygbyKc7qphVk\",\r\n      \"_score\" : 1.0,\r\n      \"fields\" : {\r\n        \"file\" : [ \"\\n\\nblah.tgz\\n\\nblah.tar\\n\\n\\n\\n\\n\\n\\nblah1.txt\\n\\n\\n\\nblah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\\nblah blah blah blah blah \r\n// Lot of lines like this one skipped\r\nblah blah blah blah blah blah blah blah blah blah blah\\nblah blah blah blah blah blah \" ],\r\n        \"file.content_type\" : [ \"application/gzip\" ]\r\n      }\r\n    } ]\r\n  }\r\n}\r\n```"}}