Open ashishj92 opened 7 years ago
Hmm... can you maybe share more information or a reproducer? Are you using any tools that modify the compiled classes afterwards (like Lombok, for instance)?
Hi. I'm seeing a similar error using either the 0.14 or 0.15 releases, run with Maven.
I don't believe we make any byte code changes. We do check on annotations and 'setAccessible' in some cases. Being a large project I'm not easily able to extract the classes to give you an example. I'm not sure what information would be the most helpful so please let me know what you need.
Bellow is the error from Maven using version 0.14.
[ERROR] Failed to execute goal com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs (default) on project DynamicWeb: Execution default of goal com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs failed: Index: 113, Size: 113 -> [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 DynamicWeb: Execution default of goal com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs failed: Index: 113, Size: 113
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
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:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
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:497)
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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.sebastian-daschner:jaxrs-analyzer-maven-plugin:0.14:analyze-jaxrs failed: Index: 113, Size: 113
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 113, Size: 113
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:1540)
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:1540)
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.addProjectMethods(MethodContentAnalyzer.java:112)
at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.MethodContentAnalyzer.findProjectMethods(MethodContentAnalyzer.java:88)
at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.ResourceMethodContentAnalyzer.analyze(ResourceMethodContentAnalyzer.java:57)
at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.BytecodeAnalyzer.analyzeBytecode(BytecodeAnalyzer.java:26)
at java.lang.Iterable.forEach(Iterable.java:75)
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)
at com.sebastian_daschner.jaxrs_analyzer.analysis.bytecode.BytecodeAnalyzer.analyzeBytecode(BytecodeAnalyzer.java:18)
at com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer.analyze(ProjectAnalyzer.java:107)
at com.sebastian_daschner.jaxrs_analyzer.JAXRSAnalyzer.analyze(JAXRSAnalyzer.java:69)
at com.sebastian_daschner.jaxrs_analyzer.maven.JAXRSAnalyzerMojo.execute(JAXRSAnalyzerMojo.java:194)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
... 21 more
(edited by sdaschner for readability)
jax-rsanalysererror.txt
I am getting above error while generating the swagger documentation for my code. Has someone seen this issue earlier? I am using the latest version of jax-rs analyser