subversion.credentials: deserialization fails when resolves-to="dynamic-proxy"

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      In hudson log, lots of such messages recently appeared (i.e. after having upgraded subversion plugin from 1.17 to 1.20):

      hudson.scm.PerJobCredentialStore <init>
      INFO: Failed to retrieve Subversion credentials from /var/lib/hudson/jobs/JOB_NAME/subversion.credentials
      hudson.util.IOException2: Unable to read /var/lib/hudson/jobs/JOB_NAME/subversion.credentials
      at hudson.XmlFile.unmarshal(XmlFile.java:152)
      at hudson.scm.PerJobCredentialStore.<init>(PerJobCredentialStore.java:38)
      at hudson.scm.SubversionSCM$DescriptorImpl.createAuthenticationProvider(SubversionSCM.java:1669)
      at hudson.scm.SubversionChangeLogBuilder.createAuthenticationProvider(SubversionChangeLogBuilder.java:122)
      at hudson.scm.SubversionChangeLogBuilder.getUrlForPath(SubversionChangeLogBuilder.java:118)
      at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:103)
      at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:440)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:557)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1119)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
      at hudson.model.Run.run(Run.java:1324)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:139)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: No InvocationHandler specified for dynamic proxy
      ---- Debugging information ----
      class : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy
      required-type : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy
      path : /hudson.scm.PerJobCredentialStore
      line number : 13
      -------------------------------
      at com.thoughtworks.xstream.converters.extended.DynamicProxyConverter.unmarshal(DynamicProxyConverter.java:92)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926)
      at hudson.util.XStream2.unmarshal(XStream2.java:80)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912)
      at hudson.XmlFile.unmarshal(XmlFile.java:148)
      ... 14 more

      This only occurs when the job's subversion.credentials looks like this:

      <?xml version='1.0' encoding='UTF-8'?>
      <hudson.scm.PerJobCredentialStore resolves-to="dynamic-proxy">
        <h class="hudson.remoting.RemoteInvocationHandler" serialization="custom">
          <hudson.remoting.RemoteInvocationHandler>
            <default>
              <autoUnexportByCaller>false</autoUnexportByCaller>
              <goingHome>false</goingHome>
              <oid>264</oid>
              <userProxy>true</userProxy>
            </default>
          </hudson.remoting.RemoteInvocationHandler>
        </h>
      </hudson.scm.PerJobCredentialStore>
      

      note: deserialization succeeds when the job's subversion.credentials looks like that:

      <?xml version='1.0' encoding='UTF-8'?>
      <hudson.scm.PerJobCredentialStore>
        <credentials class="hashtable">
          <entry>
            <string>REALM</string>
            <hudson.scm.SubversionSCM_-DescriptorImpl_-PasswordCredential>
              <userName>USERNAME</userName>
              <password>PASSWORD</password>
            </hudson.scm.SubversionSCM_-DescriptorImpl_-PasswordCredential>
          </entry>
        </credentials>
      </hudson.scm.PerJobCredentialStore>
      

      Let me know if something else is required.

            Assignee:
            Régis Desgroppes
            Reporter:
            Régis Desgroppes
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: