Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41946

Exception saving a certificate uploading a PKCS#12 "IllegalArgumentException: Unable to convert to class com.cloudbees.plugins.credentials.SecretBytes"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: credentials-plugin
    • Labels:
      None
    • Environment:
      "mvn hpi:run" on the credentials plugin (Jenkins ver. 1.609)
    • Similar Issues:

      Description

      • Navigate the "credentials"
      • Create new credentials
        • Type: certificate
        • Scope Global
        • Certificate: Upload PKCS#12 certificate
        • Upload the pkcs#12 file
        • Enter the password
        • Define the ID
        • Click on save

      You can test with the attached test.pfx , the password is "changeit"

      javax.servlet.ServletException: java.lang.IllegalArgumentException: Failed to instantiate interface com.cloudbees.plugins.credentials.Credentials from {"scope":"GLOBAL","keyStoreSource":{"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFGkmhFTZO9yAz4/xgy8BoPv/uw2G1IbHu+PXSvJpOob0Xf9Y7F1EmnZ6h7IZ2Yws/qoMDiCnPds5rB4dnrrpoFzYx1dWl3yOV+G/lguOdZCmaaOLNEux0JcX/hQvK067AS7Gw0V4KMxaHQNPX4kKQrPO7+1C6hUyF1BEppjuO9zjy4LymkkNPJHvrHarkgfxrFcnIaYRQrwGNKqp2zxcbGbY29f02CIpeap14ULo6anbX/HHxc5L2TS8F1ybz/TvF/HhKT+Y3BRe61Q/81xQeAqEVwWSMJkUIXtNsRVLwkHEhr1dnnoilmZxLe7zBEf8vLoCKlH9BYKIziSmhRBBupUyTnxVZwtJ7Sx8VbzkjVbg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Q9xt9kokZ5Y+cpYOueDnKK4+6bRUEailFuW0YiSx7kcr1Njb12v/VPm/P2gwzvtQfUj4CyGto90InOKIxHSkZzOlNzA58BioWOXm1dGTdEqhJExoACmKD3Hi/vWZNdLO5qLqvR2cdxcpKSmCh9wzfA8BwcmVlKGOrLRAqqlIWcRAb3QHQfKj8pIt8voZvV76+wxfUDUpk3pP9PDdz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","kind":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"},"password":"changeit","id":"my-certificate","description":"my-certificate","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"}
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:123)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:114)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:168)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate interface com.cloudbees.plugins.credentials.Credentials from {"scope":"GLOBAL","keyStoreSource":{"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqC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A","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","kind":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"},"password":"changeit","id":"my-certificate","description":"my-certificate","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:602)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at com.cloudbees.plugins.credentials.CredentialsStoreAction$DomainWrapper.doCreateCredentials(CredentialsStoreAction.java:777)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:46)
      	at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:399)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	... 51 more
      Caused by: java.lang.IllegalArgumentException: Failed to convert the keyStoreSource parameter of the constructor public com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl(com.cloudbees.plugins.credentials.CredentialsScope,java.lang.String,java.lang.String,java.lang.String,com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:699)
      	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:600)
      	... 66 more
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource from {"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFGkmhFTZO9yAz4/xgy8BoPv/uw2G1IbHu+PXSvJpOob0Xf9Y7F1EmnZ6h7IZ2Yws/qoMDiCnPds5rB4dnrrpoFzYx1dWl3yOV+G/lguOdZCmaaOLNEux0JcX/hQvK067AS7Gw0V4KMxaHQNPX4kKQrPO7+1C6hUyF1BEppjuO9zjy4LymkkNPJHvrHarkgfxrFcnIaYRQrwGNKqp2zxcbGbY29f02CIpeap14ULo6anbX/HHxc5L2TS8F1ybz/TvF/HhKT+Y3BRe61Q/81xQeAqEVwWSMJkUIXtNsRVLwkHEhr1dnnoilmZxLe7zBEf8vLoCKlH9BYKIziSmhRBBupUyTnxVZwtJ7Sx8VbzkjVbgtzmWECBrLUk5iU1oTmM7O842FoDW2uyvAR4p8nBxTHihrCG+5rDl6Vhu/d9zG98F+DK52c1locZak+tF9fN5CDHLqtUoL8tzNhHeETS8zoVJbHkoeT/gMesfUusDaj9NgTzmxN8KOZLUavJWE1GlSmVnbGrYQkrJkNNfqiwdfydrR/u16sx0V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HQfKj8pIt8voZvV76+wxfUDUpk3pP9PDdz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","kind":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:602)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:697)
      	... 68 more
      Caused by: java.lang.IllegalArgumentException: Failed to convert the uploadedKeystore parameter of the constructor public com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource(com.cloudbees.plugins.credentials.SecretBytes)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:699)
      	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:600)
      	... 70 more
      Caused by: java.lang.IllegalArgumentException: Unable to convert to class com.cloudbees.plugins.credentials.SecretBytes
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:657)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:697)
      	... 72 more
      

        Attachments

          Activity

          Hide
          cleclerc Cyrille Le Clerc added a comment - - edited

          After applying PR#81 Bump parent pom from jenkins:2.10 to jenkins:2.21, running "mvn -Djenkins.version=2.7.4 hpi:run", I get the same exception following the same test path:

          javax.servlet.ServletException: java.lang.IllegalArgumentException: Failed to instantiate interface com.cloudbees.plugins.credentials.Credentials from {"scope":"GLOBAL","keyStoreSource":{"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFGkmhFTZO9yAz4/xgy8BoPv/uw2G1IbHu+PXSvJpOob0Xf9Y7F1EmnZ6h7IZ2Yws/qoMDiCnPds5rB4dnrrpoFzYx1dWl3yOV+G/lguOdZCmaaOLNEux0JcX/hQvK067AS7Gw0V4KMxaHQNPX4kKQrPO7+1C6hUyF1BEppjuO9zjy4LymkkNPJHvrHarkgfxrFcnIaYRQrwGNKqp2zxcbGbY29f02CIpeap14ULo6anbX/HHxc5L2TS8F1ybz/TvF/HhKT+Y3BRe61Q/81xQeAqEVwWSMJkUIXtNsRVLwkHEhr1dnnoilmZxLe7zBEf8vLoCKlH9BYKIziSmhRBBupUyTnxVZwtJ7Sx8VbzkjVbgtzmWECBrLUk5iU1oTmM7O842FoDW2uyvAR4p8nBxTHihrCG+5rDl6Vhu/d9zG98F+DK52c1locZak+tF9fN5CDHLqtUoL8tzNhHeETS8zoVJbHkoeT/gMesfUusDaj9NgTzmxN8KOZLUavJWE1GlSmVnbGrYQkrJkNNfqiwdfydrR/u16sx0VGgKsueOFVy1MMoALeMycgjX4akq1zPY5W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Ddz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"},"password":"changeit","id":"my-certificate","description":"my-certificate","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"}
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
          	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
          	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
          	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
          	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:80)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
          	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
          	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
          	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
          	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
          	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
          	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
          	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
          	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
          	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
          	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
          	at org.eclipse.jetty.server.Server.handle(Server.java:499)
          	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
          	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
          	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
          	at java.lang.Thread.run(Thread.java:745)
          Caused by: java.lang.IllegalArgumentException: Failed to instantiate interface com.cloudbees.plugins.credentials.Credentials from {"scope":"GLOBAL","keyStoreSource":{"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFGkmhFTZO9yAz4/xgy8BoPv/uw2G1IbHu+PXSvJpOob0Xf9Y7F1EmnZ6h7IZ2Yws/qoMDiCnPds5rB4dnrrpoFzYx1dWl3yOV+G/lguOdZCmaaOLNEux0JcX/hQvK067AS7Gw0V4KMxaHQNPX4kKQrPO7+1C6hUyF1BEppjuO9zjy4LymkkNPJHvrHarkgfxrFcnIaYRQrwGNKqp2zxcbGbY29f02CIpeap14ULo6anbX/HHxc5L2TS8F1ybz/TvF/HhKT+Y3BRe61Q/81xQeAqEVwWSMJkUIXtNsRVLwkHEhr1dnnoilmZxLe7zBEf8vLoCKlH9BYKIziSmhRBBupUyTnxVZwtJ7Sx8VbzkjVbgtzmWECBrLUk5iU1oTmM7O842FoDW2uyvAR4p8nBxTHihrCG+5rDl6Vhu/d9zG98F+DK52c1loc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yGto90InOKIxHSkZzOlNzA58BioWOXm1dGTdEqhJExoACmKD3Hi/vWZNdLO5qLqvR2cdxcpKSmCh9wzfA8BwcmVlKGOrLRAqqlIWcRAb3QHQfKj8pIt8voZvV76+wxfUDUpk3pP9PDdz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"},"password":"changeit","id":"my-certificate","description":"my-certificate","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"}
          	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:676)
          	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
          	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:474)
          	at com.cloudbees.plugins.credentials.CredentialsStoreAction$DomainWrapper.doCreateCredentials(CredentialsStoreAction.java:777)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:498)
          	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
          	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52)
          	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
          	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
          	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
          	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
          	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          	... 66 more
          Caused by: java.lang.IllegalArgumentException: Failed to convert the keyStoreSource parameter of the constructor public com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl(com.cloudbees.plugins.credentials.CredentialsScope,java.lang.String,java.lang.String,java.lang.String,com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource)
          	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:773)
          	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
          	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:674)
          	... 81 more
          Caused by: java.lang.IllegalArgumentException: Failed to instantiate class com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource from {"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFGkmhFTZO9yAz4/xgy8BoPv/uw2G1IbHu+PXSvJpOob0Xf9Y7F1EmnZ6h7IZ2Yws/qoMDiCnPds5rB4dnrrpoFzYx1dWl3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00OliSijdafRt5q1u7zhYpzOfPRddj0Ycj2q8c2wuuCW5PGYyOg7/RvlY+CuBoS+Id8cj+JQm3XHpmixm4M3KGBcV2rkIIIn5kb3EVxXTdWstY37rGOXnEwooxltjy34UF9TKv7US27048Bj1YGvc8zIJzOdGQOV8WyYta30JMTQ/u7/kTc9NSBWS5PI8VQu2rKcmr2V+MQzC+VvsWUNcLqgUIogYo3vfvVJmH/eskVHT/xLbmqrjPqTtHUokYDPvhvsAOwm8zJ3hUyXnNQ9xt9kokZ5Y+cpYOueDnKK4+6bRUEailFuW0YiSx7kcr1Njb12v/VPm/P2gwzvtQfUj4CyGto90InOKIxHSkZzOlNzA58BioWOXm1dGTdEqhJExoACmKD3Hi/vWZNdLO5qLqvR2cdxcpKSmCh9wzfA8BwcmVlKGOrLRAqqlIWcRAb3QHQfKj8pIt8voZvV76+wxfUDUpk3pP9PDdz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"}
          	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:676)
          	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
          	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:771)
          	... 83 more
          Caused by: java.lang.IllegalArgumentException: Failed to convert the uploadedKeystore parameter of the constructor public com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource(com.cloudbees.plugins.credentials.SecretBytes)
          	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:773)
          	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
          	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:674)
          	... 85 more
          Caused by: java.lang.IllegalArgumentException: Unable to convert to class com.cloudbees.plugins.credentials.SecretBytes
          	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:731)
          	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
          	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:771)
          	... 87 more
          
          Show
          cleclerc Cyrille Le Clerc added a comment - - edited After applying PR#81 Bump parent pom from jenkins:2.10 to jenkins:2.21 , running " mvn -Djenkins.version=2.7.4 hpi:run ", I get the same exception following the same test path: javax.servlet.ServletException: java.lang.IllegalArgumentException: Failed to instantiate interface com.cloudbees.plugins.credentials.Credentials from {"scope":"GLOBAL","keyStoreSource":{"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFGkmhFTZO9yAz4/xgy8BoPv/uw2G1IbHu+PXSvJpOob0Xf9Y7F1EmnZ6h7IZ2Yws/qoMDiCnPds5rB4dnrrpoFzYx1dWl3yOV+G/lguOdZCmaaOLNEux0JcX/hQvK067AS7Gw0V4KMxaHQNPX4kKQrPO7+1C6hUyF1BEppjuO9zjy4LymkkNPJHvrHarkgfx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kb3EVxXTdWstY37rGOXnEwooxltjy34UF9TKv7US27048Bj1YGvc8zIJzOdGQOV8WyYta30JMTQ/u7/kTc9NSBWS5PI8VQu2rKcmr2V+MQzC+VvsWUNcLqgUIogYo3vfvVJmH/eskVHT/xLbmqrjPqTtHUokYDPvhvsAOwm8zJ3hUyXnNQ9xt9kokZ5Y+cpYOueDnKK4+6bRUEailFuW0YiSx7kcr1Njb12v/VPm/P2gwzvtQfUj4CyGto90InOKIxHSkZzOlNzA58BioWOXm1dGTdEqhJExoACmKD3Hi/vWZNdLO5qLqvR2cdxcpKSmCh9wzfA8BwcmVlKGOrLRAqqlIWcRAb3QHQfKj8pIt8voZvV76+wxfUDUpk3pP9PDdz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"},"password":"changeit","id":"my-certificate","description":"my-certificate","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"} at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:80) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Failed to instantiate interface com.cloudbees.plugins.credentials.Credentials from {"scope":"GLOBAL","keyStoreSource":{"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFGkmhFTZO9yAz4/xgy8BoPv/uw2G1IbHu+PXSvJpOob0Xf9Y7F1EmnZ6h7IZ2Yws/qoMDiCnPds5rB4dnrrpoFzYx1dWl3yOV+G/lguOdZCmaaOLNEux0JcX/hQvK067AS7Gw0V4KMxaHQNPX4kKQrPO7+1C6hUyF1BEppjuO9zjy4LymkkNPJHvrHarkgfxrFcnIaYRQrwGNKqp2zxcbGbY29f02CIpeap14ULo6anbX/HHxc5L2TS8F1ybz/TvF/HhKT+Y3BRe61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NSBWS5PI8VQu2rKcmr2V+MQzC+VvsWUNcLqgUIogYo3vfvVJmH/eskVHT/xLbmqrjPqTtHUokYDPvhvsAOwm8zJ3hUyXnNQ9xt9kokZ5Y+cpYOueDnKK4+6bRUEailFuW0YiSx7kcr1Njb12v/VPm/P2gwzvtQfUj4CyGto90InOKIxHSkZzOlNzA58BioWOXm1dGTdEqhJExoACmKD3Hi/vWZNdLO5qLqvR2cdxcpKSmCh9wzfA8BwcmVlKGOrLRAqqlIWcRAb3QHQfKj8pIt8voZvV76+wxfUDUpk3pP9PDdz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"},"password":"changeit","id":"my-certificate","description":"my-certificate","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:676) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:474) at com.cloudbees.plugins.credentials.CredentialsStoreAction$DomainWrapper.doCreateCredentials(CredentialsStoreAction.java:777) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) ... 66 more Caused by: java.lang.IllegalArgumentException: Failed to convert the keyStoreSource parameter of the constructor public com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl(com.cloudbees.plugins.credentials.CredentialsScope,java.lang.String,java.lang.String,java.lang.String,com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:773) at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:674) ... 81 more Caused by: java.lang.IllegalArgumentException: Failed to instantiate class com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource from {"value":"1","uploadedKeystore":"MIIGegIBAzCCBkAGCSqGSIb3DQEHAaCCBjEEggYtMIIGKTCCAw8GCSqGSIb3DQEHBqCCAwAwggL8AgEAMIIC9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIlyBLvtXN5nACAggAgIICyEwxMBP/+B4slNrMNsiCwGVRCsAlbtz83hBEClpinxnYDe4BBMaDfRRRnZlWDToEOsmTkoRTJikkfFG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BS0nhQxk2Ly8CjR7ilxt92NznjX6xiwbUCGfcM3VWaz4DYj0dpJ696vyMI0jB4JNZHK3y3mer+LEmXDfz/R+RTDsVo/ynE/LF00OliSijdafRt5q1u7zhYpzOfPRddj0Ycj2q8c2wuuCW5PGYyOg7/RvlY+CuBoS+Id8cj+JQm3XHpmixm4M3KGBcV2rkIIIn5kb3EVxXTdWstY37rGOXnEwooxltjy34UF9TKv7US27048Bj1YGvc8zIJzOdGQOV8WyYta30JMTQ/u7/kTc9NSBWS5PI8VQu2rKcmr2V+MQzC+VvsWUNcLqgUIogYo3vfvVJmH/eskVHT/xLbmqrjPqTtHUokYDPvhvsAOwm8zJ3hUyXnNQ9xt9kokZ5Y+cpYOueDnKK4+6bRUEailFuW0YiSx7kcr1Njb12v/VPm/P2gwzvtQfUj4CyGto90InOKIxHSkZzOlNzA58BioWOXm1dGTdEqhJExoACmKD3Hi/vWZNdLO5qLqvR2cdxcpKSmCh9wzfA8BwcmVlKGOrLRAqqlIWcRAb3QHQfKj8pIt8voZvV76+wxfUDUpk3pP9PDdz5Ae3QP2v2Z0aTaHKjLNxulbHRCwW+MSE+wOJWhIbA9bICNO7VwbrYKVNTrHjkNh2whUBwgsE2Msa0Htgs6HgbWeMbDdNUnic+9kGCPCY/nQCnqWxh6fE21notHEQZvjnn1v0zEK7DCTFp/ejWuq/3FcHIViRoRJJvlbBjKb+zKfTlTN2jgL7Hqq6V/n0xPjAXBgkqhkiG9w0BCRQxCh4IAG4AbwBuAGUwIwYJKoZIhvcNAQkVMRYEFFwJgioig3q9dDV6xo6vEGdZryR5MDEwITAJBgUrDgMCGgUABBS5aqOqUR6kIld8peywddkZ7aqH2gQIzGwG2EFFsJ4CAggA","stapler-class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource","$class":"com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:676) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:771) ... 83 more Caused by: java.lang.IllegalArgumentException: Failed to convert the uploadedKeystore parameter of the constructor public com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource(com.cloudbees.plugins.credentials.SecretBytes) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:773) at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:674) ... 85 more Caused by: java.lang.IllegalArgumentException: Unable to convert to class com.cloudbees.plugins.credentials.SecretBytes at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:731) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:771) ... 87 more
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          According to https://github.com/stapler/stapler/blob/stapler-parent-1.243/core/src/main/java/org/kohsuke/stapler/Stapler.java#L1093 , we need a "StaplerConverterImpl" for "com.cloudbees.plugins.credentials.SecretBytes"

              public static Converter lookupConverter(Class type) {
                  Converter c = CONVERT_UTILS.lookup(type);
                  if (c!=null) return c;
                  // fall back to compatibility behavior
                  c = ConvertUtils.lookup(type);
                  if (c!=null)    return c;
          
                  // look for the associated converter
                  try {
                      if(type.getClassLoader()==null)
                          return null;
                      Class<?> cl = type.getClassLoader().loadClass(type.getName() + "$StaplerConverterImpl");
                      c = (Converter)cl.newInstance();
                      CONVERT_UTILS.register(c,type);
                      return c;
                  } catch (ClassNotFoundException e) {
                      // fall through
                  } catch (IllegalAccessException e) {
                      IllegalAccessError x = new IllegalAccessError();
                      x.initCause(e);
                      throw x;
                  } catch (InstantiationException e) {
                      InstantiationError x = new InstantiationError();
                      x.initCause(e);
                      throw x;
                  }
          
                  // bean utils doesn't check the super type, so converters that apply to multiple types
                  // need to be handled outside its semantics
                  if (Enum.class.isAssignableFrom(type)) { // enum
                      return ENUM_CONVERTER;
                  }
          
                  return null;
              }
          
          Show
          cleclerc Cyrille Le Clerc added a comment - According to https://github.com/stapler/stapler/blob/stapler-parent-1.243/core/src/main/java/org/kohsuke/stapler/Stapler.java#L1093 , we need a "StaplerConverterImpl" for "com.cloudbees.plugins.credentials.SecretBytes" public static Converter lookupConverter( Class type) { Converter c = CONVERT_UTILS.lookup(type); if (c!= null ) return c; // fall back to compatibility behavior c = ConvertUtils.lookup(type); if (c!= null ) return c; // look for the associated converter try { if (type.getClassLoader()== null ) return null ; Class <?> cl = type.getClassLoader().loadClass(type.getName() + "$StaplerConverterImpl" ); c = (Converter)cl.newInstance(); CONVERT_UTILS.register(c,type); return c; } catch (ClassNotFoundException e) { // fall through } catch (IllegalAccessException e) { IllegalAccessError x = new IllegalAccessError(); x.initCause(e); throw x; } catch (InstantiationException e) { InstantiationError x = new InstantiationError(); x.initCause(e); throw x; } // bean utils doesn't check the super type, so converters that apply to multiple types // need to be handled outside its semantics if (Enum. class. isAssignableFrom(type)) { // enum return ENUM_CONVERTER; } return null ; }
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Strange, "com.cloudbees.plugins.credentials.SecretBytes" is supposed to register a Stapler converter:

          https://github.com/jenkinsci/credentials-plugin/blob/d48b986efbce992da133c4be90b35e096b693c7c/src/main/java/com/cloudbees/plugins/credentials/SecretBytes.java#L363-L363

          /*
           * Register a converter for Stapler form binding.
           */
          static {
              Stapler.CONVERT_UTILS.register(new org.apache.commons.beanutils.Converter() {
                  /**
                   * {@inheritDoc}
                   */
                  public SecretBytes convert(Class type, Object value) {
                      return SecretBytes.fromString(value.toString());
                  }
              }, SecretBytes.class);
          }
          
          Show
          cleclerc Cyrille Le Clerc added a comment - Strange, " com.cloudbees.plugins.credentials.SecretBytes " is supposed to register a Stapler converter: https://github.com/jenkinsci/credentials-plugin/blob/d48b986efbce992da133c4be90b35e096b693c7c/src/main/java/com/cloudbees/plugins/credentials/SecretBytes.java#L363-L363 /* * Register a converter for Stapler form binding. */ static { Stapler.CONVERT_UTILS.register( new org.apache.commons.beanutils.Converter() { /** * {@inheritDoc} */ public SecretBytes convert( Class type, Object value) { return SecretBytes.fromString(value.toString()); } }, SecretBytes.class); }
          Show
          cleclerc Cyrille Le Clerc added a comment - Stephen Connolly see https://github.com/jenkinsci/credentials-plugin/pull/82
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          src/main/java/com/cloudbees/plugins/credentials/SecretBytes.java
          http://jenkins-ci.org/commit/credentials-plugin/03b497e4924644e16fa4a8457e76fabac619463b
          Log:
          JENKINS-41946 Fix "IllegalArgumentException: Unable to convert to class com.cloudbees.plugins.credentials.SecretBytes"

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: src/main/java/com/cloudbees/plugins/credentials/SecretBytes.java http://jenkins-ci.org/commit/credentials-plugin/03b497e4924644e16fa4a8457e76fabac619463b Log: JENKINS-41946 Fix "IllegalArgumentException: Unable to convert to class com.cloudbees.plugins.credentials.SecretBytes"
          Hide
          recampbell Ryan Campbell added a comment -

          Fixed in credentials-2.1.12

          Show
          recampbell Ryan Campbell added a comment - Fixed in credentials-2.1.12

            People

            Assignee:
            stephenconnolly Stephen Connolly
            Reporter:
            cleclerc Cyrille Le Clerc
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: