Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

om.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 52264 #1140

Closed
gupdurga opened this issue Dec 8, 2017 · 4 comments

Comments

@gupdurga
Copy link

gupdurga commented Dec 8, 2017

HI Team,
I am getting below issue and i am using Guice 4, how do fix this issue?

Exception in thread "main" com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 52264
at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at com.google.inject.internal.util.$StackTraceElements.forMember(StackTraceElements.java:53)
at com.google.inject.internal.Errors.formatInjectionPoint(Errors.java:716)
at com.google.inject.internal.Errors.formatSource(Errors.java:678)
at com.google.inject.internal.Errors.format(Errors.java:555)
at com.google.inject.CreationException.getMessage(CreationException.java:48)
at java.lang.Throwable.getLocalizedMessage(Throwable.java:391)
at java.lang.Throwable.toString(Throwable.java:480)
at java.lang.String.valueOf(String.java:2994)
at java.io.PrintStream.println(PrintStream.java:821)
at java.lang.Throwable$WrappedPrintStream.println(Throwable.java:748)
at java.lang.Throwable.printStackTrace(Throwable.java:655)
at java.lang.Throwable.printStackTrace(Throwable.java:643)
at java.lang.Throwable.printStackTrace(Throwable.java:634)
at com.amazon.toucanemr.job.EMRClusterSparkJob.main(EMRClusterSparkJob.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:755)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 52264
at com.google.inject.internal.asm.$ClassReader.readClass(Unknown Source)
at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
at com.google.inject.internal.util.$LineNumbers.(LineNumbers.java:62)
at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:36)
at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:33)
at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 25 more
Command exiting with ret '1'

@mcculls
Copy link
Contributor

mcculls commented Dec 8, 2017

@gupdurga the line numbers in that stack trace don't match up with either the 4.0 or 4.1 release. However they do match the code in the 3.0 release, which makes me suspect that you have Guice 3.0 on your classpath.

Can you make sure you're running with Guice 4 and also make sure that Guice 3 is not on the same classpath.

@gupdurga
Copy link
Author

thanks mcculls ,

I checked my dependency tree, i have direct dependency on guice 4.1. But I also found other version also

  1. Guice 2.0 is getting referred by a third party library inside my project (this i am suspecting)
  2. Guice 3.0 is also present as a test dependency. GuiceJunitTestRunner-1.1.x is using it. (i don't think it should cause an issue)

I am also looking a way to find out version of Guice, inside jar while running main method.

Is this error possible due to Guice 2.0 also?

@dimo414
Copy link
Contributor

dimo414 commented Dec 14, 2017

If you have multiple versions of the same library on your classpath basically all bets are off. The first thing I would do is clean up your classpath so that you aren't accidentally including conflicting dependencies. It's only really practical to investigate issues like this once your runtime is in a clean and consistent state.

@ronshapiro
Copy link
Collaborator

You'll probably also have more luck with this on StackOverflow, as that's better for questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants