Quantcast

ArrayIndexOutOfBoundException when relocating manual issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ArrayIndexOutOfBoundException when relocating manual issue

tlueecke
Hi,

we are currently having problems running our analysis, because every run fails with the following exception:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 66
        at org.sonar.plugins.core.issue.tracking.HashedSequence.getHash(HashedSequence.java:64)
        at org.sonar.plugins.core.issue.SourceHashHolder.getNewLinesMatching(SourceHashHolder.java:97)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.relocateManualIssue(IssueTrackingDecorator.java:232)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.addUnmatched(IssueTrackingDecorator.java:190)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:121)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:100)
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:85)

Looking at the code, I see that line 66 does no longer exist in the file (even in the previous snapshot), but it seems to be the original line. Do you have any idea how to solve this? Is there some way to delete this manual issue?

Brgds,
Tim Lüecke
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

tlueecke
I forgot to mention the Sonarqube version. It is the newest 4.1 version running on a Red Hat Linux Server 6.2 64 bit with an underlying Orace 11 XE installation. With 3.7 or 4.0 we did not face this problem.

Currently we delete the issue via SQL as we have no other option of running the build again. Would it be possible to fix this by checking the current number of lines and simply setting it to 0 when the index supercedes the current number of lines?

Thx and brgds,
Tim Lüecke
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

David Racodon-2
Hi Tim,

Could you please provide a sample project to reproduce the issue (original file + line on which the manual issue is logged and modified file)?

Thank you

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Mon, Feb 24, 2014 at 3:40 AM, tlueecke <[hidden email]> wrote:
I forgot to mention the Sonarqube version. It is the newest 4.1 version
running on a Red Hat Linux Server 6.2 64 bit with an underlying Orace 11 XE
installation. With 3.7 or 4.0 we did not face this problem.

Currently we delete the issue via SQL as we have no other option of running
the build again. Would it be possible to fix this by checking the current
number of lines and simply setting it to 0 when the index supercedes the
current number of lines?

Thx and brgds,
Tim Lüecke



--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundException-when-relocating-manual-issue-tp5022038p5022378.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

tlueecke
Hi,

sorry it took me so long, but as the issue did not occur for some time, it fell of my TODO list.

Anyway, I was able to reproduce the error with attached sample file:

SampleFile.java

1. Run analysis on attached file
2. Attach manual issue on line 28 of the file
3. Delete main() method
4. Run analysis again

Result:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 28
        at org.sonar.plugins.core.issue.tracking.HashedSequence.getHash(HashedSequence.java:64)
        at org.sonar.plugins.core.issue.SourceHashHolder.getNewLinesMatching(SourceHashHolder.java:97)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.relocateManualIssue(IssueTrackingDecorator.java:232)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.addUnmatched(IssueTrackingDecorator.java:190)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:121)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:100)
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:85)

Note: When you do the following the error does _not_ occur:

1. Run analysis on attached file
2. Attach manual issue on line 28 of the file
3. Run analysis again
4. Delete main method
5. Run analysis again

So I guess it has something to do with having a new snapshot being created which references the issue?

Hope this helps in reproducing the error.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

Fabrice Bellingard-4
Hi Tim,

thanks for taking the time to get back to us on this.

I tried to reproduce your issue using your file, but everything went OK. Details:
  • Started SQ 4.4
  • Put your file in a Maven-based project
  • Run analysis with Maven
  • Created manual issue on line 28
  • Deleted the #main() method
  • Run analysis again => OK
Are you still running SQ 4.1?


Best regards,

Fabrice BELLINGARD | SonarSource
http://sonarsource.com

On Mon, Jul 28, 2014 at 2:30 PM, tlueecke <[hidden email]> wrote:
Hi,

sorry it took me so long, but as the issue did not occur for some time, it
fell of my TODO list.

Anyway, I was able to reproduce the error with attached sample file:

SampleFile.java
<http://sonarqube.15.x6.nabble.com/file/n5026916/SampleFile.java>

1. Run analysis on attached file
2. Attach manual issue on line 28 of the file
3. Delete main() method
4. Run analysis again

Result:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 28
        at
org.sonar.plugins.core.issue.tracking.HashedSequence.getHash(HashedSequence.java:64)
        at
org.sonar.plugins.core.issue.SourceHashHolder.getNewLinesMatching(SourceHashHolder.java:97)
        at
org.sonar.plugins.core.issue.IssueTrackingDecorator.relocateManualIssue(IssueTrackingDecorator.java:232)
        at
org.sonar.plugins.core.issue.IssueTrackingDecorator.addUnmatched(IssueTrackingDecorator.java:190)
        at
org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:121)
        at
org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:100)
        at
org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:85)

Note: When you do the following the error does _not_ occur:

1. Run analysis on attached file
2. Attach manual issue on line 28 of the file
3. Run analysis again
4. Delete main method
5. Run analysis again

So I guess it has something to do with having a new snapshot being created
which references the issue?

Hope this helps in reproducing the error.



--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundException-when-relocating-manual-issue-tp5022038p5026916.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

tlueecke
Hi Fabrice,

thanks for picking this up. The error so far occurred only on the 4.1 version. We migrated to 4.4 some weeks ago, and on that version it has not occurred again yet, so it should be fixed by now.

Brgds,
Tim
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

zoltanmaric
I am now getting this same error having just upgraded to 4.5.1. This is my stack trace:

