0
votes

I'm having problems after an upgrade of my Sonar Qube :(

I installed the newest version (5.0) of Sonar Qube using an existing MySQL database. The previous Sonar Qube version was 3.7.4.

I'm using it to analyze a pure ActionScript project using the Flex plugin (Version 2.1).

The problems to me seem threefold:

  • Just starting the server and viewing previous analysis results I get gray rects where code quality used to be indicated in shades of green etc. After installing the Flex plugin using the Update Center this remains.
  • Running the sonar-runner (version 2.4) I get two types of errors:

A whole lot of these: 23:35:01.572 DEBUG - Resource org.sonar.api.resources.Directory@46815882[key=path/to/folder] was found using deprecated key. Please update your plugin.

After which the analysis exits with this:

23:35:01.585 INFO - Sensor FlexSquidSensor done: 4508 ms 23:35:01.585 INFO - Sensor org.sonar.plugins.flex.cobertura.CoberturaSensor@1f96a21e... 23:35:01.585 INFO - No Cobertura report provided (see 'sonar.flex.cobertura.reportPath' property) 23:35:01.585 INFO - Sensor org.sonar.plugins.flex.cobertura.CoberturaSensor@1f96a21e done: 0 ms 23:35:01.585 INFO - Sensor SCM Sensor (wrapped)... 23:35:01.612 INFO - SCM provider for this project is: git 23:35:01.612 INFO - Retrieve SCM blame information... 23:35:01.615 INFO - 280 files to be analyzed 23:35:04.012 DEBUG - Updating semaphore batch-nl.manno:Earz 23:35:04.447 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@4aa0b07b[id=60,key=nl.manno:Earz,qualifier=TRK], with key batch-nl.manno:Earz INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 14.293s Final Memory: 15M/123M 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.IllegalArgumentException: Expected one blame result per line but provider returned 3 blame lines while file src/nl/aloft/earz/core/modules/interval/Interval.as has 76 lines at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) at org.sonar.batch.scm.DefaultBlameOutput.blameResult(DefaultBlameOutput.java:68) at org.sonar.plugins.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:131) at org.sonar.plugins.scm.git.JGitBlameCommand.access$000(JGitBlameCommand.java:44) at org.sonar.plugins.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:105) at org.sonar.plugins.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:102) 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:695) logout

Now I used to have more plugins installed than just Flex (including the mentioned Cobertura) but after installing those Sonar Qube fails to run at all without too much notification (needless to say the runner won't run either).

Can anyone shed some light on this?

Thanks in advance, Manno

1

1 Answers

2
votes

We already faced this issue with files having old Mac line ends (CR or \r). Git will not consider them as line ends so you end up having less lines in your blame than in your file. You can "clean" your file using mac2unix utility.