Jenkins extension for SonarQube 2.16 causes java.lang.UnsupportedOperationException


after updating from version 2.15 to 2.16 on Jenkins 2.414.2.2-rolling there were problems when
disabling / enabling freestyle jobs that are using Sonarqube analysis build step.

Error while serving https://jenkins/job/xxx/job/xxx/job/xxx/job/xxx/disable
java.lang.UnsupportedOperationException: Refusing to marshal okhttp3.OkHttpClient for security reasons; see
  at hudson.util.XStream2$BlacklistedTypesConverter.marshal(
  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(
  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(
  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(
  at hudson.util.RobustReflectionConverter.marshallField(
  at hudson.util.RobustReflectionConverter$2.writeField(
Caused: java.lang.RuntimeException: Failed to serialize hudson.plugins.sonar.client.HttpClient#okHttpClient for class hudson.plugins.sonar.client.HttpClient

After downgrade to 2.15 the problems are gone.


1 Like

Hello Gilbert,

Thank you for the report, this issue has also been reported on Jenkins’ issue tracker JENKINS-72201.
A ticket has been created on our side and should be fixed for the 2.17 release SONARJNKNS-369. You can find more details on the issue there.


1 Like

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