Comments (13)
I had the same issue with SonarQube 5.6.1 LTS and sonar-findbugs-plugin-3.4.3.jar.
I fixed it by using the latest sonar-findbugs-plugin-3.4.4.jar (I installed it manually because this version is not yet available in the Update center)
from sonar-findbugs.
This will be fixed by #148
Temporarily you can run :
- Run
mvn findbugs:findbugs
- Run
mvn sonar:sonar [...]
Make sure that plugins use in Sonar-FindBugs is also configured in your Maven configuration.
Long-term plan
A new configuration to disable compiled code check will be added in 1 or 2 release.
from sonar-findbugs.
For me it helped to upgrade the sonarqube plugin in gradle to 2.2.1.
plugins {
id "org.sonarqube" version "2.2.1"
}
from sonar-findbugs.
I'm not familiar with sonar-scanner. I think it is unable to find the build directory.
From what I can see in the documentation, it seems like manual configuration are required by sonar-scanner.
I would try specifying the following variable:
sonar.java.binaries=[YOUR_BUILD_DIR] (target/classes)
from sonar-findbugs.
Let me know if the addition of the property does fix your problem.
I notice that this approach did work for somebody else:
http://stackoverflow.com/questions/39102924/can-not-execute-findbugs-caused-by-this-project-contains-java-source-files-that
from sonar-findbugs.
I have the same issue, what is really weird is that previously it was acting like if there was no rules comming from the findbugs repository then findbugs wasn't executed (could somebody confirm?)
Now for a project i can't get the compiled code, what to do to have the analysis not failing?
upgrade to 3.4.3 was required for us due to migration to SQ 5.6.1
from sonar-findbugs.
I have same issue right now.
I tried to compile the code, and tried to add
sonar.java.binaries=test/**/target/classes
But it seems it doesn't work.
The project is maven one with multiple modules defined.
from sonar-findbugs.
I'm having the same problem on SonarQube 6.1 with the latest sonar-findbugs-plugin3.4.4.jar
and Sonar-Scanner 2.8. This is the exception I'm receiving in Jenkins:
WARN: Findbugs needs sources to be compiled. Please build project before executing sonar or check the location of compiled classes to make it possible for Findbugs to analyse your project.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 19.522s
INFO: Final Memory: 65M/1105M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Can not execute Findbugs
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:169)
at org.sonar.plugins.findbugs.FindbugsSensor.execute(FindbugsSensor.java:88)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
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)
Caused by: java.lang.IllegalStateException: This project contains Java source files that are not compiled.
at org.sonar.plugins.findbugs.FindbugsConfiguration.getFindbugsProject(FindbugsConfiguration.java:120)
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:119)
... 31 more
@h3xstream Any ideas what might be causing this?
from sonar-findbugs.
I've managed to find the problem. The -Dsonar.sources
was being incorrectly set to /java/jenkins/job/my-job/workspace
. After changing it to /java/jenkins/job/my-job/workspace/.sonar
everything started working.
from sonar-findbugs.
FYI, the sonar.java.binaries assignment only works for me when pointing at the dir containing the intermediary .class files, not at the dir with the final output jar file.
from sonar-findbugs.
This bug also hit me.
Actual system SonarQube 5.6.6
- Web 2.5.0.476
- SonarJava 4.15.0.12310
- Findbugs 3.6.0
Recent updates of sonarqube plugins cause a build failure in our Jenkins CI system.
We run sonar as part of maven build using sonar maven plugin with sonar:sonar goal, so I suppose all properties are setup in the correct way. There is a maven module with just web.xml and a couple of JSPs files (like login.jsp). These jsp are not pre-compiled (and we don't want).
Before the plugin update all works.
[INFO] ------------- Scan acme.model.admin.ui.web master
[INFO] Excluded sources for coverage:
[INFO] test/**
[INFO] **/*NLS.java
[INFO] **/*DTO.java
[INFO] **/*Dto.java
[INFO] **/*Bean.java
[INFO] **/*Constants.java
[INFO] **/*Consts.java
[INFO] Base dir: /var/lib/jenkins/workspace/acme_master-AZ5ORYFOO25DAUG767DB32IPS36JL64GOEK6QCFL6266VKWQXSCQ/bundles/acme.model.admin.ui.web
[INFO] Working dir: /var/lib/jenkins/workspace/acme_master-AZ5ORYFOO25DAUG767DB32IPS36JL64GOEK6QCFL6266VKWQXSCQ/bundles/acme.model.admin.ui.web/target/sonar
[INFO] Source paths: pom.xml, src
[INFO] Binary dirs: target/classes
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] Excluded sources:
[INFO] **/*NLS.java
[INFO] **/*DTO.java
[INFO] **/Dto.java
[INFO] /*Bean.java
[INFO] /Constants.java
[INFO] /*Consts.java
[INFO] file:/src-gen/
[INFO] file:/test-gen/
[INFO] 3 files indexed
[INFO] 0 files ignored because of inclusion/exclusion patterns
[INFO] Quality profile for jsp: FindBugs Security JSP
[INFO] Sensor Lines Sensor
[INFO] Sensor Lines Sensor (done) | time=1ms
[INFO] Sensor SCM Sensor
[INFO] Sensor SCM Sensor (done) | time=1ms
[INFO] Sensor jsp
[INFO] Sensor jsp (done) | time=106ms
[INFO] Sensor FindBugs Sensor
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=4ms
[WARNING] Findbugs needs sources to be compiled. Please build project before executing sonar or check the location of compiled classes to make it possible for Findbugs to analyse your (sub)project (/var/lib/jenkins/workspace/acme_master-AZ5ORYFOO25DAUG767DB32IPS36JL64GOEK6QCFL6266VKWQXSCQ/bundles/acme.model.admin.ui.web).
Do you have suggestion to fix the issue?
from sonar-findbugs.
Hey I am using oracle java 10 and using sonar for code analysis, getting the following error, can anyone tell me the solution for this.
sonarqube version: 6.7.3
find bugs plugin: 3.7.0
at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:275)
at org.sonar.plugins.findbugs.FindbugsExecutor$FindbugsTask.call(FindbugsExecutor.java:235)
Caused by: java.lang.IllegalStateException: Can not execute Findbugs
from sonar-findbugs.
I am using oracle java 8, Sonarqube server : 6.7 and Apache Ant(TM) version 1.10.5
ran into same error as above in Findbugs.
Caused by: java.lang.IllegalStateException: Can not execute Findbugs
Caused by: java.nio.file.InvalidPathException: Illegal char <*> at index 0: /lib/
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
at org.sonar.api.scan.filesystem.PathResolver.relativeFile(PathResolver.java:44)
at org.sonar.plugins.findbugs.FindbugsConfiguration.getExcludesFilters(FindbugsConfiguration.java:214)
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:152)
appreciate any help related to this
from sonar-findbugs.
Related Issues (20)
- NoClassDefFoundError after Sonar update from 10.4 to 10.5 HOT 1
- Is sonar-findbugs compatible with Sonarqube 10.x HOT 9
- sonarqube displays errors from a profile that is not assigned to the project HOT 2
- Crowd username changes - impact on sonar-findbbugs plugin HOT 2
- FindBug Rules are triggered for Quality PRofile Kotlin and XML HOT 2
- SonarQube Project showing an issue from a Java findbugs rule which is not there in the selected Quality Profile HOT 7
- SonarQube fails with Java 17 HOT 8
- Spike in SonarQube Findings HOT 2
- Support Java 21 (Unsupported class file major version 65) HOT 3
- Dependency Dashboard
- Findbugs timeout issue HOT 6
- new option to analyze tests HOT 2
- Update PAT_TO_FORK HOT 6
- Findbugs is reporting false positive bugs SA_LOCAL_SELF_COMPARISON when using instanceof pattern matching HOT 13
- Integration tests occassionally fail due to errors accessing the jfrog repo HOT 1
- Make "sonar-findbugs" compatible with SonarQube 10.4 "DownloadOnlyWhenRequired" feature HOT 2
- Encountering several errors related to the FindBugs plugin while running a build on Bamboo. HOT 15
- v4.2.8 is missing a release artifact HOT 1
- java.lang.IllegalArgumentException: Error: missing bug code for keySECXXEVAL HOT 4
- Getting "Hard coded password found here" exception where (IMHO) it shouldn't HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonar-findbugs.