Comments (5)
Hello, here's the important part of the error message: One (sub)project contains Java source files that are not compiled
Spotbugs needs the compiled .class
files and it cannot find them.
Can you give more information on what you're doing? Was it working before, what changed? Is the project compiled prior to the sonar anlysis?
from sonar-findbugs.
Hello Toison,
Greetings of the day!
Thanks for the quick response!
Here is the background of the ticket as follows:
We have received request from the user stating that Sonarqube no longer does full scan for all our language requirements. We are no longer able to change the projects quality profile to include all languages required. In the previous sprints we were able to scan 6 languages but now it only scans 2 (Java and XML).
We have investigated the case with the respective Application vendor , during our investigation along with the vendor we have noticed that the sonarscan is getting failed with the enclosed error.
09:29:00.487 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Can not execute Findbugs
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:188)
at org.sonar.plugins.findbugs.FindbugsSensor.execute(FindbugsSensor.java:126)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:81)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:392)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:388)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:385)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:357)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:134)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
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:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: One (sub)project contains Java source files that are not compiled
Hope the provided information helps to troubleshoot the issue and let us know if any info needed on the same.
Thank you!
Kind regards,
Srinivasa
from sonar-findbugs.
Sorry but unfortunately there's isn't nearly enough information here for me to know what's happening, the build logs would be a good start.
The error means that it can find source files that should be compiled to .class
files (so Java, JSP, Scala, Kotlin) but cannot find any class files. If the project has these languages it needs to be compiled prior to the sonar analysi and the sonar.java.binaries
analysis option needs to point to the folders containing these class files.
If for some reason that is not possible you can set the sonar.findbugs.allowuncompiledcode
option so it will ignore the project instead of failing.
You can also upgrade to the latest version (4.2.2) of the plugin, it should give a more detailed error message.
from sonar-findbugs.
Hello Toison,
It would be great if we can have short call to drill down the reported issue , since due to confidential information we are not allowed to share the same as requested in the public forum.
Hope you understand the confidentiality and share the meeting link with us to discuss further.
Thanks for understanding.
Kind regards,
Srinivasa
from sonar-findbugs.
Most users are able to share anonymized logs. In any case what you need to confirm is that:
- the sources are compiled into
.class
files - the
.class
files are in the folder(s) corresponding tosonar.java.binaries
If for some reason that is not possible you can set the sonar.findbugs.allowuncompiledcode
option so it will ignore the project instead of failing.
from sonar-findbugs.
Related Issues (20)
- Cannot find pre compiled JSP with Branch Community Plugin HOT 6
- regarding usage of Apache commons-text library HOT 6
- Apache Common Text library - vulnerability HOT 2
- Findbugs fails when JavaSensor uses cached data HOT 17
- OWASP Top 10 not listed HOT 1
- Findbugs is reporting false positive bugs in test code HOT 10
- 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
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.