# How to index documents (in normal terms, like pdf, docs, spreadsheets) in elasticsearch (2.3.2)?

**URL:** <https://discuss.elastic.co/t/how-to-index-documents-in-normal-terms-like-pdf-docs-spreadsheets-in-elasticsearch-2-3-2/51800>\
**Category:** Elasticsearch\
**Created:** [June 3, 2016, 1:42pm UTC](https://discuss.elastic.co/t/how-to-index-documents-in-normal-terms-like-pdf-docs-spreadsheets-in-elasticsearch-2-3-2/51800 "2016-06-03T13:42:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vicky2000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vicky2000/32/10142_2.png) [@Vicky2000](https://discuss.elastic.co/u/Vicky2000)\
**Post date:** [June 3, 2016, 1:42pm UTC](https://discuss.elastic.co/t/how-to-index-documents-in-normal-terms-like-pdf-docs-spreadsheets-in-elasticsearch-2-3-2/51800/1 "2016-06-03T13:42:49Z")

</div>

Hi everyone. I am using ES 2.3.2. I want to search inside pdf, excel and word files with it. I successfully installed mapper attachment using command "sudo /path to ES/bin/plugin install mapper-attachments. However, it is not running properly. I am using Java API to index and search. However, I am getting the error message as mentioned below. Is mapper attachment the right way to go for my requirements, or should I do something else? If the former, what version and how should I install it?

If you need more details, please tell me. I have joined this forum only today and not accustomed to it. Thanks in advance.

The detailed error message I am getting is:

Jun 04, 2016 10:37:30 AM org.elasticsearch.node.Node   
INFO: [Devos the Devastator] version[2.3.2], pid[5024], build[b9e4a6a/2016-04-21T16:03:47Z]  
Jun 04, 2016 10:37:30 AM org.elasticsearch.node.Node   
INFO: [Devos the Devastator] initializing ...  
Exception in thread "main" java.lang.IllegalStateException: failed to load bundle [file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/tagsoup-1.2.1.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/pdfbox-1.8.10.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/tika-parsers-1.11.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/commons-codec-1.10.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/poi-ooxml-schemas-3.13.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/mapper-attachments-2.3.2.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/bcmail-jdk15on-1.52.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/commons-logging-1.1.3.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/commons-compress-1.10.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/bcpkix-jdk15on-1.52.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/poi-scratchpad-3.13.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/fontbox-1.8.10.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/xmlbeans-2.6.0.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/poi-3.13.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/commons-io-2.4.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/juniversalchardet-1.0.3.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/bcprov-jdk15on-1.52.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/poi-ooxml-3.13.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/jempbox-1.8.10.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/tika-core-1.11.jar, file:/home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/stax-api-1.0.1.jar] due to jar hell  
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:421)  
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:129)  
at org.elasticsearch.node.Node.(Node.java:158)  
at org.elasticsearch.node.Node.(Node.java:140)  
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)  
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:150)  
at com.kodcu.main.JavaAPIMain.main(JavaAPIMain.java:22)  
Caused by: java.lang.IllegalStateException: jar hell!  
class: org.apache.commons.io.ByteOrderMark  
jar1: /home/varun/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar  
jar2: /home/varun/elasticsearch-2.3.2/plugins/mapper-attachments/commons-io-2.4.jar  
at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:282)  
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:186)  
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:419)  
... 6 more

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 3, 2016, 2:13pm UTC](https://discuss.elastic.co/t/how-to-index-documents-in-normal-terms-like-pdf-docs-spreadsheets-in-elasticsearch-2-3-2/51800/2 "2016-06-03T14:13:51Z")

</div>

> If you need more details, please tell me.

Yes.

> I am getting the error something like

What is the exact full error you have?

---

<div class="post-metadata">

**Author:** ![Vicky2000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vicky2000/32/10142_2.png) [@Vicky2000](https://discuss.elastic.co/u/Vicky2000)\
**Post date:** [June 4, 2016, 5:11am UTC](https://discuss.elastic.co/t/how-to-index-documents-in-normal-terms-like-pdf-docs-spreadsheets-in-elasticsearch-2-3-2/51800/3 "2016-06-04T05:11:15Z")

</div>

Thanks for your prompt reply. I have added the exact error in the question.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 4, 2016, 6:17am UTC](https://discuss.elastic.co/t/how-to-index-documents-in-normal-terms-like-pdf-docs-spreadsheets-in-elasticsearch-2-3-2/51800/4 "2016-06-04T06:17:35Z")

</div>

You are embedding Elasticsearch.

This is not supported.

If you do this, here, you have to deal with conflicts.  
Common-io is in Elasticsearch already. You have to remove it from your classpath

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:46pm UTC](https://discuss.elastic.co/t/how-to-index-documents-in-normal-terms-like-pdf-docs-spreadsheets-in-elasticsearch-2-3-2/51800/5 "2017-07-05T22:46:14Z")

</div>


