[sonar-dev] java 2.9.1 / sonar 5.0: Can not add the same measure twice on org.sonar.api.resources.File....

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

[sonar-dev] java 2.9.1 / sonar 5.0: Can not add the same measure twice on org.sonar.api.resources.File....

SB
Hi,
 
after upgrading to 5.0 I receive errors like this one below. Anyone got an idea what could be the problem ?
 
Thanks,
 
Steve.
 
[16:00:07]W:         [:sonarRunner] ERROR: Caused by:
Can not add the same measure twice on org.sonar.api.resources.File@3a784bb6
[key=src/main/java/LoggingTester.java,deprecatedKey=[default].LoggingTester,
path=src/main/java/LoggingTester.java,dir=[root],filename=LoggingTester.java,language=Java]:
org.sonar.api.measures.Measure@2fb2b7b7[metricKey=classes,metric=Metric[
id=6,key=classes,description=Classes,type=INT,direction=-1,domain=<null>,name=classes,
qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,
optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,
description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,
variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,
characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL,fromCore=false]

 
SB
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] java 2.9.1 / sonar 5.0: Can not add the same measure twice on org.sonar.api.resources.File....

SB
 
After parsing all the logs it looks like the sub-project is being analyzed a second time (???)
 
So the ERROR is ok, but I still have to find why gradle/sonar runner is doing this twice...
 
SB <[hidden email]> hat am 16. Februar 2015 um 16:20 geschrieben:

Hi,
 
after upgrading to 5.0 I receive errors like this one below. Anyone got an idea what could be the problem ?
 
Thanks,
 
Steve.
 
[16:00:07]W:         [:sonarRunner] ERROR: Caused by:
Can not add the same measure twice on org.sonar.api.resources.File@3a784bb6
[key=src/main/java/LoggingTester.java,deprecatedKey=[default].LoggingTester,
path=src/main/java/LoggingTester.java,dir=[root],filename=LoggingTester.java,language=Java]:
org.sonar.api.measures.Measure@2fb2b7b7[metricKey=classes,metric=Metric[
id=6,key=classes,description=Classes,type=INT,direction=-1,domain=<null>,name=classes,
qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,
optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,
description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,
variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,
characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL,fromCore=false]
 

 
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] java 2.9.1 / sonar 5.0: Can not add the same measure twice on org.sonar.api.resources.File....

Simon Brandhof
Hi Steve,

Please provide more informations about your environment.

Thanks


Simon BRANDHOF | SonarSource
http://twitter.com/SimonBrandhof

On 16 February 2015 at 17:03, SB <[hidden email]> wrote:
 
After parsing all the logs it looks like the sub-project is being analyzed a second time (???)
 
So the ERROR is ok, but I still have to find why gradle/sonar runner is doing this twice...
 
SB <[hidden email]> hat am 16. Februar 2015 um 16:20 geschrieben:

Hi,
 
after upgrading to 5.0 I receive errors like this one below. Anyone got an idea what could be the problem ?
 
Thanks,
 
Steve.
 
[16:00:07]W:         [:sonarRunner] ERROR: Caused by:
Can not add the same measure twice on org.sonar.api.resources.File@3a784bb6
[key=src/main/java/LoggingTester.java,deprecatedKey=[default].LoggingTester,
path=src/main/java/LoggingTester.java,dir=[root],filename=LoggingTester.java,language=Java]:
org.sonar.api.measures.Measure@2fb2b7b7[metricKey=classes,metric=Metric[
id=6,key=classes,description=Classes,type=INT,direction=-1,domain=<null>,name=classes,
qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,
optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,
description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,
variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,
characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL,fromCore=false]
 

 

SB
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] java 2.9.1 / sonar 5.0: Can not add the same measure twice on org.sonar.api.resources.File....

SB
In reply to this post by SB
 
Hi,
 
we are using:
- gradle 2.2.1 and gradle 2.3 (tested both, no difference)
- SonarQube Runner 2.4 (tested also 2.3,no difference)
- SonarQube 5.0 with MSSQL (separate server via jDTS) on Windows Server 2012 6.2 amd64, JDK 1.8
- analysis on Windows Server 2012 6.2 amd64
- Java 1.7.0_45 Oracle Corporation (64-bit)
- Sonar Java Plugin 2.9.1 (all plugins are up-to-date as of yesterday)
- same codebase worked with 4.5.2
 
 I uploaded parts of the log file to
     http://pastebin.com/vYDkKBwF
 It scans the project at 08:24:11 and then a few seconds later at 08:24:13. The only differences are the instance numbers in
     org.sonar.batch.languages.Language@29881187
 
Steve
 
 
Simon Brandhof <[hidden email]> hat am 16. Februar 2015 um 20:13 geschrieben:

Hi Steve,
 
Please provide more informations about your environment.
 
Thanks

 
Simon BRANDHOF | SonarSource
http://twitter.com/SimonBrandhof

On 16 February 2015 at 17:03, SB <[hidden email]> wrote:
 
After parsing all the logs it looks like the sub-project is being analyzed a second time (???)
 
So the ERROR is ok, but I still have to find why gradle/sonar runner is doing this twice...
 
SB < [hidden email]> hat am 16. Februar 2015 um 16:20 geschrieben:

Hi,
 
after upgrading to 5.0 I receive errors like this one below. Anyone got an idea what could be the problem ?
 
Thanks,
 
Steve.
 
[16:00:07]W: [:sonarRunner] ERROR: Caused by:
Can not add the same measure twice on org.sonar.api.resources.File@3a784bb6
[key=src/main/java/LoggingTester.java,deprecatedKey=[default].LoggingTester,
path=src/main/java/LoggingTester.java,dir=[root],filename=LoggingTester.java,language=Java]:
org.sonar.api.measures.Measure@2fb2b7b7[metricKey=classes,metric=Metric[
id=6,key=classes,description=Classes,type=INT,direction=-1,domain=<null>,name=classes,
qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,
optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,
description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,
variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,
characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL,fromCore=false]
 
 

 
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] java 2.9.1 / sonar 5.0: Can not add the same measure twice on org.sonar.api.resources.File....

Simon Brandhof

 It scans the project at 08:24:11 and then a few seconds later at 08:24:13. The only differences are the instance numbers in
     org.sonar.batch.languages.Language@29881187


That is the problem. The module is analyzed twice in the project. That's not allowed as it could feed different values to the same measure. You should check your gradle configuration. 
SB
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] java 2.9.1 / sonar 5.0: Can not add the same measure twice on org.sonar.api.resources.File....

SB
 
Thanks, I forwarded the problem to the gradle team:
    http://forums.gradle.org/gradle/topics/sonar-runner-same-project-analyzed-twice-causing-sonar-exception-can-not-add-the-same-measure-twice?rfm=1
 
Simon Brandhof <[hidden email]> hat am 18. Februar 2015 um 09:40 geschrieben:


It scans the project at 08:24:11 and then a few seconds later at 08:24:13. The only differences are the instance numbers in
org.sonar.batch.languages.Language@29881187
 
 
That is the problem. The module is analyzed twice in the project. That's not allowed as it could feed different values to the same measure. You should check your gradle configuration.