Sonar.java.binaries properties should be written for all Projects

java
sonarqube

(Nagashree B) #1

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

SonarQube 6.7.5V (newly upgraded to this version)

  • what are you trying to achieve
    Project analysis is failing with below error
    INFO: Load server rules (done) | time=316ms
    INFO: Base dir: /ci/jenkins/jobs/GetMember_SVN_SonarQube_Scan_Test/workspace
    INFO: Working dir: /ci/jenkins/jobs/GetMember_SVN_SonarQube_Scan_Test/workspace/.sonar
    INFO: Source paths: .
    INFO: Source encoding: UTF-8, default locale: en_US
    INFO: Index files
    INFO: 268 files indexed
    INFO: Quality profile for java: Sonar way
    INFO: Quality profile for xml: Sonar way
    INFO: Sensor JavaSquidSensor [java]
    INFO: Configured Java source version (sonar.java.source): none
    INFO: JavaClasspath initialization
    INFO: ------------------------------------------------------------------------
    INFO: EXECUTION FAILURE
    INFO: ------------------------------------------------------------------------
    INFO: Total time: 3.760s
    INFO: Final Memory: 57M/730M
    INFO: ------------------------------------------------------------------------
    ERROR: Error during SonarQube Scanner execution
    org.sonar.java.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property
    at org.sonar.java.JavaClasspath.init(JavaClasspath.java:57)
    at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:280)
    at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:190)
    at org.sonar.java.JavaSquid.(JavaSquid.java:85)
    at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:92)
    at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
    at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
    at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
    at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
    at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
    at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
    at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
    at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
    at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
    at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
    at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
    at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
    at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    at com.sun.proxy.$Proxy0.execute(Unknown Source)
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
    at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
    at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
    at org.sonarsource.scanner.cli.Main.main(Main.java:61)
    ERROR:
    ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
    ERROR: SonarQube scanner exited with non-zero code: 1
    Previous steps failed the build.
    Result is: FAILURE
    Build step ‘Quality Gates Sonarqube Plugin’ marked build as failure
    Started calculate disk usage of build
    Finished Calculation of disk usage of build in 0 seconds
    Started calculate disk usage of workspace
    Finished Calculation of disk usage of workspace in 0 seconds
    Email was triggered for: Failure - Any
    Sending email for trigger: Failure - Any
    Sending email to: ***********
    Finished: FAILURE

  • what have you tried so far to achieve this

we have made changes to our sonar-project.properties files with sonar.java.binaries as * & sonar.java.version as 1.8

But our sonarJava Plugin & scanner should be able to find out the binaries path right ?

Please help us on this issue as we have lots of projects designed & we may have to edit everywhere for this .Please assist us on this…

Thanks,
Nagashree


(Nagashree B) #2

sonar-java-plugin-5.7.0.15470.jar <- version of sonarJava plugin.
sonar-scanner-engine-shaded-6.7.5.jar <-scanner plugin.

Thanks,
Nagashree


(Nagashree B) #3

Hi Nicholas/Alex,
I have cleared these error with java plugin given in our bundle.But facing a new issue now.I have uploaded the bundled plugins in /extension/plugins folder .But our project needs pl/sql plugins(which is not provided in the bundled-plugin for community edition).I tried to download a compatible version from documentation but facing the below issue .I downloaded both the below plugins
image

the error is as below:

As per the Marketplace,it says the pl/sql is available in commercial edition.Please let us know any way to install pl/sql for our project in commercial edition to work.

Thanks,
Nagashree.B.


(G Ann Campbell) #4

Hi Nagashree,

As you’ve discovered, the analysis of PL/SQL is a commercial feature that’s available in Developer Edition and above. There’s a form on this page that you’ll need to fill out to get started: https://www.sonarsource.com/plans-and-pricing/developer/

 
Ann


(Nagashree B) #5

Hi Ann,

we are just interested in PL/SQL plugin only.All other plugins in 6.7.5v are working fine for us.Is it possible to get license for only this plugin?If yes,please let us know what is the price & how to proceed with the procedure of getting it done…Kindly let us know on the same…

Thanks,
Nagashree


(G Ann Campbell) #6

Hi Nagashree,

No.

 
Ann


(Nagashree B) #7

Hi Ann,

So,please suggest us on how to get the only plugin in the version6.7.5…
Thanks,
nagashree


(G Ann Campbell) #8

Hi Nagashree,

Still not possible.

 
Ann


(Nagashree B) #9

Hi Ann,

So,do we need to upgrade to any other editions for the plugin?

DO we have PL/SQL plugin available in version7+ in community editons?

Thanks,
Nagashree


(G Ann Campbell) #10

I don’t know how I can say this any more plainly. So I’ll just repeat what I said earlier and add some emphasis:

That means it’s not available in the Community Edition in any version. You can’t get it for free. You must buy at least the Developer Edition. Period.

 
Ann


(Nagashree B) #11

Hi Ann,

Thank you for explaining it …we will decide with the Management on the same & do we have to fill any form for the license buying .Please let me know the details on how to go about it…

Thanks,
nagashree


(Nagashree B) #12

Hi Ann,

we have two instances of sonarQube(Sandbox & UAT) ,so do we need to buy two licenses for each server ID or the server ID will be same ?

Thanks,
Nagashree


(G Ann Campbell) #13

As I said before:

 


(Nagashree B) #14

Please suggest us on this situation too…

Thanks,
nagashree