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

ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.182
      ArtifactDeployer 1.2
      Ubuntu 16.04 LTS
      OpenJDK 1.8.0_212-8u212-b03-0ubuntu1.16.04.1-b03

      All of my jobs that use ArtifactDeployer have started failing with the following error since June 18 (which is probably when I updated all the plugin versions before leaving for a nice vacation):

      Archiving artifacts
      [ArtifactDeployer] - Starting deployment from the post-action ...
      ERROR: Step ‘[ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations’ aborted due to exception:
      java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat
      at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44)
      at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87)
      at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21)
      at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75)
      at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60)
      at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:568)
      at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy.copyAndGetNumbers(LocalCopy.java:83)
      at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:71)
      at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:41)
      at hudson.FilePath.act(FilePath.java:1078)
      at hudson.FilePath.act(FilePath.java:1061)
      at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.processDeployment(ArtifactDeployerPublisher.java:204)
      at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher._perform(ArtifactDeployerPublisher.java:130)
      at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.perform(ArtifactDeployerPublisher.java:99)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1843)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)

       

          [JENKINS-58211] ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

          Matthias Kraft added a comment - - edited

          I am on the LTS versions of Jenkins. Upgrading to 2.290.1 now gives me the same stack trace cmolson mentioned.

          Update:
          After installing the Build Symlink plugin the "NoSuchFieldError: SIZE" changed into the OP's "NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat".

          Matthias Kraft added a comment - - edited I am on the LTS versions of Jenkins. Upgrading to 2.290.1 now gives me the same stack trace cmolson mentioned. Update: After installing the Build Symlink plugin the "NoSuchFieldError: SIZE" changed into the OP's "NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat".

          Marco Menzel added a comment -

          I've reproduced this bug on 2.190.3 and 2.209. 
          Every time I want to use the plugin [ArtifactDeployer] on a centOs build-slave.

          Is this something the developers of the plugin have to fix?

          Marco Menzel added a comment - I've reproduced this bug on 2.190.3 and 2.209.  Every time I want to use the plugin [ArtifactDeployer] on a centOs build-slave. Is this something the developers of the plugin have to fix?

          Markus Winter added a comment -

          There is already a pull request open that fixes the issue

          Markus Winter added a comment - There is already a pull request open that fixes the issue

          Joe Mihalich added a comment -

          any idea when that's going to happen?

          Joe Mihalich added a comment - any idea when that's going to happen?

          Libor Ukropec added a comment -

          I also use LTS version, I postponed upgrade just because of this issue  - I'm also curious when the fix will be included.

          Libor Ukropec added a comment - I also use LTS version, I postponed upgrade just because of this issue  - I'm also curious when the fix will be included.

          Can someone please comment whether ArtifactDeployer 1.2 works with LTS versions later than 2.180? I've delayed upgrading because of this issue.

          Maureen Dorotich added a comment - Can someone please comment whether ArtifactDeployer 1.2 works with LTS versions later than 2.180? I've delayed upgrading because of this issue.

          It is still broken in 2.220 if you update. 

          There is another ticket here that references a pull-request exits: JENKINS-60756

          My co-worker got our version working following these steps, but it involves manually building a new plugin:

          (Copied from what he told me)
          I've checked out this repo and built the plugin locally, following this guide roughly: https://dzone.com/articles/implementing-a-jenkins-plugin-from-scratch-in-5-st
           
          Then I uploaded the plugin .hpi file to Jenkins and installed it manually in the "Advanced" tab under "Manage Plugins".
           __ 
          It now seems to work
           
           
           

           

           

           

          Christian Molson added a comment - It is still broken in 2.220 if you update.  There is another ticket here that references a pull-request exits: JENKINS-60756 My co-worker got our version working following these steps, but it involves manually building a new plugin: (Copied from what he told me) I've checked out this repo and built the plugin locally, following this guide roughly:  https://dzone.com/articles/implementing-a-jenkins-plugin-from-scratch-in-5-st   Then I uploaded the plugin .hpi file to Jenkins and installed it manually in the "Advanced" tab under "Manage Plugins".  __  It now seems to work            

          cmolson, thanks for this info!

          Maureen Dorotich added a comment - cmolson , thanks for this info!

          Joe Mihalich added a comment -

            I think the pull request is out of Jenkin's hands at this point.  The owner of the plugin repo has to approve the pull and merge in the changes and release a new version.  Since there's been no response to the pull request we have to assume the plugin/github repo is abandoned.  The only options at this point are to build the latest manually, or use another newer plugin that gives similar functionality.  There are some others out there.  

          Joe Mihalich added a comment -   I think the pull request is out of Jenkin's hands at this point.  The owner of the plugin repo has to approve the pull and merge in the changes and release a new version.  Since there's been no response to the pull request we have to assume the plugin/github repo is abandoned.  The only options at this point are to build the latest manually, or use another newer plugin that gives similar functionality.  There are some others out there.  

          As you can see on github this PR triggered an automatic build available here :
          https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fartifactdeployer-plugin/detail/PR-13/2/artifacts/

          I tested with this one and everything seems to work as intended with the new versions of Jenkins.

          Thank you cmolson to have brought to my attention this pull request.

           

          Raphaël BERGERET added a comment - As you can see on github this PR triggered an automatic build available here : https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fartifactdeployer-plugin/detail/PR-13/2/artifacts/ I tested with this one and everything seems to work as intended with the new versions of Jenkins. Thank you cmolson to have brought to my attention this pull request.  

            seanturner83 Sean Turner
            mgedmin Marius Gedminas
            Votes:
            14 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated: