Issue with Sonarqube upgade with 6.4 version

845 views
Skip to first unread message

Deepthi Chowdary

unread,
Oct 17, 2017, 7:39:24 PM10/17/17
to SonarQube
Hi All,

we recently updated the SonarQube version to  6.4 at the time of running sonar scan getting  with bellow error.

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project DeployTestApp: Please provide compiled classes of your project with sonar.java.binaries property -> [Help 1]
 [ERROR] 

Please guide on this issue. 

Thanks in Advance ! 

G. Ann Campbell

unread,
Oct 18, 2017, 8:44:42 AM10/18/17
to SonarQube
Hi,

This is related not to server upgrade itself but to the version of SonarJava bundled with it. Since SonarJava 4.12, bytecode is required for analysis. You can pass in the location using the sonar.java.binaries property.


Ann

Deepthi Chowdary

unread,
Oct 18, 2017, 10:02:11 AM10/18/17
to SonarQube
Hi Ann,

Thanks a lot for update . Can you please let me know where I need to pass sonar.java.binaries property?

its it in sonar.properties file or some where else ? please guide on this .

Regards,
Deepthi

G. Ann Campbell

unread,
Oct 18, 2017, 10:06:12 AM10/18/17
to Deepthi Chowdary, SonarQube
Hi, 

If you're using sonar-project.properties, then yes, add it there.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/86SvtB9JoXE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/140f4438-0118-404d-bac9-fa22a8c46ed9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Deepthi Chowdary

unread,
Oct 18, 2017, 10:16:16 AM10/18/17
to SonarQube
where can I find the location of sonar.java.binaries property
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

G. Ann Campbell

unread,
Oct 18, 2017, 10:23:50 AM10/18/17
to Deepthi Chowdary, SonarQube
Hi,

Uhm... are you asking what value you should use? If so, the answer is the path to your class files.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/d444a4a4-5c40-4656-ba0a-40f0f2f86456%40googlegroups.com.

Deepthi Chowdary

unread,
Oct 18, 2017, 11:34:26 AM10/18/17
to SonarQube
I am using maven and I have different module on it .So I am a bit confused how to use the call path .

G. Ann Campbell

unread,
Oct 18, 2017, 12:25:46 PM10/18/17
to Deepthi Chowdary, SonarQube
Hi,

Take a look at the docs for details on how to configure this.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/4c6f3735-739d-4090-985c-fe4f19881c81%40googlegroups.com.

Deepthi Chowdary

unread,
Oct 26, 2017, 5:25:31 PM10/26/17
to SonarQube
Hi Ann,

I tried all the steps in doc still no luck . below is the error what I am getting
Please guide on this .

error console.


