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

java.lang.IndexOutOfBoundsException when invoked through Maven #35

Open
jerryzhenleicai opened this issue Mar 13, 2017 · 2 comments
Open

Comments

@jerryzhenleicai
Copy link

jerryzhenleicai commented Mar 13, 2017

Here is the stack:

[ERROR] Failed to execute goal
com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs
(default) on project stellar-core: Execution default of goal
com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs
failed: Index: 238, Size: 238 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs
(default) on project stellar-core: Execution default of goal
com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs
failed: Index: 238, Size: 238
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
default of goal
com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs
failed: Index: 238, Size: 238
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 238, Size: 238
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.reduction.StackSizeSimulator.findBacktrackPosition(StackSizeSimulator.java:112)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1548)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.reduction.StackSizeSimulator.findLoadStoreBacktrackPositions(StackSizeSimulator.java:99)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.reduction.RelevantInstructionReducer.lambda$findLoadStoreBacktrackPositions$2(RelevantInstructionReducer.java:145)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1548)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:510)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.reduction.RelevantInstructionReducer.findLoadStoreBacktrackPositions(RelevantInstructionReducer.java:146)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.reduction.RelevantInstructionReducer.reduceInstructionsInternal(RelevantInstructionReducer.java:91)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.reduction.RelevantInstructionReducer.reduceInstructions(RelevantInstructionReducer.java:57)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.MethodContentAnalyzer.interpretRelevantInstructions(MethodContentAnalyzer.java:59)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.MethodContentAnalyzer.addProjectMethods(MethodContentAnalyzer.java:110)
        at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.MethodContentAnalyzer.findProjectMethods(MethodContentAnalyzer.java:88)
        at com.sebastian_daschner.jaxrs_analyzer.anal
@sdaschner
Copy link
Owner

Hi, thanks for issuing this.

Seems that the Analyzer has a problem with a specific body of some method.

Could you please try to reproduce and boil the error down to some code example? Please feel free to use the jaxrs-analyzer-st project.

@O5ten
Copy link

O5ten commented Sep 6, 2017

I'm having this same error with all versions above 0.9.
Is there anything i can do to help out on this?

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

3 participants