ArrayIndexOutOfBoundsException with SourcePersister since 5.1

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

ArrayIndexOutOfBoundsException with SourcePersister since 5.1

sberthiaume
This post was updated on .
Hi, I'm having yet another issue; everything worked fine in SonarQube 5.0 and 5.0.1, but now that I upgraded to 5.1, SonarRunner fails with the following stack; I'm running with sonar.showSql=true, sonar.showSqlResults=true and sonar.verbose=true.

I've seen other people reporting "Unable to save file sources" errors, but with error messages that led to believe it was an encoding issue (we do have mixed encoding files, some files even empty if it matters) which is not our case; I've also seen ArrayIndexOutOfBoundsException error reports, but related to decorators, which is not our case either?

Oh and nothing at all shows in our actual sonar server logs; other projects work just fine although all are much smaller (900K LOC vs 360K LOC and 240K LOC)

Any ideas on how I can find what is causing the problem?

17:17:15.794 INFO  - Store results in database
17:17:15.795 DEBUG - Execute org.sonar.batch.phases.GraphPersister
17:17:18.301 DEBUG - Execute org.sonar.batch.index.SourcePersister
17:17:25.304 DEBUG - Updating semaphore batch-my::project
17:17:32.499 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@60e123f1[id=29893,key=my::project,qualifier=TRK], with key batch-my::project
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 42:14.607s
Final Memory: 52M/1504M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
	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.runner.Main.executeTask(Main.java:70)
	at org.sonar.runner.Main.execute(Main.java:59)
	at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Unable to save file sources
	at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:84)
	at org.sonar.batch.phases.DatabaseModePhaseExecutor.executePersisters(DatabaseModePhaseExecutor.java:165)
	at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:133)
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
	at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
	... 9 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -32697
	at java.util.ArrayList.elementData(ArrayList.java:400)
	at java.util.ArrayList.get(ArrayList.java:413)
	at com.google.protobuf.RepeatedFieldBuilder.getBuilder(RepeatedFieldBuilder.java:245)
	at org.sonar.server.source.db.FileSourceDb$Data$Builder.getLinesBuilder(FileSourceDb.java:2911)
	at org.sonar.batch.index.SourceDataFactory.applyLineMeasure(SourceDataFactory.java:183)
	at org.sonar.batch.index.SourceDataFactory.applyLineMeasures(SourceDataFactory.java:117)
	at org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76)
	at org.sonar.batch.index.SourcePersister.computeData(SourcePersister.java:152)
	at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:93)
	at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81)
	... 33 more
ERROR: 
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

Julien HENRY
Hi,

It seems there is an issue with one of your coverage engine. It seems that some coverage was reported at line -32697 for one file. I'll ensure that such a bad value is detected earlier with better contextual information for future SQ version (https://jira.codehaus.org/browse/SONAR-6200).
What coverage engine are you using?

++

Julien

2015-04-10 1:35 GMT+02:00 sberthiaume <[hidden email]>:
Hi, I'm having yet another issue; everything worked fine in SonarQube 5.0 and
5.0.1, but now that I upgraded to 5.1, SonarRunner fails with the following
stack; I'm running with sonar.showSql=true, sonar.showSqlResults=true and
sonar.verbose=true.

I've seen other people reporting "Unable to save file sources" errors, but
with error messages that led to believe it was an encoding issue (we do have
mixed encoding files, some files even empty if it matters) which is not our
case; I've also seen ArrayIndexOutOfBoundsException error reports, but
related to decorators, which is not our case either?

Oh and nothing at all shows in our actual sonar server logs; other projects
work just fine although all are much smaller (900K LOC vs 360K LOC and 240K
LOC)

Any ideas on how I can find what is causing the problem?





--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233.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
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

sberthiaume
Hi, I'm using Cobertura.


Simon B.

On Mon, Apr 13, 2015 at 3:11 AM, Julien HENRY [via SonarQube] <[hidden email]> wrote:
Hi,

It seems there is an issue with one of your coverage engine. It seems that some coverage was reported at line -32697 for one file. I'll ensure that such a bad value is detected earlier with better contextual information for future SQ version (https://jira.codehaus.org/browse/SONAR-6200).
What coverage engine are you using?

++

Julien

2015-04-10 1:35 GMT+02:00 sberthiaume <[hidden email]>:
Hi, I'm having yet another issue; everything worked fine in SonarQube 5.0 and
5.0.1, but now that I upgraded to 5.1, SonarRunner fails with the following
stack; I'm running with sonar.showSql=true, sonar.showSqlResults=true and
sonar.verbose=true.

I've seen other people reporting "Unable to save file sources" errors, but
with error messages that led to believe it was an encoding issue (we do have
mixed encoding files, some files even empty if it matters) which is not our
case; I've also seen ArrayIndexOutOfBoundsException error reports, but
related to decorators, which is not our case either?

Oh and nothing at all shows in our actual sonar server logs; other projects
work just fine although all are much smaller (900K LOC vs 360K LOC and 240K
LOC)

Any ideas on how I can find what is causing the problem?





--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233.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






If you reply to this email, your message will be added to the discussion below:
http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034259.html
To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister since 5.1, click here.
NAML



--
Simon Berthiaume
Build Master | Acquisio

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: http://twitter.com/acquisio
LinkedIn: http://www.linkedin.com/company/acquisio
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | www.acquisio.com
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

Julien HENRY
Then could you please have a look at Cobertura report (by default target/site/cobertura/coverage.xml if you are using Maven) and see if there is this strange value (-32697).

++

Julien

2015-04-13 14:56 GMT+02:00 sberthiaume <[hidden email]>:
Hi, I'm using Cobertura.


Simon B.

On Mon, Apr 13, 2015 at 3:11 AM, Julien HENRY [via SonarQube] <
[hidden email]> wrote:

> Hi,
>
> It seems there is an issue with one of your coverage engine. It seems that
> some coverage was reported at line -32697 for one file. I'll ensure that
> such a bad value is detected earlier with better contextual information for
> future SQ version (https://jira.codehaus.org/browse/SONAR-6200).
> What coverage engine are you using?
>
> ++
>
> Julien
>
> 2015-04-10 1:35 GMT+02:00 sberthiaume <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5034259&i=0>>:
>
>> Hi, I'm having yet another issue; everything worked fine in SonarQube 5.0
>> and
>> 5.0.1, but now that I upgraded to 5.1, SonarRunner fails with the
>> following
>> stack; I'm running with sonar.showSql=true, sonar.showSqlResults=true and
>> sonar.verbose=true.
>>
>> I've seen other people reporting "Unable to save file sources" errors, but
>> with error messages that led to believe it was an encoding issue (we do
>> have
>> mixed encoding files, some files even empty if it matters) which is not
>> our
>> case; I've also seen ArrayIndexOutOfBoundsException error reports, but
>> related to decorators, which is not our case either?
>>
>> Oh and nothing at all shows in our actual sonar server logs; other
>> projects
>> work just fine although all are much smaller (900K LOC vs 360K LOC and
>> 240K
>> LOC)
>>
>> Any ideas on how I can find what is causing the problem?
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233.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
>>
>>
>>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034259.html
>  To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister
> since 5.1, click here
> < > .
> NAML
> <
http://sonarqube.15.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
*Simon Berthiaume*
Build Master | *Acquisio*

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: *http://twitter.com/acquisio <http://twitter.com/acquisio>*
LinkedIn: *http://www.linkedin.com/company/acquisio
<http://www.linkedin.com/company/acquisio>*
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | *www.acquisio.com <http://www.acquisio.com/>*




--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034279.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
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

sberthiaume
We are using ant, but I already started the scan even before you asked. Will keep you posted.


Simon B.

On Mon, Apr 13, 2015 at 9:14 AM, Julien HENRY [via SonarQube] <[hidden email]> wrote:
Then could you please have a look at Cobertura report (by default target/site/cobertura/coverage.xml if you are using Maven) and see if there is this strange value (-32697).

++

Julien

2015-04-13 14:56 GMT+02:00 sberthiaume <[hidden email]>:
Hi, I'm using Cobertura.


Simon B.

On Mon, Apr 13, 2015 at 3:11 AM, Julien HENRY [via SonarQube] <
[hidden email]> wrote:

> Hi,
>
> It seems there is an issue with one of your coverage engine. It seems that
> some coverage was reported at line -32697 for one file. I'll ensure that
> such a bad value is detected earlier with better contextual information for
> future SQ version (https://jira.codehaus.org/browse/SONAR-6200).
> What coverage engine are you using?
>
> ++
>
> Julien
>
> 2015-04-10 1:35 GMT+02:00 sberthiaume <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5034259&i=0>>:

>
>> Hi, I'm having yet another issue; everything worked fine in SonarQube 5.0
>> and
>> 5.0.1, but now that I upgraded to 5.1, SonarRunner fails with the
>> following
>> stack; I'm running with sonar.showSql=true, sonar.showSqlResults=true and
>> sonar.verbose=true.
>>
>> I've seen other people reporting "Unable to save file sources" errors, but
>> with error messages that led to believe it was an encoding issue (we do
>> have
>> mixed encoding files, some files even empty if it matters) which is not
>> our
>> case; I've also seen ArrayIndexOutOfBoundsException error reports, but
>> related to decorators, which is not our case either?
>>
>> Oh and nothing at all shows in our actual sonar server logs; other
>> projects
>> work just fine although all are much smaller (900K LOC vs 360K LOC and
>> 240K
>> LOC)
>>
>> Any ideas on how I can find what is causing the problem?
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233.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
>>
>>
>>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034259.html
>  To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister
> since 5.1, click here
> <
> .
> NAML
> <
http://sonarqube.15.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
*Simon Berthiaume*
Build Master | *Acquisio*

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: *http://twitter.com/acquisio <http://twitter.com/acquisio>*
LinkedIn: *http://www.linkedin.com/company/acquisio
<http://www.linkedin.com/company/acquisio>*
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | *www.acquisio.com <http://www.acquisio.com/>*




--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034279.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






If you reply to this email, your message will be added to the discussion below:
http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034280.html
To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister since 5.1, click here.
NAML



--
Simon Berthiaume
Build Master | Acquisio

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: http://twitter.com/acquisio
LinkedIn: http://www.linkedin.com/company/acquisio
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | www.acquisio.com
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

sberthiaume
In reply to this post by Julien HENRY
I confirm we have negative line numbers (for some reason) in our cobertura reports. Will try to investigate why,


Simon B.

On Mon, Apr 13, 2015 at 9:17 AM, Simon Berthiaume <[hidden email]> wrote:
We are using ant, but I already started the scan even before you asked. Will keep you posted.


Simon B.

On Mon, Apr 13, 2015 at 9:14 AM, Julien HENRY [via SonarQube] <[hidden email]> wrote:
Then could you please have a look at Cobertura report (by default target/site/cobertura/coverage.xml if you are using Maven) and see if there is this strange value (-32697).

++

Julien

2015-04-13 14:56 GMT+02:00 sberthiaume <[hidden email]>:
Hi, I'm using Cobertura.


Simon B.

On Mon, Apr 13, 2015 at 3:11 AM, Julien HENRY [via SonarQube] <
[hidden email]> wrote:

> Hi,
>
> It seems there is an issue with one of your coverage engine. It seems that
> some coverage was reported at line -32697 for one file. I'll ensure that
> such a bad value is detected earlier with better contextual information for
> future SQ version (https://jira.codehaus.org/browse/SONAR-6200).
> What coverage engine are you using?
>
> ++
>
> Julien
>
> 2015-04-10 1:35 GMT+02:00 sberthiaume <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5034259&i=0>>:

>
>> Hi, I'm having yet another issue; everything worked fine in SonarQube 5.0
>> and
>> 5.0.1, but now that I upgraded to 5.1, SonarRunner fails with the
>> following
>> stack; I'm running with sonar.showSql=true, sonar.showSqlResults=true and
>> sonar.verbose=true.
>>
>> I've seen other people reporting "Unable to save file sources" errors, but
>> with error messages that led to believe it was an encoding issue (we do
>> have
>> mixed encoding files, some files even empty if it matters) which is not
>> our
>> case; I've also seen ArrayIndexOutOfBoundsException error reports, but
>> related to decorators, which is not our case either?
>>
>> Oh and nothing at all shows in our actual sonar server logs; other
>> projects
>> work just fine although all are much smaller (900K LOC vs 360K LOC and
>> 240K
>> LOC)
>>
>> Any ideas on how I can find what is causing the problem?
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233.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
>>
>>
>>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034259.html
>  To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister
> since 5.1, click here
> <
> .
> NAML
> <
http://sonarqube.15.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
*Simon Berthiaume*
Build Master | *Acquisio*

Tel: <a href="tel:450.465.2631%20ext.%20230" value="+14504652631" target="_blank">450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: *http://twitter.com/acquisio <http://twitter.com/acquisio>*
LinkedIn: *http://www.linkedin.com/company/acquisio
<http://www.linkedin.com/company/acquisio>*
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: <a href="tel:1.866.493.9070" value="+18664939070" target="_blank">1.866.493.9070 | *www.acquisio.com <http://www.acquisio.com/>*




--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034279.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






If you reply to this email, your message will be added to the discussion below:
http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034280.html
To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister since 5.1, click here.
NAML



--
Simon Berthiaume
Build Master | Acquisio

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: http://twitter.com/acquisio
LinkedIn: http://www.linkedin.com/company/acquisio
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | www.acquisio.com



--
Simon Berthiaume
Build Master | Acquisio

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: http://twitter.com/acquisio
LinkedIn: http://www.linkedin.com/company/acquisio
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | www.acquisio.com
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

sberthiaume
In reply to this post by Julien HENRY
It seems it could be a Cobertura bug with very large class files (in our case, 45K+ LOC); I will try to update our cobertura lib and see if it solves our issue.

In the meantime, it might be good to have a more significant error message and/or at least report during which file processing the problem occurred.


Simon B.

On Mon, Apr 13, 2015 at 9:31 AM, Simon Berthiaume <[hidden email]> wrote:
I confirm we have negative line numbers (for some reason) in our cobertura reports. Will try to investigate why,


Simon B.

On Mon, Apr 13, 2015 at 9:17 AM, Simon Berthiaume <[hidden email]> wrote:
We are using ant, but I already started the scan even before you asked. Will keep you posted.


Simon B.

On Mon, Apr 13, 2015 at 9:14 AM, Julien HENRY [via SonarQube] <[hidden email]> wrote:
Then could you please have a look at Cobertura report (by default target/site/cobertura/coverage.xml if you are using Maven) and see if there is this strange value (-32697).

++

Julien

2015-04-13 14:56 GMT+02:00 sberthiaume <[hidden email]>:
Hi, I'm using Cobertura.


Simon B.

On Mon, Apr 13, 2015 at 3:11 AM, Julien HENRY [via SonarQube] <
[hidden email]> wrote:

> Hi,
>
> It seems there is an issue with one of your coverage engine. It seems that
> some coverage was reported at line -32697 for one file. I'll ensure that
> such a bad value is detected earlier with better contextual information for
> future SQ version (https://jira.codehaus.org/browse/SONAR-6200).
> What coverage engine are you using?
>
> ++
>
> Julien
>
> 2015-04-10 1:35 GMT+02:00 sberthiaume <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5034259&i=0>>:

>
>> Hi, I'm having yet another issue; everything worked fine in SonarQube 5.0
>> and
>> 5.0.1, but now that I upgraded to 5.1, SonarRunner fails with the
>> following
>> stack; I'm running with sonar.showSql=true, sonar.showSqlResults=true and
>> sonar.verbose=true.
>>
>> I've seen other people reporting "Unable to save file sources" errors, but
>> with error messages that led to believe it was an encoding issue (we do
>> have
>> mixed encoding files, some files even empty if it matters) which is not
>> our
>> case; I've also seen ArrayIndexOutOfBoundsException error reports, but
>> related to decorators, which is not our case either?
>>
>> Oh and nothing at all shows in our actual sonar server logs; other
>> projects
>> work just fine although all are much smaller (900K LOC vs 360K LOC and
>> 240K
>> LOC)
>>
>> Any ideas on how I can find what is causing the problem?
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233.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
>>
>>
>>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034259.html
>  To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister
> since 5.1, click here
> <
> .
> NAML
> <
http://sonarqube.15.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
*Simon Berthiaume*
Build Master | *Acquisio*

Tel: <a href="tel:450.465.2631%20ext.%20230" value="+14504652631" target="_blank">450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: *http://twitter.com/acquisio <http://twitter.com/acquisio>*
LinkedIn: *http://www.linkedin.com/company/acquisio
<http://www.linkedin.com/company/acquisio>*
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: <a href="tel:1.866.493.9070" value="+18664939070" target="_blank">1.866.493.9070 | *www.acquisio.com <http://www.acquisio.com/>*




--
View this message in context: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034279.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






If you reply to this email, your message will be added to the discussion below:
http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-with-SourcePersister-since-5-1-tp5034233p5034280.html
To unsubscribe from ArrayIndexOutOfBoundsException with SourcePersister since 5.1, click here.
NAML



--
Simon Berthiaume
Build Master | Acquisio

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: http://twitter.com/acquisio
LinkedIn: http://www.linkedin.com/company/acquisio
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | www.acquisio.com



--
Simon Berthiaume
Build Master | Acquisio

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: http://twitter.com/acquisio
LinkedIn: http://www.linkedin.com/company/acquisio
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | www.acquisio.com



--
Simon Berthiaume
Build Master | Acquisio

Tel: 450.465.2631 ext. 230
Email: [hidden email]

Follow Us:
Twitter: http://twitter.com/acquisio
LinkedIn: http://www.linkedin.com/company/acquisio
Facebook: http://www.facebook.com/acquisio

6300 Auteuil, suite 300 | Brossard, Québec J4Z 3P2
Toll Free: 1.866.493.9070 | www.acquisio.com
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

topagae
This post has NOT been accepted by the mailing list yet.
In reply to this post by sberthiaume
I am also having this issue after upgrading to 5.1, but I'm using clover. Have no negative line numbers (as far as I can tell). Still getting an out of bound error with -1

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 3:16.756s
Final Memory: 28M/999M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
        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.runner.Main.executeTask(Main.java:70)
        at org.sonar.runner.Main.execute(Main.java:59)
        at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Unable to save file sources
        at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:84)
        at org.sonar.batch.phases.DatabaseModePhaseExecutor.executePersisters(DatabaseModePhaseExecutor.java:165)
        at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:133)
        at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
        at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
        at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
        at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
        at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
        at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
        at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
        ... 9 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
        at java.util.ArrayList.elementData(ArrayList.java:400)
        at java.util.ArrayList.get(ArrayList.java:413)
        at com.google.protobuf.RepeatedFieldBuilder.getBuilder(RepeatedFieldBuilder.java:245)
        at org.sonar.server.source.db.FileSourceDb$Data$Builder.getLinesBuilder(FileSourceDb.java:2911)
        at org.sonar.batch.index.SourceDataFactory.applyLineMeasure(SourceDataFactory.java:183)
        at org.sonar.batch.index.SourceDataFactory.applyLineMeasures(SourceDataFactory.java:117)
        at org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76)
        at org.sonar.batch.index.SourcePersister.computeData(SourcePersister.java:152)
        at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:93)
        at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81)
        ... 33 more
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException with SourcePersister since 5.1

breako
This post has NOT been accepted by the mailing list yet.
Yeah I saw something similar with -1.  I looked at the coverage.xml and saw one file it was saying it had a linenumber 0, so I just removed this from analysis by doing:


coverage {
    xml = true
    exclusions = [
        "**/com/myfile*"
    ]
}