我在尝试启动码头时遇到以下问题,我得到以下异常:
Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
[ERROR] org.apache.maven.surefire.testset.TestSetFailedException: java.lang.RuntimeException: com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 51966
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:206)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:114)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:85)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.RuntimeException: com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 51966
[ERROR] at org.apache.maven.surefire.junitcore.TestSet.replay(TestSet.java:100)
[ERROR] at org.apache.maven.surefire.junitcore.ConcurrentRunListener.testSetCompleted(ConcurrentRunListener.java:82)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreRunListener.testRunFinished(JUnitCoreRunListener.java:73)
[ERROR] at org.junit.runner.notification.RunNotifier$2.notifyListener(RunNotifier.java:95)
[ERROR] at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:61)
[ERROR] at org.junit.runner.notification.RunNotifier.fireTestRunFinished(RunNotifier.java:92)
[ERROR] at org.junit.runner.JUnitCore.run(JUnitCore.java:161)
[ERROR] at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)
[ERROR] ... 6 more
[ERROR] Caused by: com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 51966
[ERROR] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
[ERROR] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
[ERROR] at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
[ERROR] at com.google.inject.internal.util.$StackTraceElements.forMember(StackTraceElements.java:53)
[ERROR] at com.google.inject.internal.Errors.formatInjectionPoint(Errors.java:716)
[ERROR] at com.google.inject.internal.Errors.formatSource(Errors.java:678)
[ERROR] at com.google.inject.internal.Errors.format(Errors.java:555)
[ERROR] at com.google.inject.CreationException.getMessage(CreationException.java:48)
[ERROR] at java.lang.Throwable.getLocalizedMessage(Throwable.java:391)
[ERROR] at java.lang.Throwable.toString(Throwable.java:480)
[ERROR] at java.lang.String.valueOf(String.java:2979)
[ERROR] at java.io.PrintWriter.println(PrintWriter.java:754)
[ERROR] at java.lang.Throwable$WrappedPrintWriter.println(Throwable.java:764)
[ERROR] at java.lang.Throwable.printStackTrace(Throwable.java:655)
[ERROR] at java.lang.Throwable.printStackTrace(Throwable.java:721)
[ERROR] at org.junit.runner.notification.Failure.getTrace(Failure.java:71)
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4StackTraceWriter.writeTraceToString(JUnit4StackTraceWriter.java:57)
[ERROR] at org.apache.maven.surefire.booter.ForkingRunListener.encode(ForkingRunListener.java:330)
[ERROR] at org.apache.maven.surefire.booter.ForkingRunListener.encode(ForkingRunListener.java:312)
[ERROR] at org.apache.maven.surefire.booter.ForkingRunListener.toString(ForkingRunListener.java:258)
[ERROR] at org.apache.maven.surefire.booter.ForkingRunListener.testError(ForkingRunListener.java:132)
[ERROR] at org.apache.maven.surefire.junitcore.TestMethod.replay(TestMethod.java:118)
[ERROR] at org.apache.maven.surefire.junitcore.TestSet.replay(TestSet.java:87)
[ERROR] ... 14 more
[ERROR] Caused by: java.lang.ArrayIndexOutOfBoundsException: 51966
[ERROR] at com.google.inject.internal.asm.$ClassReader.readUTF8(Unknown Source)
[ERROR] at com.google.inject.internal.asm.$ClassReader.readClass(Unknown Source)
[ERROR] at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
[ERROR] at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
[ERROR] at com.google.inject.internal.util.$LineNumbers.<init>(LineNumbers.java:62)
[ERROR] at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:36)
[ERROR] at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:33)
[ERROR] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
[ERROR] ... 36 more
从我读到的问题看来,lambdas 打破了 guice 错误处理,但人们仍然没有想出解决方案。如果有人知道这是关于什么的,请发表评论!