Error after analysis - NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy

same error。。。。。。。

INFO: More about the report processing at http://localhost:9000/api/ce/task?id=33fc9e1e-be8a-441f-a390-386dd8427f8e
INFO: Analysis total time: 23.284 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 24.706s
INFO: Final Memory: 12M/60M
INFO: ------------------------------------------------------------------------
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
        at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
        at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
        at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
        at ch.qos.logback.classic.Logger.error(Logger.java:543)
        at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
        at java.base/java.net.URLClassLoader.findClass(Unknown Source)
        at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 6 more

We are still using version 10.4.1 because of this issue. Even if it doesn’t affect our pipelines, I don’t want that our dev teams will get confused by this error message. I think I’m not the only one who rolled back to 10.4.1.

@Sonarsource: So I think it would make sense if you publish another minor release 10.5.2 to fix this issue sooner. Otherwise we (and probably many others) will just skip 10.5.

Hello, have the same issue, Enterprise Edition v10.5.1 (90531)

We are also facing huge issues, Datacenter Edition v.10.5.1
A rollback is sadly necessary as I cannot escalade this issue anywhere else

Same issue with sonar-scanner 5.0.1.3006 and 6.0.0.4432

How to remove these error/exception from the build pipeline logs. These errors are logged post successful Sonarqube analysis.

Must-share information (formatted with Markdown):

  • which versions are you using : v10.5.1 (90531)
  • how is SonarQube deployed: Helm
  • what are you trying to achieve: Building code using azure pipelines
  • Java version used: openjdk 17

Error logged in pipeline:

INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://XXXXXXXXXXXXXXXXXXX
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
INFO: Analysis total time: 2:52.986 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 2:56.654s
INFO: Final Memory: 53M/180M
INFO: ------------------------------------------------------------------------
##[error]Exception in thread "Thread-1" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
##[debug]Processed: ##vso[task.logissue type=error;]Exception in thread "Thread-1" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
##[error]at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
##[debug]Processed: ##vso[task.logissue type=error;]at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
	at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
##[error]at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
	at ch.qos.logback.classic.Logger.error(Logger.java:543)
	at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
##[debug]Processed: ##vso[task.logissue type=error;]at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)%0D%0A	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)%0D%0A	at ch.qos.logback.classic.Logger.error(Logger.java:543)%0D%0A	at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
	at ch.qos.logback.classic.Logger.error(Logger.java:543)
	at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
##[error]at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
##[debug]Processed: ##vso[task.logissue type=error;]at java.base/java.lang.Thread.run(Thread.java:833)%0D%0ACaused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
##[error]at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
##[debug]Processed: ##vso[task.logissue type=error;]at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
##[error]at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
	at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
##[error]at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
##[debug]Processed: ##vso[task.logissue type=error;]at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
##[error]... 6 more
##[debug]Processed: ##vso[task.logissue type=error;]... 6 more
	... 6 more
The SonarScanner CLI has finished
14:28:09.62  Post-processing succeeded.

The issue is closed, see
https://sonarsource.atlassian.net/browse/SONAR-22152

The fix comes with Sonarqube 10.6, just keep patient.

1 Like

Hi all,

Look for 10.6 mid-month.

 
HTH,
Ann

Same issue here,

Please hurry up with rolling out version 10.6.

11:37:27.823 ERROR Re-run SonarScanner CLI using the -X switch to enable full debug logging.
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
	at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
	at ch.qos.logback.classic.Logger.error(Logger.java:543)
	at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)
	at org.sonarsource.scanner.lib.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	... 6 more

Let’s hope 10.6 won’t have some other annoying issue as Sonarsource doesn’t seem to properly test their new releases

