Sonnar scan not happening from the root project directory in multi module project

Hi, We have multi module maven project where in there are 7 modules out of which one module only contains java codes and others are having javascript code. all the modules are calling in a parent pom.xml. We target this parent pom.xml to run scan via jenkinsfile. All 7 modules are as below in root pom.

<modules>
        <module>os-client</module>
        <module>dmc-manager</module>
        <module>model-runner</module>
        <module>backup-agent</module>
        <module>container</module>
        <module>workclient</module>
        <module>dmc</module>
    </modules>

However, when running the SonarQube scan via the Jenkinsfile, the scan defaults to the container module (which is the only module containing Java code) and ignores the other modules. I expect the scan to start from the root project directory so that all modules listed in the parent POM are scanned as part of the analysis.

Sonar script is as below

Workclient_root (project root directory)
pom.xml (parent pom.xml)
os-client → pom.xml
dmc-manager → pom.xml
model-runner → pom.xml
backup-agent → pom.xml
container → pom.xml
workclient → pom.xml

sh """
           echo "SONAR SCAN STARTED..."
           echo "Current working directory:"
           pwd
           mvn -s ${MAVEN_SETTINGS} sonar:sonar \\
           -Dsonar.projectName=press_Workclientt \\
           -Dsonar.sources=. \\
           -Dsonar.tests=src/test/java \\               					        
           -Dsonar.javascript.lcov.reportPaths=workclient/target/client-coverage-report/**/lcov.info \\
           -Dsonar.exclusions=**/node_modules/** \\
           -Dsonar.sourceEncoding=UTF-8 \\
           -Dsonar.log.level=INFO

To scan from the root I also tried following:

  1. Provided -Dsonar.projectBaseDir-. to scan explicitly from the project root directory

  2. Provided sonar script as dir('${WORKSPACE}'){ sonar script} where WORKSPACE=project root path ture_TOD-2291-migration-to-sonar in jenkins agent

Based on the current setup, does anyone know why the SonarQube scan is not starting from the project root directory , but instead always runs from the container module? I’m not sure if SonarQube defaults to scanning the directory that contains Java code (i.e., src/main).

Hi,

Instead of explicitly setting sonar.sources and sonar.tests, try using the sonar.maven.scanAll=true property.

 
HTH,
Ann

Hi,

I tried with -Dsonar.mave.scanAll=true property but it failed with the following error:

Error during SonarScanner Engine execution

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'AnalysisTempFolder' defined in org.sonar.scanner.analysis.AnalysisTempFolderProvider: Unsatisfied dependency expressed through method 'provide' parameter 0: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt

Hi,

Could you exclude that file? Or perhaps, as a start, everything in **/sorting_fixtures/*?

And if that doesn’t work, can you provide the full analysis log, redacted as necessary, starting from the analysis command itself?

 
Thx,
Ann

I tried excluding **/sorting_fixtures/* and getting same error.

sonar script is here

withSonarQubeEnv(credentialsId: 'XXXX-sonar', installationName: 'XXXX-sonar') {
								sh """
               					    echo "SONAR SCAN STARTED..."
               					    echo "Current working directory:"
               					    pwd
               					    mvn -s ${MAVEN_SETTINGS} sonar:sonar \\
               					        -Dsonar.projectName=press_Workclient \\
               					        -Dsonar.maven.scanAll=true \\
               					        -Dsonar.javascript.lcov.reportPaths=../workclient/target/client-coverage-report/**/lcov.info \\
               					        -Dsonar.coverage.jacoco.xmlReportPaths=target/**/jacoco.xml \\
               					        -Dsonar.exclusions=**/sorting_fixtures/* \\
               					        -Dsonar.sourceEncoding=UTF-8 \\
               					        -Dsonar.log.level=INFO
               					"""
               				}

Full analysis logs is here

Error during SonarScanner Engine execution
**19:54:09** [e[1;34mINFOe[m] Java 17.0.14 Amazon.com Inc. (64-bit) 
**19:54:09** [e[1;34mINFOe[m] Linux 6.1.134-150.224.amzn2023.x86_64 (amd64) 
**19:54:09** [e[1;34mINFOe[m] User cache: /home/user/.sonar/cache 
**19:54:10** [e[1;34mINFOe[m] JRE provisioning: os[linux], arch[x86_64] 
**19:54:12** [e[1;34mINFOe[m] Communicating with SonarQube Server 25.5.0.107428 
**19:54:12** [e[1;34mINFOe[m] Parameter sonar.maven.scanAll is enabled. The scanner will attempt to collect additional sources. 
**19:54:17** [e[1;34mINFOe[m] Starting SonarScanner Engine... 
**19:54:17** [e[1;34mINFOe[m] Java 17.0.13 Eclipse Adoptium (64-bit) 
**19:54:17** [e[1;33mWARNINGe[m] Property 'env.SONARQUBE_SCANNER_PARAMS' is encrypted. The encryption of scanner properties is deprecated and will soon be removed. 
**19:54:17** [e[1;34mINFOe[m] Load global settings 
**19:54:18** [e[1;34mINFOe[m] Load global settings (done) | time=336ms 
**19:54:18** [e[1;34mINFOe[m] Server id: BFA2C848-AYXDuLQ-fWzst8pKuKdb 
**19:54:18** [e[1;34mINFOe[m] Loading required plugins 
**19:54:18** [e[1;34mINFOe[m] Load plugins index 
**19:54:18** [e[1;34mINFOe[m] Load plugins index (done) | time=29ms 
**19:54:18** [e[1;34mINFOe[m] Load/download plugins 
**19:54:18** [e[1;34mINFOe[m] Load/download plugins (done) | time=799ms 
**19:54:19** [e[1;34mINFOe[m] Process project properties 
**19:54:20** [e[1;31mERRORe[m] Error during SonarScanner Engine execution 
**19:54:20** org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ClassRealm{iac}-org.sonar.iac.helm.HelmEvaluator': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'AnalysisTempFolder' defined in org.sonar.scanner.analysis.AnalysisTempFolderProvider: Unsatisfied dependency expressed through method 'provide' parameter 0: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:240) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1381) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1218) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1155) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1121) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1056) 
**19:54:20**     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) 
**19:54:20**     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) 
**19:54:20**     at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226) 
**19:54:20**     at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206) 
**19:54:20**     at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142) 
**19:54:20**     at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227) 
**19:54:20**     at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206) 
**19:54:20**     at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:151) 
**19:54:20**     at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66) 
**19:54:20**     at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52) 
**19:54:20** Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'AnalysisTempFolder' defined in org.sonar.scanner.analysis.AnalysisTempFolderProvider: Unsatisfied dependency expressed through method 'provide' parameter 0: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) 
**19:54:20**     at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1667) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1555) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) 
**19:54:20** ... 22 common frames omitted 
**19:54:20** Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) 
**19:54:20**     at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1667) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1555) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) 
**19:54:20** ... 36 common frames omitted 
**19:54:20** Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:645) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) 
**19:54:20**     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) 
**19:54:20**     at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1667) 
**19:54:20**     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1555) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) 
**19:54:20** ... 50 common frames omitted 
**19:54:20** Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt 
**19:54:20**     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:199) 
**19:54:20**     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiateWithFactoryMethod(SimpleInstantiationStrategy.java:88) 
**19:54:20**     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:168) 
**19:54:20**     at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) 
**19:54:20** ... 64 common frames omitted 
**19:54:20** Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt 
**19:54:20**     at java.base/sun.nio.fs.UnixPath.encode(Unknown Source) 
**19:54:20**     at java.base/sun.nio.fs.UnixPath.<init>(Unknown Source) 
**19:54:20**     at java.base/sun.nio.fs.UnixFileSystem.getPath(Unknown Source) 
**19:54:20**     at java.base/java.nio.file.Path.of(Unknown Source) 
**19:54:20**     at java.base/java.nio.file.Paths.get(Unknown Source) 
**19:54:20**     at org.sonar.scanner.scan.ProjectReactorBuilder.resolvePath(ProjectReactorBuilder.java:406) 
**19:54:20**     at org.sonar.scanner.scan.ProjectReactorBuilder.logMissingPaths(ProjectReactorBuilder.java:361) 
**19:54:20**     at org.sonar.scanner.scan.ProjectReactorBuilder.logMissingSourcesAndTests(ProjectReactorBuilder.java:355) 
**19:54:20**     at org.sonar.scanner.scan.ProjectReactorBuilder.cleanAndCheckProjectDefinitions(ProjectReactorBuilder.java:342) 
**19:54:20**     at org.sonar.scanner.scan.ProjectReactorBuilder.execute(ProjectReactorBuilder.java:132) 
**19:54:20**     at org.sonar.scanner.scan.MutableProjectReactorProvider.provide(MutableProjectReactorProvider.java:28) 
**19:54:20**     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
**19:54:20**     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
**19:54:20**     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
**19:54:20**     at java.base/java.lang.reflect.Method.invoke(Unknown Source) 
**19:54:20**     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:171) 
**19:54:20** ... 67 common frames omitted 
**19:54:20** 
**19:54:20** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m 
**19:54:20** [e[1;34mINFOe[m] e[1mReactor Summary for workclient-root 3.16-TOD-2291-SNAPSHOT:e[m 
**19:54:20** [e[1;34mINFOe[m] 
**19:54:20** [e[1;34mINFOe[m] workclient-root ..................................... e[1;31mFAILUREe[m [ 15.864 s] 
**19:54:20** [e[1;34mINFOe[m] os-client .......................................... e[1;33mSKIPPEDe[m 
**19:54:20** [e[1;34mINFOe[m] dmc-manager ........................................ e[1;33mSKIPPEDe[m 
**19:54:20** [e[1;34mINFOe[m] model-runner ....................................... e[1;33mSKIPPEDe[m 
**19:54:20** [e[1;34mINFOe[m] backup-agent ....................................... e[1;33mSKIPPEDe[m 
**19:54:20** [e[1;34mINFOe[m] container .......................................... e[1;33mSKIPPEDe[m 
**19:54:20** [e[1;34mINFOe[m] workclient.......................................... e[1;33mSKIPPEDe[m 
**19:54:20** [e[1;34mINFOe[m] dmc ................................................ e[1;33mSKIPPEDe[m 
**19:54:20** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m 
**19:54:20** [e[1;34mINFOe[m] e[1;31mBUILD FAILUREe[m 
**19:54:20** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m 
**19:54:20** [e[1;34mINFOe[m] Total time: 16.336 s 
**19:54:20** [e[1;34mINFOe[m] Finished at: 2025-06-09T19:54:20+01:00 
**19:54:20** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m 
**19:54:20** [e[1;31mERRORe[m] Failed to execute goal e[32morg.sonarsource.scanner.maven:sonar-maven-plugin:5.0.0.4389:sonare[m e[1m(default-cli)e[m on project e[36mworkclient-roote[m: e[1;31mAnalysis failede[m -> e[1m[Help 1]e[m 
**19:54:20** [e[1;31mERRORe[m] 
**19:54:20** [e[1;31mERRORe[m] To see the full stack trace of the errors, re-run Maven with the e[1m-ee[m switch. 
**19:54:20** [e[1;31mERRORe[m] Re-run Maven using the e[1m-Xe[m switch to enable full debug logging. 
**19:54:20** [e[1;31mERRORe[m] 
**19:54:20** [e[1;31mERRORe[m] For more information about the errors and possible solutions, please read the following articles: 
**19:54:20** [e[1;31mERRORe[m] e[1m[Help 1]e[m http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 
**19:54:20** [Pipeline] } 
**19:54:23** WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed? 
**19:54:23** [Pipeline] // withSonarQubeEnv 
**19:54:23** [Pipeline] } 
**19:54:23** Deleting 1 temporary files 
**19:54:24** [Pipeline] // configFileProvider 
**19:54:24** [Pipeline] } 
**19:54:24** [Pipeline] // script 
**19:54:24** Error when executing always post condition: 
**19:54:24** Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 59a11813-da54-4e14-826f-1edac6ef83cc 
**19:54:24** hudson.AbortException: script returned exit code 1 
**19:54:24**     at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:669) 
**19:54:24**     at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:615) 
**19:54:24**     at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:556) 
**19:54:24**     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 
**19:54:24**     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
**19:54:24**     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) 
**19:54:24**     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
**19:54:24**     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
**19:54:24**     at java.base/java.lang.Thread.run(Thread.java:829)

Hi,

I think this is probably coming from secrets detection. To find out, lets turn it off. So, please remove sonar.exclusions and replace it with sonar.text.activate=false and let’s see if that works.

 
Ann

Hi,

I tried with replacing sonar.exclusions with sonar.text.activate=false and it ends up with the same error I provided earlier in my last post.

Hi,

Thanks for trying that. Can you add sonar.verbose=true and post that log? That will hopefully give us a better idea of where this is coming from.

 
Thx,
Ann

Logs:

**16:19:53** [e[1;31mERRORe[m] Error during SonarScanner Engine execution 
**16:19:53** org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ClassRealm{iac}-org.sonar.iac.helm.HelmEvaluator': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'AnalysisTempFolder' defined in org.sonar.scanner.analysis.AnalysisTempFolderProvider: Unsatisfied dependency expressed through method 'provide' parameter 0: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt 
**16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:240) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1381) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1218) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) **16:19:53** at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1155) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1121) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1056) **16:19:53** at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) **16:19:53** at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) **16:19:53** at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226) **16:19:53** at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206) **16:19:53** at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142) **16:19:53** at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227) **16:19:53** at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206) **16:19:53** at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:151) **16:19:53** at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66) **16:19:53** at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52) **16:19:53** Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'AnalysisTempFolder' defined in org.sonar.scanner.analysis.AnalysisTempFolderProvider: Unsatisfied dependency expressed through method 'provide' parameter 0: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) **16:19:53** at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) **16:19:53** at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1667) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1555) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) **16:19:53** ... 22 common frames omitted **16:19:53** Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) **16:19:53** at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) **16:19:53** at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1667) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1555) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) **16:19:53** ... 36 common frames omitted **16:19:53** Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:645) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) **16:19:53** at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) **16:19:53** at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:347) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) **16:19:53** at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) **16:19:53** at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1667) **16:19:53** at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1555) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) **16:19:53** ... 50 common frames omitted **16:19:53** Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt **16:19:53** at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:199) **16:19:53** at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiateWithFactoryMethod(SimpleInstantiationStrategy.java:88) **16:19:53** at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:168) **16:19:53** at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) **16:19:53** ... 64 common frames omitted **16:19:53** Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/ec2-user/workspace/ture_TOD-2291-migration-to-sonar/node_modules/nak/tests/sorting_fixtures/??.txt **16:19:53** at java.base/sun.nio.fs.UnixPath.encode(Unknown Source) **16:19:53** at java.base/sun.nio.fs.UnixPath.<init>(Unknown Source) **16:19:53** at java.base/sun.nio.fs.UnixFileSystem.getPath(Unknown Source) **16:19:53** at java.base/java.nio.file.Path.of(Unknown Source) **16:19:53** at java.base/java.nio.file.Paths.get(Unknown Source) **16:19:53** at org.sonar.scanner.scan.ProjectReactorBuilder.resolvePath(ProjectReactorBuilder.java:406) **16:19:53** at org.sonar.scanner.scan.ProjectReactorBuilder.logMissingPaths(ProjectReactorBuilder.java:361) **16:19:53** at org.sonar.scanner.scan.ProjectReactorBuilder.logMissingSourcesAndTests(ProjectReactorBuilder.java:355) **16:19:53** at org.sonar.scanner.scan.ProjectReactorBuilder.cleanAndCheckProjectDefinitions(ProjectReactorBuilder.java:342) **16:19:53** at org.sonar.scanner.scan.ProjectReactorBuilder.execute(ProjectReactorBuilder.java:132) **16:19:53** at org.sonar.scanner.scan.MutableProjectReactorProvider.provide(MutableProjectReactorProvider.java:28) **16:19:53** at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) **16:19:53** at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) **16:19:53** at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) **16:19:53** at java.base/java.lang.reflect.Method.invoke(Unknown Source) **16:19:53** at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:171) **16:19:53** ... 67 common frames omitted **16:19:53** **16:19:53** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m **16:19:53** [e[1;34mINFOe[m] e[1mReactor Summary for workclient-root 3.16-TOD-2291-SNAPSHOT:e[m **16:19:53** [e[1;34mINFOe[m] **16:19:53** [e[1;34mINFOe[m] workclient-root ..................................... e[1;31mFAILUREe[m [ 29.880 s] **16:19:53** [e[1;34mINFOe[m] os-client .......................................... e[1;33mSKIPPEDe[m **16:19:53** [e[1;34mINFOe[m] dmc-manager ........................................ e[1;33mSKIPPEDe[m **16:19:53** [e[1;34mINFOe[m] model-runner ....................................... e[1;33mSKIPPEDe[m **16:19:53** [e[1;34mINFOe[m] backup-agent ....................................... e[1;33mSKIPPEDe[m **16:19:53** [e[1;34mINFOe[m] container .......................................... e[1;33mSKIPPEDe[m **16:19:53** [e[1;34mINFOe[m] workclient .......................................... e[1;33mSKIPPEDe[m **16:19:53** [e[1;34mINFOe[m] dmc ................................................ e[1;33mSKIPPEDe[m **16:19:53** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m **16:19:53** [e[1;34mINFOe[m] e[1;31mBUILD FAILUREe[m **16:19:53** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m **16:19:53** [e[1;34mINFOe[m] Total time: 30.489 s **16:19:53** [e[1;34mINFOe[m] Finished at: 2025-06-11T16:19:53+01:00 **16:19:53** [e[1;34mINFOe[m] e[1m------------------------------------------------------------------------e[m **16:19:53** [e[1;31mERRORe[m] Failed to execute goal e[32morg.sonarsource.scanner.maven:sonar-maven-plugin:5.0.0.4389:sonare[m e[1m(default-cli)e[m on project e[36mworkclient-roote[m: e[1;31mAnalysis failede[m -> e[1m[Help 1]e[m **16:19:53** [e[1;31mERRORe[m] **16:19:53** [e[1;31mERRORe[m] To see the full stack trace of the errors, re-run Maven with the e[1m-ee[m switch. **16:19:53** [e[1;31mERRORe[m] Re-run Maven using the e[1m-Xe[m switch to enable full debug logging. **16:19:53** [e[1;31mERRORe[m] **16:19:53** [e[1;31mERRORe[m] For more information about the errors and possible solutions, please read the following articles: **16:19:53** [e[1;31mERRORe[m] e[1m[Help 1]e[m http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException **16:19:54** [Pipeline] } **16:19:57** WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed? **16:19:57** [Pipeline] // withSonarQubeEnv **16:19:57** [Pipeline] } **16:19:57** Deleting 1 temporary files **16:19:57** [Pipeline] // configFileProvider **16:19:57** [Pipeline] } **16:19:57** [Pipeline] // script **16:19:57** Error when executing always post condition: **16:19:57** Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f196a383-f7ab-49b3-b4aa-01db28ab96ae **16:19:57** hudson.AbortException: script returned exit code 1 **16:19:57** at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:669) **16:19:57** at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:615) **16:19:57** at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:556) **16:19:57** at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) **16:19:57** at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) **16:19:57** at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) **16:19:57** at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) **16:19:57** at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) **16:19:57** at java.base/java.lang.Thread.run(Thread.java:829)

Hi,

Can we have the full log, starting from the analysis command itself?

 
Thx,
Ann