I got error in one of my project for spotbugs-sast step.
[INFO] [Spotbugs] [2023-04-24T16:50:21Z] [/go/pkg/mod/gitlab.com/gitlab-org/security-products/analyzers/command@v1.10.2/run.go:165] Running analyzer
[DEBU] [Spotbugs] [2023-04-24T16:50:21Z] [/go/src/app/utils/utils.go:45] /bin/bash -c source /root/.bashrc && switch_to java 11
[INFO] [Spotbugs] [2023-04-24T16:50:21Z] [/go/src/app/project/project.go:73] Found Gradlew project in /builds/olp/bam/accounting/papertrail-stream-reader directory
[INFO] [Spotbugs] [2023-04-24T16:50:21Z] [/go/src/app/analyze.go:128] Found 1 analyzable projects.
[DEBU] [Spotbugs] [2023-04-24T17:02:39Z] [/go/src/app/analyze.go:185] /opt/asdf/shims/java -cp /spotbugs/dist/lib/* -Xmx1900M -Dlog4j2.formatMsgNoLookups=true -jar /spotbugs/dist/lib/spotbugs.jar -pluginList /fsb/lib/findsecbugs-plugin.jar -exclude /spotbugs/exclude.xml -include /spotbugs/include.xml -onlyAnalyze com.here.accounting.papertrail.streamreader.,com.here.accounting.papertrail.streamreader…,com.here.accounting.papertrail.streamreader.listener.,com.here.accounting.papertrail.streamreader.util.,com.here.accounting.papertrail.streamreader.integrationtest.,com.here.accounting.papertrail.streamreader.test. -effort:max -low -noClassOk -xml:withMessages=/tmp/SpotBugs.xml -auxclasspathFromFile /tmp/jars.list /builds/olp/bam/accounting/papertrail-stream-reader
The following classes needed for analysis were missing:
org.osgi.framework.BundleActivator
org.osgi.framework.SynchronousBundleListener
com.lmax.disruptor.SequenceReportingEventHandler
javax.mail.Authenticator
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
com.fasterxml.jackson.dataformat.yaml.YAMLMapper
com.lmax.disruptor.WaitStrategy
…
ant then eventually come to
…
org.apache.spark.SparkEnv
Exception in thread “main” edu.umd.cs.findbugs.ba.AnalysisException: Exeption was thrown during analysis
at edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$3(FindBugs2.java:1125)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1118)
at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
…
[ERRO] [Spotbugs] [2023-04-24T17:02:39Z] [/go/src/app/analyze.go:187] Error: SpotBugs analysis failed for /builds/olp/bam/accounting/papertrail-stream-reader: exit status 1
[FATA] [Spotbugs] [2023-04-24T17:02:39Z] [/go/src/app/main.go:35] exit status 1