We have the same issue since yesterday on our SonarCloud. This breaks our build pipeline, since we’re checking if there any error messages in the log, which is required to ensure that CLI analyzer actually was run, since when it can’t run build won’t fail otherwise (see How to fail pipeline when SonarCloudAnalyze has an error on Azure DevOps - #14 by gab).

As long as there is no way to ensure that CLI analyzer was successfully run, nevertheless what the reason was why it was not able to run, this is a breaking issue.

Hi @pascalberger,

Which analyzer and version are you using?

 
Thx,
Ann

Same issue with SonarScanner for MSBuild 6.2 and SonarScanner 5.0.1.3006 (using latest Azure DevOps extension)

Thanks @pascalberger!

Double-checking the Jira ticket reminded me this is actually caused by a problem in JGit. So I guess you had an autoupdate of JGit, which is why you’re seeing this with two different scanners.

I suppose your quick fix is to downgrade JGit.

And at the same time, you might want to upgrade SonarScanner CLI, which is at 6.0.

 
HTH,
Ann

We’re using SonarCloud and Sonar Azure DevOps extension. So nothing we can do from our side regarding JGit.

Hello @pascalberger ,

We released a fix for SonarCloud a few weeks ago, so it is surprising that you are having the same issue today,

Could you please share more information about your build to help us understand and reproduce?

  • Your Azure DevOps pipeline definition
  • The full diagnostics logs for a failing pipeline

Thanks,
Benjamin

1 Like

Hello Benjamin Raymond, we are also having this issue using SonarCloud and the Azure DevOps extension. The error started occurring when we upgraded to the v2 version of the extension.

We are running the scanner on a Docker container with the following Dockerfile:

FROM ubuntu:24.04
 
ENV NODE_VERSION=20
 
# Install deps
RUN apt-get update && \
    apt-get install --no-install-recommends -y bash \
    apt-transport-https \
    ca-certificates \
    zip \
    unzip \
    curl \
    gnupg
 
# Install NodeJS
RUN mkdir -p /etc/apt/keyrings && \
    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key |gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
    echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
    apt-get update && \
    apt-get install nodejs -y
 
# Install Java
RUN apt-get update && apt-get install -y openjdk-21-jdk

Our pipeline definition for the SonarCloud job is:

jobs:
  - job: run_sonarcloud_analysis
    container: sonarcloud
    displayName: Run SonarCloud Analysis
    dependsOn:
      - ${{ if eq(parameters.enableCoverageAnalysis, 'true') }}:
        - ${{ parameters.coverageArtifactJob }}
      - ${{ if eq(parameters.enableTestReportAnalysis, 'true') }}:
        - ${{ parameters.testReportArtifactJob }}
    steps:
      - ${{ if eq(parameters.enableCoverageAnalysis, 'true') }}:
        - task: DownloadPipelineArtifact@2
          inputs:
            source: current
            artifact: ${{ parameters.coverageArtifactName }}
            path: ${{ parameters.coverageArtifactPath }}
 
      - ${{ if eq(parameters.enableTestReportAnalysis, 'true') }}:
        - task: DownloadPipelineArtifact@2
          inputs:
            source: current
            artifact: ${{ parameters.testReportArtifactName }}
            path: ${{ parameters.testReportArtifactPath }}
 
      - task: SonarCloudPrepare@2
        inputs:
          SonarCloud: ${{ parameters.sonarCloudServiceConnection }}
          organization: ${{ parameters.sonarCloudOrganization }}
          scannerMode: 'CLI'
          configMode: 'file'
          cliProjectKey: ${{ parameters.sonarCloudProjectKey }}
          cliProjectName: ${{ parameters.sonarCloudProjectName }}
          cliSources: '.'
          configFile: ${{ parameters.sonarCloudPropertiesFile }}
 
      - task: SonarCloudAnalyze@2
        inputs:
          jdkversion: 'JAVA_HOME_21_X64'
 
      - task: SonarCloudPublish@2
        inputs:
          pollingTimeoutSec: '500'

We also tried using the v1 tasks which previously worked:

jobs:
  - job: run_sonarcloud_analysis
    container: sonarcloud
    displayName: Run SonarCloud Analysis
    dependsOn:
      - ${{ if eq(parameters.enableCoverageAnalysis, 'true') }}:
        - ${{ parameters.coverageArtifactJob }}
      - ${{ if eq(parameters.enableTestReportAnalysis, 'true') }}:
        - ${{ parameters.testReportArtifactJob }}
    steps:
      - ${{ if eq(parameters.enableCoverageAnalysis, 'true') }}:
        - task: DownloadPipelineArtifact@2
          inputs:
            source: current
            artifact: ${{ parameters.coverageArtifactName }}
            path: ${{ parameters.coverageArtifactPath }}
 
      - ${{ if eq(parameters.enableTestReportAnalysis, 'true') }}:
        - task: DownloadPipelineArtifact@2
          inputs:
            source: current
            artifact: ${{ parameters.testReportArtifactName }}
            path: ${{ parameters.testReportArtifactPath }}
 
      - task: SonarCloudPrepare@1
        inputs:
          SonarCloud: ${{ parameters.sonarCloudServiceConnection }}
          organization: ${{ parameters.sonarCloudOrganization }}
          scannerMode: 'CLI'
          configMode: 'file'
          configFile: ${{ parameters.sonarCloudPropertiesFile }}
 
      - task: SonarCloudAnalyze@1
 
      - task: SonarCloudPublish@1
        inputs:
          pollingTimeoutSec: '500'

And the following are the logs of the pipeline that ran the Sonarcloud jobs in v2:

# SonarCloudPrepare Task

==============================================================================
Task         : Prepare Analysis Configuration
Description  : Prepare SonarCloud analysis configuration
Version      : 2.0.0
Author       : sonarsource
==============================================================================
Downloading: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006.zip
Extracting archive
/usr/bin/unzip /__w/_temp/a332c8eb-54e7-45f7-a970-36b2fa718aa8
Archive:  /__w/_temp/a332c8eb-54e7-45f7-a970-36b2fa718aa8
   creating: sonar-scanner-5.0.1.3006/
   creating: sonar-scanner-5.0.1.3006/bin/
   creating: sonar-scanner-5.0.1.3006/conf/
   creating: sonar-scanner-5.0.1.3006/lib/
  inflating: sonar-scanner-5.0.1.3006/bin/sonar-scanner-debug.bat  
  inflating: sonar-scanner-5.0.1.3006/bin/sonar-scanner.bat  
  inflating: sonar-scanner-5.0.1.3006/bin/sonar-scanner  
  inflating: sonar-scanner-5.0.1.3006/bin/sonar-scanner-debug  
  inflating: sonar-scanner-5.0.1.3006/conf/sonar-scanner.properties  
  inflating: sonar-scanner-5.0.1.3006/lib/sonar-scanner-cli-5.0.1.3006.jar  
Finishing: SonarCloudPrepare

# SonarCloudAnalyze Task

==============================================================================
Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarCloud server.
Version      : 2.0.0
Author       : sonarsource
==============================================================================
/__w/_temp/e21d7cb3-593b-4a35-b44d-cdfaff183129/sonar-scanner-5.0.1.3006/bin/sonar-scanner
INFO: Scanner configuration file: /__w/_temp/e21d7cb3-593b-4a35-b44d-cdfaff183129/sonar-scanner-5.0.1.3006/conf/sonar-scanner.properties
INFO: Project root configuration file: /__w/5/s/sonar-project.properties
INFO: SonarScanner 5.0.1.3006
INFO: Java 21.0.3 Ubuntu (64-bit)
INFO: Linux 6.5.0-1018-azure amd64
INFO: User cache: /home/AzDevOps_azpcontainer/.sonar/cache
INFO: Analyzing on SonarCloud
INFO: Default locale: "en_US", source code encoding: "utf-8"
INFO: Load global settings
INFO: Load global settings (done) | time=410ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: Loading required plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=124ms
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=915ms
INFO: Found an active CI vendor: 'Azure DevOps'
INFO: Load project settings for component key: '***'
INFO: Load project settings for component key: '***' (done) | time=143ms
INFO: Process project properties
INFO: Project key: ***
INFO: Base dir: /__w/5/s
INFO: Working dir: /__w/5/s/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=130ms

{...}

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 30.279s
INFO: Final Memory: 26M/90M
INFO: ------------------------------------------------------------------------
##[error]Exception in thread "Thread-13"
##[error]java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
	at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
	at ch.qos.logback.classic.Logger.error(Logger.java:543)
	at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 6 more
java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
	at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
	at ch.qos.logback.classic.Logger.error(Logger.java:543)
	at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 6 more

We hope to be able to identify and fix the problem with the information provided.

3 Likes

Hello @Stephani0106 ,

Thank you for this information. Additionally, can you please share the debug logs for a pipeline that includes the error?

To run with debug logs, you can tick this box (bottom-left of the sidebar) when running your pipeline
image

or temporarily add this to your pipeline definition

variables:
  system.debug: true

Hello! Facing the same error today using maven sonar scanner for SonarCloud.
Should I provide some more debug information?

Hi @lrozenblyum,

It would be great to have your debug log!

 
Ann

1 Like