0

I get the following erro when running sonar:

[11:32:40]: [:sonarTask] 11:32:40.862 [QUIET] [system.out] INFO: EXECUTION FAILURE
[11:32:40]: [:sonarTask] 11:32:40.862 [QUIET] [system.out] INFO: ------------------------------------------------------------------------
[11:32:40]: [:sonarTask] 11:32:40.862 [QUIET] [system.out] Total time: 1.031s
[11:32:40]: [:sonarTask] 11:32:40.956 [QUIET] [system.out] Final Memory: 1M/15M
[11:32:40]: [:sonarTask] 11:32:40.956 [QUIET] [system.out] INFO: ------------------------------------------------------------------------
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Error during Sonar runner execution
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Unable to execute Sonar
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Caused by: The plugin python is not supported with Java 1.6.0_21
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Caused by: org/sonar/plugins/python/PythonPlugin : Unsupported major.minor version 51.0
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: 
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
[11:32:41]: [:sonarTask] 11:32:41.096 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED

It has failed because java 1.6 is not compatible with the python plugin, but I need to keep this. My java source is 1.6 and it has to be this.

In my sonar properties I have the following:

sonar.java.source=1.6
sonar.java.target=1.6

What changes will I have to make? Change java target to 1.7? Is java target the java version used when running sonar?

user3809938
  • 1,114
  • 3
  • 16
  • 35

1 Answers1

1

You can still analyze code compiled with 1.6, but you'll have to use Java 7 or higher to run your analysis process.

Your properties are correct. Just upgrade the version of Java you run the analyzer with.

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76