Fail to download libraries from server, Caused by: java.lang.ArrayIndexOutOfBoundsException: 1

SonarQube Runner 2.4
Java 1.8.0_141 Oracle Corporation (64-bit)
Linux 2.6.32-696.18.7.1.el6.ucloud.x86_64 amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: /data/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/default/conf/
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Work directory: /****/.sonar
INFO: SonarQube Server
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
Total time: 0.153s
Final Memory: 2M/240M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
java.lang.IllegalStateException: Fail to download libraries from server
	at org.sonar.runner.impl.Jars.dowloadFiles(
	at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(
	at org.sonar.runner.impl.BatchLauncher$
	at Method)
	at org.sonar.runner.impl.BatchLauncher.doExecute(
	at org.sonar.runner.impl.BatchLauncher.execute(
	at org.sonar.runner.api.EmbeddedRunner.doExecute(
	at org.sonar.runner.api.Runner.execute(
	at org.sonar.runner.Main.executeTask(
	at org.sonar.runner.Main.execute(
	at org.sonar.runner.Main.main(
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at org.sonar.runner.impl.Jars.dowloadFiles(
	... 12 more

We are using:

  • sonarqube: docker images sonarqube:7.9-community
  • jenkins : 2.204
  • jenkins-plugin : SonarQube Scanner for Jenkins 2.11

Hey there.

Your version of the SonarQube Scanner (v2.4) is very old. and will cause this compatibility issue. Can you try the latest version?


we team use jenkins,
I download from version: 2.11, this is last version and upload to jenkins.

That’s the version of the extension for Jenkins (which ultimately points to a scanner installation to use) but still means you could have an old scanner installed. This section of the docs might help you.

Analyzing other project types

Global Configuration
This step is mandatory if you want to trigger any of your SonarQube analyses with the SonarScanner. You can define as many scanner instances as you wish. Then for each Jenkins job, you will be able to choose with which launcher to use to run the SonarQube analysis.

  1. Log into Jenkins as an administrator and go to Manage Jenkins > Global Tool Configuration
  2. Scroll down to the SonarScanner configuration section and click on Add SonarScanner. It is based on the typical Jenkins tool auto-installation. You can either choose to point to an already installed version of SonarScanner (uncheck ‚ÄėInstall automatically‚Äô) or tell Jenkins to grab the installer from a remote location (check ‚ÄėInstall automatically‚Äô)
1 Like

I must owe you one, I sloved this trouble one day , thanks a million.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.