command line: /opt/anthill3/apache-maven-3.2.5/bin/mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar -DbuildLifeId=307545 -DpwProj=${property:pwxsvnBatch} -DCxScanIgnore=***** -DPRODUCT_NAME=Anthill -DParentProject=DeployTestApp -DCxScanStatus=failed
 command work dir: /temp/anthill/build/DeployTestApp/DeployTestApp
 command environment:
 USER=anthilltest
 PRODUCT_NAME=Anthill
 ParentProject=DeployTestApp
 SSH_CONNECTION=10.80.16.209 51872 10.84.176.107 22
 QTINC=/usr/lib64/qt-3.3/include
 AH_JOB_ID=4739924
 AH_PROJECT_ID=1771
 pwProj=${property:pwxsvnBatch}
 AH_AUTH_TOKEN=*****
 OLDPWD=/opt/anthill3/ah3MavenBuild_1.8New/bin
 BASH_FUNC_module()=() { eval `/usr/bin/modulecmd bash $*`
 }
 LS_COLORS=no=00:fi=00:di=00;35:ln=00;36:pi=40;33:so=00;34:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
 XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
 HISTSIZE=2000
 HOME=/home/anthilltest
 AH_REMOTE_HOST=dlpvcss001
 LOADEDMODULES=
 JAVA_HOME=/opt/anthill3/jdk1.8.0_73/
 QTLIB=/usr/lib64/qt-3.3/lib
 HISTFILE=/var/histfile/anthilltest.171011.1109
 MAVEN_HOME=/opt/anthill3/apache-maven-3.2.5
 TMOUT=1800
 MODULESHOME=/usr/share/Modules
 SSH_CLIENT=10.80.16.209 51872 22
 SSH_TTY=/dev/pts/0
 MAIL=/var/spool/mail/anthilltest
 ANT_HOME=/opt/anthill3/ah3MavenBuild_1.8New/opt/apache-ant-1.8.4
 HISTFILESIZE=10000
 _=/opt/anthill3/jdk1.8.0_73//bin/java
 LOGNAME=anthilltest
 CVS_RSH=ssh
 AH_REMOTE_PORT=4567
 HISTTIMEFORMAT=%Y/%m/%d %T
 AH_PROFILE_ID=3552
 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
 FISHEYE_HOME=/opt/fish-eye/fecru-3.10.2
 CxScanIgnore=****
 FISHEYE_INST=/opt/fish-eye/feInst
 SHLVL=2
 SHELL=/bin/bash
 PATH=/opt/anthill3/jdk1.8.0_73/bin:/usr/lib64/qt-3.3/bin:/opt/CollabNet_Subversion:/opt/Python-3.0.1:/usr/local/bin:/bin:/usr/bin:/home/anthilltest/bin:/opt/anthill3/apache-maven-3.2.5/bin:/opt/fish-eye/fecru-3.10.2/bin:/opt/CollabNet_Subversion/bin/:/opt/anthill3/ah3MavenBuild_1.8New/bin:/opt/anthill3/jdk1.8.0_112/bin
 M2_HOME=/opt/anthill3/apache-maven-3.2.5
 M2=/opt/anthill3/apache-maven-3.2.5/bin
 NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
 QTDIR=/usr/lib64/qt-3.3
 AH_WORKFLOW_ID=7367
 TERM=xterm
 LANG=en_US.UTF-8
 INPUTRC=/etc/inputrc
 G_BROKEN_FILENAMES=1
 AH_REQUEST_ID=1042258
 MAVEN_OPTS=-Xms256m -Xmx512m
 GROOVY_HOME=/opt/anthill3/ah3MavenBuild_1.8New/opt/groovy-1.8.8
 MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
 AH_BUILD_LIFE_ID=307545
 PWD=/opt/anthill3/ah3MavenBuild_1.8New/bin
 CxScanStatus=failed
 AGENT_HOME=/opt/anthill3/ah3MavenBuild_1.8New
 LESSOPEN=||/usr/bin/lesspipe.sh %s
 [INFO] Scanning for projects...
 [INFO] ------------------------------------------------------------------------
 [INFO] Reactor Build Order:
 [INFO]
 [INFO] DeployTestApp
 [INFO] DeployTestAppServices
 [INFO] DeployTestAppWeb
 [INFO] DeployTestAppEAR
 [INFO] DeployTestAppProperties
 [INFO]
 [INFO] ------------------------------------------------------------------------
 [INFO] Building DeployTestApp 1.0.88-SNAPSHOT
 [INFO] ------------------------------------------------------------------------
 [WARNING] The POM for log4j:log4j:jar:1.2.14 is missing, no dependency information available
 [WARNING] The POM for commons-beanutils:commons-beanutils:jar:1.6 is missing, no dependency information available
 [WARNING] The POM for commons-collections:commons-collections:jar:2.1 is missing, no dependency information available
 [WARNING] The POM for commons-digester:commons-digester:jar:1.7 is missing, no dependency information available
 [WARNING] The artifact xml-apis:xml-apis:pom:2.0.2 has been relocated to xml-apis:xml-apis:pom:1.0.b2
 [WARNING] The artifact xml-apis:xml-apis:pom:2.0.2 has been relocated to xml-apis:xml-apis:pom:1.0.b2
 [WARNING] The artifact xml-apis:xml-apis:pom:2.0.2 has been relocated to xml-apis:xml-apis:pom:1.0.b2
 [WARNING] The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:
 [WARNING] o DeployTest:DeployTestAppServices:jar:1.0.88-SNAPSHOT (compile)
 [WARNING] Try running the build up to the lifecycle phase "package"
 [WARNING] The artifact xml-apis:xml-apis:pom:2.0.2 has been relocated to xml-apis:xml-apis:pom:1.0.b2
 [WARNING] The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:
 [WARNING] o DeployTest:DeployTestAppWeb:war:1.0.88-SNAPSHOT (compile)
 [WARNING] o DeployTest:DeployTestAppServices:jar:1.0.88-SNAPSHOT (compile)
 [WARNING] Try running the build up to the lifecycle phase "package"
 [WARNING] The artifact xml-apis:xml-apis:pom:2.0.2 has been relocated to xml-apis:xml-apis:pom:1.0.b2
 [INFO]
 [INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ DeployTestApp ---
 [INFO] User cache: /home/anthilltest/.sonar/cache
 [INFO] Load global settings
 [INFO] Load global settings (done) | time=128ms
 [WARNING] Property 'sonar.jdbc.url' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
 [WARNING] Property 'sonar.jdbc.username' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
 [WARNING] Property 'sonar.jdbc.password' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
 [INFO] User cache: /home/anthilltest/.sonar/cache
 [INFO] Load plugins index
 [INFO] Load plugins index (done) | time=18ms
 [INFO] SonarQube version: 6.4.0
 [WARNING] Missing POM for log4j:log4j:jar:1.2.14
 [WARNING] Missing POM for commons-digester:commons-digester:jar:1.7
 [INFO] Module MavenProject: DeployTest:DeployTestAppWeb:1.0.88-SNAPSHOT @ /temp/anthill/build/DeployTestApp/DeployTestApp/DeployTestAppWeb/pom.xml skipped by property 'sonar.skip'
 [INFO] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
 [INFO] Process project properties
 [INFO] Load project repositories
 [INFO] Load project repositories (done) | time=133ms
 [INFO] Load quality profiles
 [INFO] Load quality profiles (done) | time=60ms
 [INFO] Load active rules
 [INFO] Load active rules (done) | time=288ms
 [INFO] Load metrics repository
 [INFO] Load metrics repository (done) | time=94ms
 [INFO] Publish mode
 [INFO] Project key: DeployTest:DeployTestApp
 [INFO] ------------- Scan DeployTestAppEAR
 [INFO] Load server rules
 [INFO] Load server rules (done) | time=137ms
 [INFO] Initializer GenericCoverageSensor
 [INFO] Initializer GenericCoverageSensor (done) | time=0ms
 [INFO] Base dir: /temp/anthill/build/DeployTestApp/DeployTestApp/DeployTestAppEAR
 [INFO] Working dir: /temp/anthill/build/DeployTestApp/DeployTestApp/DeployTestAppEAR/target/sonar
 [INFO] Source paths: pom.xml
 [INFO] Test paths: src/test/java
 [INFO] Source encoding: UTF-8, default locale: en_US
 [INFO] Index files
 [INFO] Excluded sources:
 [INFO] **/*_Stub.java
 [INFO] **/*_Tie.java
 [INFO] **/EJS*_*.java
 [INFO] 1 file indexed
 [INFO] 0 files ignored because of inclusion/exclusion patterns
 [INFO] Sensor SonarJavaXmlFileSensor [java]
 [INFO] 1 source files to be analyzed
 [INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=440ms
 [INFO] 1/1 source files have been analyzed
 [INFO] ------------- Scan DeployTestAppServices
 [INFO] Initializer GenericCoverageSensor
 [INFO] Initializer GenericCoverageSensor (done) | time=0ms
 [INFO] Base dir: /temp/anthill/build/DeployTestApp/DeployTestApp/DeployTestAppServices
 [INFO] Working dir: /temp/anthill/build/DeployTestApp/DeployTestApp/DeployTestAppServices/target/sonar
 [INFO] Source paths: pom.xml, src/main/java
 [INFO] Test paths: src/test/java
 [INFO] Source encoding: UTF-8, default locale: en_US
 [INFO] Index files
 [INFO] Excluded sources:
 [INFO] **/*_Stub.java
 [INFO] **/*_Tie.java
 [INFO] **/EJS*_*.java
 [INFO] 39 files indexed
 [INFO] 0 files ignored because of inclusion/exclusion patterns
 [INFO] Quality profile for java: Sonar way
 [INFO] Sensor JavaSquidSensor [java]
 [INFO] Configured Java source version (sonar.java.source): 8
 [INFO] JavaClasspath initialization
 [ERROR] Invalid value for sonar.java.binaries
 [INFO] ------------------------------------------------------------------------
 [INFO] Reactor Summary:
 [INFO]
 [INFO] DeployTestApp ...................................... FAILURE [ 5.302 s]
 [INFO] DeployTestAppServices .............................. SKIPPED
 [INFO] DeployTestAppWeb ................................... SKIPPED
 [INFO] DeployTestAppEAR ................................... SKIPPED
 [INFO] DeployTestAppProperties ............................ SKIPPED
 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD FAILURE
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 5.541 s
 [INFO] Finished at: 2017-10-26T13:58:24-05:00
 [INFO] Final Memory: 54M/390M
 [INFO] ------------------------------------------------------------------------
 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project DeployTestApp: No files nor directories matching '${project.build.dir}/classes/main' -> [Help 1]
 [ERROR]
 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 [ERROR]
 [ERROR] For more information about the errors and possible solutions, please read the following articles:
 command exit code: 1

G. Ann Campbell

unread,
Oct 27, 2017, 7:31:18 AM10/27/17
to Deepthi Chowdary, SonarQube
Hi,

Your error is "No files nor directories matching '${project.build.dir}/classes/main".

So... are you explicitly providing the value of sonar.java.binaries, either in a pom property or on the command line, or are you relying on Maven to find it automatically? If the former, what value are you sending in, and what's the path from project root to your binaries?


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/06c83749-2831-448b-b220-05e820e70173%40googlegroups.com.

Deepthi Chowdary

unread,
Oct 30, 2017, 5:31:46 PM10/30/17
to SonarQube
Yes , I added below type of tag in my parent pom.xml file. in <properties> tag.

  <sonar.java.binaries>${project.build.dir}/classes/main</sonar.java.binaries>

Regards,
Deepthi

G. Ann Campbell

unread,
Oct 31, 2017, 7:33:12 AM10/31/17
to Deepthi Chowdary, SonarQube
Hi Deepthi,

It looks like you've done what you should. At this point I can only suggest you turn on debug logging with the -X switch and see if you can figure out how the path is getting pointed to the wrong place.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e5a8673d-1e81-4289-a121-a48a29f1b296%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages