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

Artifactory plugin asks to serialize an inner class from the git client plugin

    Details

    • Similar Issues:
    • Released As:
      git client plugin 3.3.2

      Description

      Artifactory plugin attempts to serialize one of the inner classes from the git client plugin. That inner class is not serializable. The class is an implementation of CheckoutCommand. It has never been serializable as far as I can tell.

      org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9 is not serializable causing hudson.remoting.RemotingSystemException

      ERROR: Processing failed due to a bug in the code. Please report this to the issue tracker (https://jenkins.io/redirect/report-an-issue).
      hudson.remoting.RemotingSystemException: java.lang.ClassCastException: class org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9 is returned from public abstract org.jenkinsci.plugins.gitclient.CheckoutCommand org.jenkinsci.plugins.gitclient.GitClient.checkout() on class hudson.plugins.git.GitAPI but it's not serializable
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:938)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:905)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:857)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:369)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:117)
      	at java.lang.Thread.run(Thread.java:745)
      	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from <redacted>
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1737)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      		at hudson.remoting.Channel.call(Channel.java:951)
      		at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:285)
      		at com.sun.proxy.$Proxy99.checkout(Unknown Source)
      		at org.jenkinsci.plugins.gitclient.RemoteGitImpl.checkout(RemoteGitImpl.java:309)
      		at org.jfrog.hudson.release.scm.git.GitManager.checkoutBranch(GitManager.java:72)
      		at org.jfrog.hudson.release.scm.git.GitCoordinator.beforeReleaseVersionChange(GitCoordinator.java:93)
      		at org.jfrog.hudson.release.maven.MavenReleaseWrapper.setUp(MavenReleaseWrapper.java:178)
      		at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:667)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      		at hudson.model.Run.execute(Run.java:1853)
      		at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      		at hudson.model.ResourceController.execute(ResourceController.java:97)
      		at hudson.model.Executor.run(Executor.java:428)
      Caused by: java.lang.ClassCastException: class org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9 is returned from public abstract org.jenkinsci.plugins.gitclient.CheckoutCommand org.jenkinsci.plugins.gitclient.GitClient.checkout() on class hudson.plugins.git.GitAPI but it's not serializable
      	... 12 more
      

        Attachments

          Activity

          Hide
          jmmccullough John McCullough added a comment -

          I encountered the same error attempting to use the "Artifactory Release Staging" feature of the Artifactory plugin with a maven 3 job.

          Jenkins: 2.222.4
          Git Client Plugin: 3.2.1
          Artifactory Plugin: 3.6.2
          Remote runner is using Unix slave, version 4.2.1 on OpenJDK 1.8.0_252-b09 on CentOS 7

          ERROR: Processing failed due to a bug in the code. Please report this to the issue tracker (https://jenkins.io/redirect/report-an-issue).
          hudson.remoting.RemotingSystemException: java.lang.ClassCastException: class org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9 is returned from public abstract org.jenkinsci.plugins.gitclient.CheckoutCommand org.jenkinsci.plugins.gitclient.GitClient.checkout() on class hudson.plugins.git.GitAPI but it's not serializable
              at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:938)
              at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:905)
              at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:857)
              at hudson.remoting.UserRequest.perform(UserRequest.java:211)
              at hudson.remoting.UserRequest.perform(UserRequest.java:54)
              at hudson.remoting.Request$2.run(Request.java:369)
              at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
              Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to dapajenkin202
                  at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788)
                  at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
                  at hudson.remoting.Channel.call(Channel.java:998)
                  at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:285)
                  at com.sun.proxy.$Proxy86.checkout(Unknown Source)
                  at org.jenkinsci.plugins.gitclient.RemoteGitImpl.checkout(RemoteGitImpl.java:309)
                  at org.jfrog.hudson.release.scm.git.GitManager.checkoutBranch(GitManager.java:72)
                  at org.jfrog.hudson.release.scm.git.GitCoordinator.beforeReleaseVersionChange(GitCoordinator.java:93)
                  at org.jfrog.hudson.release.maven.MavenReleaseWrapper.setUp(MavenReleaseWrapper.java:178)
                  at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:667)
                  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
                  at hudson.model.Run.execute(Run.java:1856)
                  at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
                  at hudson.model.ResourceController.execute(ResourceController.java:97)
                  at hudson.model.Executor.run(Executor.java:428)
          Caused by: java.lang.ClassCastException: class org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9 is returned from public abstract org.jenkinsci.plugins.gitclient.CheckoutCommand org.jenkinsci.plugins.gitclient.GitClient.checkout() on class hudson.plugins.git.GitAPI but it's not serializable
              ... 11 more
          Show
          jmmccullough John McCullough added a comment - I encountered the same error attempting to use the "Artifactory Release Staging" feature of the Artifactory plugin with a maven 3 job. Jenkins: 2.222.4 Git Client Plugin: 3.2.1 Artifactory Plugin: 3.6.2 Remote runner is using Unix slave, version 4.2.1 on OpenJDK 1.8.0_252-b09 on CentOS 7 ERROR: Processing failed due to a bug in the code. Please report this to the issue tracker (https://jenkins.io/redirect/report-an-issue). hudson.remoting.RemotingSystemException: java.lang.ClassCastException: class org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9 is returned from public abstract org.jenkinsci.plugins.gitclient.CheckoutCommand org.jenkinsci.plugins.gitclient.GitClient.checkout() on class hudson.plugins.git.GitAPI but it's not serializable at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:938) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:905) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:857) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to dapajenkin202 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) at hudson.remoting.Channel.call(Channel.java:998) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:285) at com.sun.proxy.$Proxy86.checkout(Unknown Source) at org.jenkinsci.plugins.gitclient.RemoteGitImpl.checkout(RemoteGitImpl.java:309) at org.jfrog.hudson.release.scm.git.GitManager.checkoutBranch(GitManager.java:72) at org.jfrog.hudson.release.scm.git.GitCoordinator.beforeReleaseVersionChange(GitCoordinator.java:93) at org.jfrog.hudson.release.maven.MavenReleaseWrapper.setUp(MavenReleaseWrapper.java:178) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:667) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1856) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Caused by: java.lang.ClassCastException: class org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9 is returned from public abstract org.jenkinsci.plugins.gitclient.CheckoutCommand org.jenkinsci.plugins.gitclient.GitClient.checkout() on class hudson.plugins.git.GitAPI but it's not serializable ... 11 more
          Hide
          markewaite Mark Waite added a comment -

          Unfortunately, I don't understand enough of the details to predict if the CheckoutCommand class from inside CliGitAPIImpl is expected to be serializable or not. As far as I can tell from the git history, the class implementation has not changed in many years in any way that should affect this.

          We may need investigation from the Artifactory plugin to see if they can understand what is causing the Artifactory plugin to attempt to serialize a class that is not intended to be serialized.

          Show
          markewaite Mark Waite added a comment - Unfortunately, I don't understand enough of the details to predict if the CheckoutCommand class from inside CliGitAPIImpl is expected to be serializable or not. As far as I can tell from the git history, the class implementation has not changed in many years in any way that should affect this. We may need investigation from the Artifactory plugin to see if they can understand what is causing the Artifactory plugin to attempt to serialize a class that is not intended to be serialized.
          Hide
          markewaite Mark Waite added a comment -

          Devin Nusbaum has found the likely cause of the problem, a change in git client plugin 3.1.0 that switched from using a serializable call inside RemoteGitImpl to one that is not serializable. Pull request PR-589 is the implementation of what has been learned.

          I still cannot duplicate the issue. I'd be very grateful if those who can duplicate the problem could confirm that the pull request build resolves the issue?

          Show
          markewaite Mark Waite added a comment - Devin Nusbaum has found the likely cause of the problem, a change in git client plugin 3.1.0 that switched from using a serializable call inside RemoteGitImpl to one that is not serializable. Pull request PR-589 is the implementation of what has been learned. I still cannot duplicate the issue. I'd be very grateful if those who can duplicate the problem could confirm that the pull request build resolves the issue?
          Hide
          markewaite Mark Waite added a comment -

          Andrew Potter, Ivan Suftin, John McCullough could you test drive the git client build git-client-3.3.2-rc2501.cf9ae0556f03.hpi to see if it resolves the issue in your environment? I can't duplicate the problem and would like to have at least one confirmation that the change resolves the issue.

          Devin Nusbaum is there a way to evaluate that incremental build (from the git client plugin master branch) in the test automation that detected the problem using the git validated merge plugin?

          Show
          markewaite Mark Waite added a comment - Andrew Potter , Ivan Suftin , John McCullough could you test drive the git client build git-client-3.3.2-rc2501.cf9ae0556f03.hpi to see if it resolves the issue in your environment? I can't duplicate the problem and would like to have at least one confirmation that the change resolves the issue. Devin Nusbaum is there a way to evaluate that incremental build (from the git client plugin master branch) in the test automation that detected the problem using the git validated merge plugin?
          Hide
          markewaite Mark Waite added a comment -

          Released as git client plugin 3.3.2 July 30, 2020

          Show
          markewaite Mark Waite added a comment - Released as git client plugin 3.3.2 July 30, 2020

            People

            • Assignee:
              Unassigned
              Reporter:
              apottere Andrew Potter
            • Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: