##[error]ERROR: Unable to run check class A.A.A.A.A.B.C - S2091 on file

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    4.*
  • what are you trying to achieve
    There are no errors while I am execute the sonar.
  • what have you tried so far to achieve this
    Nothing else

Hello @Jiao_Zhu_US_IFS and welcome to our community forum !

In order to help you, we will require more information:

  • Which SonarQube version are you using ?
  • Could you please provide the full log? It is impossible to know where the problem occurs out of context

Thank you

Hi Christophe,
Thanks for your response, here are the information which you require:

  • SonarQube 4.20.0
  • 2021-05-24T05:34:47.2744799Z INFO: JavaScript/TypeScript frontend is enabled
    2021-05-24T05:34:47.2745720Z INFO: Load metrics repository
    2021-05-24T05:34:47.4274797Z INFO: Load metrics repository (done) | time=156ms
    2021-05-24T05:34:51.5281592Z INFO: Sensor JavaSquidSensor [java]
    2021-05-24T05:34:52.1325119Z INFO: Configured Java source version (sonar.java.source): none
    2021-05-24T05:34:52.1877845Z INFO: JavaClasspath initialization
    2021-05-24T05:34:52.1998394Z INFO: JavaClasspath initialization (done) | time=0ms
    2021-05-24T05:34:52.2005675Z INFO: JavaTestClasspath initialization
    2021-05-24T05:34:52.2085041Z INFO: JavaTestClasspath initialization (done) | time=16ms
    2021-05-24T05:34:52.5846175Z ##[error]May 24, 2021 1:34:52 PM org.apache.jasper.servlet.TldScanner scanJars
    INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    2021-05-24T05:34:52.5864474Z May 24, 2021 1:34:52 PM org.apache.jasper.servlet.TldScanner scanJars
    2021-05-24T05:34:52.5865580Z INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    2021-05-24T05:34:52.9055681Z INFO: Java Main Files AST scan
    2021-05-24T05:34:52.9104887Z INFO: 1920 source files to be analyzed
    2021-05-24T05:34:52.9418172Z INFO: Load project repositories
    2021-05-24T05:34:53.5440769Z INFO: Load project repositories (done) | time=422ms
    2021-05-24T05:34:54.7554301Z ##[error]ERROR: Unable to run check class A.A.A.A.A.B.C - S2091 on file ‘src/main/java///////**.java’, To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
    A.A.A.A.A.G: Failed to serialize java.lang.Object
    at A.A.A.A.A.B.D(na:1924)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at A.A.A.A.A.B.A(na:2856)
    at A.A.A.A.A.B.D(na:266)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at A.A.A.A.A.B.A(na:2856)
    at A.A.A.A.A.B.D(na:266)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at A.A.A.A.A.B.A(na:2856)
    at A.A.A.A.A.B.D(na:266)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at A.A.A.A.A.B.A(na:2856)
    at A.A.A.A.A.B.D(na:266)
    at A.A.A.A.A.A.visitClass(na:144)
    at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:220)
    at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:40)
    at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:34)
    at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:52)
    at org.sonar.java.model.JavaTree$CompilationUnitTreeImpl.accept(JavaTree.java:185)
    at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:40)
    at A.A.A.A.A.A.scanFile(na:2104)
    at A.A.A.A.A.B.A.scanFile(na:2233)
    at org.sonar.java.model.VisitorsBridge.lambda$runScanner$0(VisitorsBridge.java:163)
    at org.sonar.java.model.VisitorsBridge.runScanner(VisitorsBridge.java:168)
    at org.sonar.java.model.VisitorsBridge.runScanner(VisitorsBridge.java:163)
    at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:143)
    at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:123)
    at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:77)
    at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:115)
    at org.sonar.java.JavaSquid.scan(JavaSquid.java:108)
    at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:96)
    at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
    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.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
    at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:389)
    at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:385)
    at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:354)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
    at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
    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 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: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.nio.file.AccessDeniedException: E:****.scannerwork\ucfg2\java\all.typedefs
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
    at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)
    at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
    at java.nio.file.Files.newOutputStream(Files.java:216)
    at A.A.A.A.A.B.A(na:1203)
    at A.A.A.A.A.B.D(na:456)
    … 60 common frames omitted

I have change from the path name to ** to keep the security of company.
I hope you can get what you want from it.

Hello Jiao,

Thank you for the logs, it will definitely help with the investigation.
Regarding the version number:

I don’t think this is the correct SonarQube version, this version (4.20.0) probably is the scanner/extension version but not the SonarQube instance version. (Note: SonarQube 4.2 was released in 2014 and is no longer supported. Additionally, the error reported in the logs are in relation to rule S2091, that was added in SonarQube 7+).
You should be able to see the SonarQube version at the bottom of the web interface when you are connected to your instance.

Hi Czurn,

I find the version in Azure DevOps.I think it’s the version of SonarScanner for Azure DevOps. The version 4.30.0 was updated in 2021-04-30. Is this useful for you?

Hello Jiao,

Indeed, the version 4.20.0 corresponds to the SonarScanner for Azure DevOps extension used on Azure DevOps.
This extension connects to a SonarQube instance that is hosted somewhere by you and will use the plugins/analyzers of the SonarQube instance: this is why what I need to know is what is the version of the SonarQube instance you are using.
I require this information in order to fully understand the logs you provided, given there are obfuscated lines (at A.A.A.A.A.B.A) which can only be understood if I am aware of the version used.

Thank you.

Hi Christophe,

Thanks for your updates. What can I do anything else?

Hello,

We need to know the SonarQube version that is used so we can start our investigation. Unfortunately this information is missing in what you shared. :frowning:

I’m sharing with you 2 ways to get this information.

Option 1 (my preferred way)
Go in this URL:

https://[your sonarqube hostname]/api/plugins/installed

You will get a JSON output with the list of all the components running your SonarQube instance.
You can attach it here or copy/paste its content and that will be fine.

Option 2
Go in your SonarQube UI, and scroll down in the bottom of the page.
You should see a footer looking like this one.

Copy/paste the content of the footer here so we can know the version of SonarQube.

Regards
Alex

1 Like

Hi Alexandre,

Here is the version:

Hi Alexandre,

Do you have any idea about this error?

Thanks!

Hello Jiao,

Thank you for providing the SQ version information, it was helpful in understanding the log better.
Looking into the problem, it seems the analyzer throws an IOException when attempting to write data to a temporary file.

  • Can you confirm that the user running the analysis has read and write access to the project working directory ?
  • Which operating system is used ? (Windows, Linux, … ?)

At the moment, I cannot manage to create a reproducer for this problem. Could you please tell me if you can reproduce this error if you analyze the project locally ?

Thank you