-
Bug
-
Resolution: Fixed
-
Critical
-
None
When restarting Jenkins all job configurations for "Post-build Actions" -> Quality Gates Sonarqube Plugin are missing.
Jenkins reports Unreadable Data in "Manage Old Data":
ConversionException: Cannot construct org.apache.http.protocol.HttpContext : org.apache.http.protocol.HttpContext :
Cannot construct org.apache.http.protocol.HttpContext : org.apache.http.protocol.HttpContext
---- Debugging information ---- message : Cannot construct org.apache.http.protocol.HttpContext : org.apache.http.protocol.HttpContext cause-exception :
com.thoughtworks.xstream.converters.reflection.ObjectAccessException cause-message :
Cannot construct org.apache.http.protocol.HttpContext : org.apache.http.protocol.HttpContext class :
org.apache.http.protocol.HttpContext required-type : org.apache.http.protocol.HttpContext converter-type :
hudson.util.RobustReflectionConverter
path : /maven2-moduleset/publishers/org.quality.gates.jenkins.plugin.QGPublisher/buildDecision/qualityGatesProvider/sonarHttpRequester/context/context line number : 82 -------------------------------,
ConversionException: Cannot construct org.apache.http.impl.client.CloseableHttpClient : org.apache.http.impl.client.CloseableHttpClient :
Cannot construct org.apache.http.impl.client.CloseableHttpClient : org.apache.http.impl.client.CloseableHttpClient
---- Debugging information ---- message : Cannot construct org.apache.http.impl.client.CloseableHttpClient :
org.apache.http.impl.client.CloseableHttpClient cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException cause-message :
Cannot construct org.apache.http.impl.client.CloseableHttpClient : org.apache.http.impl.client.CloseableHttpClient class :
org.apache.http.impl.client.CloseableHttpClient required-type : org.apache.http.impl.client.CloseableHttpClient
converter-type : hudson.util.RobustReflectionConverter
path : /maven2-moduleset/publishers/org.quality.gates.jenkins.plugin.QGPublisher/buildDecision/qualityGatesProvider/sonarHttpRequester/client line number : 86 -------------------------------,
InstantiationError: null
There seems to be issues initiating the SonarHttpRequester classes from the config.xml file after restart.
When re-configuring the "Post-build Actions" again the plugin works until a new restart of Jenkins
The config.xml file is extremly bloated with configuration of the SonarHttpRequester node
<sonarHttpRequester class="org.quality.gates.sonar.api61.SonarHttpRequester61">
<context>
<context class="org.apache.http.protocol.BasicHttpContext">
<map class="concurrent-hash-map"/>
</context>
</context>
<client class="org.apache.http.impl.client.InternalHttpClient">
... Another 35000 lines of configuration
Jenkins was started in cmd line using:
java -Dhudson.model.ParametersAction.keepUndefinedParameters=true -Xms512M -Xmx2048M -jar jenkins.war --controlPort=8001
One maven build job was created that executed a Sonar mvn job:
-U clean install $SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.branch=master
Prepare SonarQube Scanner environment was checked.
Quality Gates SonarQube Plugin config:
Project Key: default.test:project-template:master