Embedded error: Fail to decorate 'org.sonar.api.resources.File@69f887ed[key=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,deprecatedKey=(...).DefaultAcquisitionManagerBL,path=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,dir=com/(...),filename=DefaultAcquisitionManagerBL.java,language=Java]'
3608
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at hudson.maven.agent.Main.launch(Main.java:185)
        at hudson.maven.MavenBuilder.call(MavenBuilder.java:154)
        at hudson.maven.Maven2Builder.call(Maven2Builder.java:79)
        at hudson.maven.Maven2Builder.call(Maven2Builder.java:55)
        at hudson.remoting.UserRequest.perform(UserRequest.java:118)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 28 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to decorate 'org.sonar.api.resources.File@69f887ed[key=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,deprecatedKey=(...).DefaultAcquisitionManagerBL,path=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,dir=com/(...),filename=DefaultAcquisitionManagerBL.java,language=Java]'
        at org.sonar.maven.ExceptionHandling.handle(ExceptionHandling.java:37)
        at org.sonar.maven.SonarMojo.execute(SonarMojo.java:175)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
        ... 33 more
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'org.sonar.api.resources.File@69f887ed[key=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,deprecatedKey=(...).DefaultAcquisitionManagerBL,path=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,dir=com/(...),filename=DefaultAcquisitionManagerBL.java,language=Java]'
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:103)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:86)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:78)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:78)
        at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:70)
        at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:123)
        at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
        at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
        at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
        at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
        at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
        at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
        at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
        at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
        ... 36 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3608
        at org.sonar.plugins.core.issue.tracking.HashedSequence.getHash(HashedSequence.java:64)
        at org.sonar.plugins.core.issue.SourceHashHolder.getNewLinesMatching(SourceHashHolder.java:96)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.relocateManualIssue(IssueTrackingDecorator.java:234)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.addUnmatched(IssueTrackingDecorator.java:192)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:121)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:100)
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:95)
        ... 73 more

And yesEmbedded error: Fail to decorate 'org.sonar.api.resources.File@69f887ed[key=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,deprecatedKey=(...).DefaultAcquisitionManagerBL,path=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,dir=com/(...),filename=DefaultAcquisitionManagerBL.java,language=Java]'
3608
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at hudson.maven.agent.Main.launch(Main.java:185)
        at hudson.maven.MavenBuilder.call(MavenBuilder.java:154)
        at hudson.maven.Maven2Builder.call(Maven2Builder.java:79)
        at hudson.maven.Maven2Builder.call(Maven2Builder.java:55)
        at hudson.remoting.UserRequest.perform(UserRequest.java:118)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 28 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to decorate 'org.sonar.api.resources.File@69f887ed[key=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,deprecatedKey=(...).DefaultAcquisitionManagerBL,path=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,dir=com/(...),filename=DefaultAcquisitionManagerBL.java,language=Java]'
        at org.sonar.maven.ExceptionHandling.handle(ExceptionHandling.java:37)
        at org.sonar.maven.SonarMojo.execute(SonarMojo.java:175)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
        ... 33 more
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'org.sonar.api.resources.File@69f887ed[key=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,deprecatedKey=(...).DefaultAcquisitionManagerBL,path=src/main/java/com/(...)/DefaultAcquisitionManagerBL.java,dir=com/(...),filename=DefaultAcquisitionManagerBL.java,language=Java]'
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:103)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:86)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:78)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:78)
        at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:70)
        at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:123)
        at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
        at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
        at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
        at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
        at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
        at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
        at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
        at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
        ... 36 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3608
        at org.sonar.plugins.core.issue.tracking.HashedSequence.getHash(HashedSequence.java:64)
        at org.sonar.plugins.core.issue.SourceHashHolder.getNewLinesMatching(SourceHashHolder.java:96)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.relocateManualIssue(IssueTrackingDecorator.java:234)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.addUnmatched(IssueTrackingDecorator.java:192)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:121)
        at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:100)
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:95)
        ... 73 more

As in tlueecke's case, the line 3608 no longer exists in the class. (Yes, the class has more than 3000 lines :/ ) The code must be build with maven 2, so I am using sonar-java-plugin-2.5.1, which I believe is the latest that supports maven 2.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

zoltanmaric
zoltanmaric wrote
I am now getting this same error having just upgraded to 4.5.1. This is my stack trace:

(...)

As in tlueecke's case, the line 3608 no longer exists in the class. (Yes, the class has more than 3000 lines :/ ) The code must be build with maven 2, so I am using sonar-java-plugin-2.5.1, which I believe is the latest that supports maven 2.
Sorry, I'm having this issue in SonarQube *4.5.2*, not 4.5.1.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ArrayIndexOutOfBoundException when relocating manual issue

bojanbezuk
This post has NOT been accepted by the mailing list yet.
Hi, I'm writing a follow up for zoltanmaric problem since it was never answered,

we are still having the same issue, SonarQube version is 4.5.2.

This issue seems to be opened for this problem,  http://jira.sonarsource.com/browse/SONAR-5965 
but no workaround at the moment

Similar problem is also reported here (where issue was created i presume )
http://sonarqube.15.x6.nabble.com/Sonar-runner-error-fail-to-decorate-td5031183.html

but we didn't find any workaround that will fix our use case.

We did switch project to maven 3 and sonar-maven-plugin to version 2.6 but problem persists, so I don't believe this has any effect.

Thank you,
Bojan


Loading...