# Facing exception java.lang.ArrayIndexOutOfBoundsException: 51966 while deploying ear file

**URL:** <https://discuss.elastic.co/t/facing-exception-java-lang-arrayindexoutofboundsexception-51966-while-deploying-ear-file/142498>\
**Category:** Elasticsearch\
**Created:** [August 1, 2018, 7:54am UTC](https://discuss.elastic.co/t/facing-exception-java-lang-arrayindexoutofboundsexception-51966-while-deploying-ear-file/142498 "2018-08-01T07:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksupriya](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@ksupriya](https://discuss.elastic.co/u/ksupriya)\
**Post date:** [August 1, 2018, 7:54am UTC](https://discuss.elastic.co/t/facing-exception-java-lang-arrayindexoutofboundsexception-51966-while-deploying-ear-file/142498/1 "2018-08-01T07:54:23Z")

</div>

Hii all, i am very new to elasticsearch and i don't know much about this but what my need is i am trying to deploy docdoku-server-ear.ear in my glassfish server then i am getting following error, i am not able to findout is this error coming from elasticsearch or from that project.  
If this error am getting from elasticsearch then please suggest me some solutions.  
I am using elasticsearch v5.4.3 which is demanded by this project

[2018-08-01T12:55:43.918+0530] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: \_ThreadID=73 \_ThreadName=deployment-jar-scanner] [timeMillis: 1533108343918] [levelValue: 1000] [[  
Exception while visiting org/elasticsearch/cluster/ClusterModule.class of size 19633  
java.lang.ArrayIndexOutOfBoundsException: 51966  
at org.objectweb.asm.ClassReader.readUTF8(ClassReader.java:1946)  
at org.objectweb.asm.ClassReader.readClass(ClassReader.java:2015)  
at org.objectweb.asm.ClassReader.accept(ClassReader.java:469)  
at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)  
at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:362)  
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)  
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)  
at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:347)  
at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:67)  
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:306)  
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:295)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at java.lang.Thread.run(Thread.java:748)  
]]

[2018-08-01T12:55:43.945+0530] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: \_ThreadID=73 \_ThreadName=deployment-jar-scanner] [timeMillis: 1533108343945] [levelValue: 1000] [[  
Exception while visiting org/elasticsearch/cluster/routing/IndexRoutingTable.class of size 14733  
java.lang.ArrayIndexOutOfBoundsException: 32506  
at org.objectweb.asm.ClassReader.(ClassReader.java:174)  
at org.objectweb.asm.ClassReader.(ClassReader.java:153)  
at org.objectweb.asm.ClassReader.(ClassReader.java:359)  
at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:361)  
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)  
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)  
at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:347)  
at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:67)  
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:306)  
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:295)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at java.lang.Thread.run(Thread.java:748)  
]]

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 2, 2018, 9:46am UTC](https://discuss.elastic.co/t/facing-exception-java-lang-arrayindexoutofboundsexception-51966-while-deploying-ear-file/142498/2 "2018-08-02T09:46:31Z")

</div>

This looks as if glassfish tries to parse the Elasticsearch class files and fails. I have no idea though why Glassfish does that, but maybe that behaviour can be disabled on the glassfish side.

You should probably also ask the glassfish people. They might have more experience with this.

Which JVM is this running on?

---

<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:** [August 30, 2018, 9:49am UTC](https://discuss.elastic.co/t/facing-exception-java-lang-arrayindexoutofboundsexception-51966-while-deploying-ear-file/142498/3 "2018-08-30T09:49:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
