Closed talelk closed 3 years ago
Same error here. Complete log:
==> Code Analysis Result:
INFO: Scanner configuration file: /bin/sonar-scanner-4.4.0.2170/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
13:05:06.008 INFO: SonarScanner 4.4.0.2170
13:05:06.010 INFO: Java 14-ea Oracle Corporation (64-bit)
13:05:06.011 INFO: Linux 4.14.186-146.268.amzn2.x86_64 amd64
13:05:06.450 DEBUG: keyStore is :
13:05:06.450 DEBUG: keyStore type is : pkcs12
13:05:06.454 DEBUG: keyStore provider is :
13:05:06.454 DEBUG: init keystore
13:05:06.454 DEBUG: init keymanager of type SunX509
13:05:06.899 DEBUG: Create: /root/.sonar/cache
13:05:06.901 INFO: User cache: /root/.sonar/cache
13:05:06.902 DEBUG: Create: /root/.sonar/cache/_tmp
13:05:06.912 DEBUG: Extract sonar-scanner-api-batch in temp...
13:05:06.929 DEBUG: Get bootstrap index...
13:05:06.929 DEBUG: Download: ********/batch/index
13:05:07.445 DEBUG: Get bootstrap completed
13:05:07.451 DEBUG: Download ********/batch/file?name=sonar-scanner-engine-shaded-7.9.4-all.jar to /root/.sonar/cache/_tmp/fileCache16806166188984756732.tmp
13:05:09.047 DEBUG: Create isolated classloader...
13:05:09.059 DEBUG: Start temp cleaning...
13:05:09.064 DEBUG: Temp cleaning done
13:05:09.065 INFO: Scanner configuration file: /bin/sonar-scanner-4.4.0.2170/conf/sonar-scanner.properties
13:05:09.066 INFO: Project root configuration file: NONE
13:05:09.068 DEBUG: Execution getVersion
13:05:09.088 INFO: Analyzing on SonarQube server 7.9.4
13:05:09.088 INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
13:05:09.090 DEBUG: Work directory: /drone/src/.scannerwork
13:05:09.092 DEBUG: Execution execute
13:05:09.529 DEBUG: Community 7.9.4.35981
13:05:09.746 INFO: Load global settings
13:05:09.916 DEBUG: GET 200 ********/api/settings/values.protobuf | time=165ms
13:05:09.972 INFO: Load global settings (done) | time=226ms
13:05:09.984 INFO: Server id: E3A76602-AWY6eJ4c8EjhkAWs1rhG
13:05:10.005 DEBUG: Create : /root/.sonar/_tmp
13:05:10.006 INFO: User cache: /root/.sonar/cache
13:05:10.013 INFO: Load/download plugins
13:05:10.013 INFO: Load plugins index
13:05:10.026 DEBUG: GET 200 ********/api/plugins/installed | time=13ms
13:05:10.052 INFO: Load/download plugins (done) | time=39ms
13:05:10.069 INFO: ------------------------------------------------------------------------
13:05:10.070 INFO: EXECUTION FAILURE
13:05:10.070 INFO: ------------------------------------------------------------------------
13:05:10.070 INFO: Total time: 4.171s
13:05:10.166 INFO: Final Memory: 5M/24M
13:05:10.166 INFO: ------------------------------------------------------------------------
13:05:10.166 ERROR: Error during SonarScanner execution
java.lang.ExceptionInInitializerError
at com.google.gson.internal.reflect.ReflectionAccessor.<clinit>(ReflectionAccessor.java:36)
at com.google.gson.internal.ConstructorConstructor.<init>(ConstructorConstructor.java:51)
at com.google.gson.Gson.<init>(Gson.java:205)
at com.google.gson.Gson.<init>(Gson.java:185)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.listInstalledPlugins(ScannerPluginInstaller.java:104)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:76)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes(ScannerPluginInstaller.java:60)
at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:59)
at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
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(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
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.NumberFormatException: For input string: "14-ea"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at com.google.gson.util.VersionUtils.determineMajorJavaVersion(VersionUtils.java:28)
at com.google.gson.util.VersionUtils.<clinit>(VersionUtils.java:24)
... 32 more
13:05:10.175 ERROR:
13:05:10.176 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
exit status 1
Please repull the newest docker image.
Hello,
Apparently the docker image is built using the wrong java version. blocking the scan process on a simple check.
java.lang.NumberFormatException: For input string: "14-ea"
INFO: ------------------------------------------------------------------------ at com.google.gson.internal.reflect.ReflectionAccessor.(ReflectionAccessor.java:36)
at com.google.gson.internal.ConstructorConstructor.(ConstructorConstructor.java:51)
at com.google.gson.Gson.(Gson.java:205)
at com.google.gson.Gson.(Gson.java:185)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.listInstalledPlugins(ScannerPluginInstaller.java:104)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:76)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes(ScannerPluginInstaller.java:60)
at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:59)
at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
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(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
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.NumberFormatException: For input string: "14-ea"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at com.google.gson.util.VersionUtils.determineMajorJavaVersion(VersionUtils.java:28)
at com.google.gson.util.VersionUtils.(VersionUtils.java:24)
... 32 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.