Giter Club home page Giter Club logo

Comments (5)

gtoison avatar gtoison commented on July 17, 2024

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.

srinipi avatar srinipi commented on July 17, 2024

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.

gtoison avatar gtoison commented on July 17, 2024

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.

srinipi avatar srinipi commented on July 17, 2024

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.

gtoison avatar gtoison commented on July 17, 2024

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 to sonar.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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.