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

2.489 fails to compress artifacts with a stack trace

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 2.589
      Compress artifacts 109.v98a_db_d3cb_72c
      Other plugins as noted in attached plugins.txt file

      The compress artifacts plugin 109.v98a_db_d3cb_72c and earlier fails and reports a stack trace when run with Jenkins 2.489 and later. The stack trace includes:

      2024-12-10 20:46:04.938+0000 [id=77]    WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 76708d5b-5ac8-4994-898c-6293b87aba43
      org.apache.commons.jelly.JellyTagException: jar:file:/home/mwaite/bugs/JENKINS-xxxxx/war/WEB-INF/lib/jenkins-core-2.489.jar!/hudson/model/Job/index.jelly:62:39: <st:include> org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream
      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream
      Caused by: java.lang.ClassNotFoundException: org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream
      

      The commons compress library was removed from Jenkins 2.489. The compress artifacts plugin needs to be updated to use the commons compress API plugin instead of directly relying on the commons compress library

      Showing the issue

      Steps to show the issue:

      1. Create a plugins.txt file that lists the precise plugins installed and uncomment the broken version of compress-artifacts and comment the incremental version
      2. Create a jenkins.model.ArtifactManagerConfiguration.xml file that enables compression of all archived artifacts
      3. Create a run-jenkins.sh shell script that downloads Jenkins 2.489 and downloads the plugins defined in plugins.txt
      4. Run the run-jenkins.sh shell script and complete the setup wizard by creating a new user and installing no additional plugins
      5. Create a Pipeline job
        pipeline {
            agent any
            stages {
                stage('Archive-datefile') {
                    steps {
                        sh "(echo $BUILD_ID;  date) >> datefile"
                        archiveArtifacts artifacts: 'datefile'
                    }
                }
            }
        }
        
      6. Run the Pipeline job. It will fail with a stack trace when using compress-artifacts 109.x. It will pass when using compress-artifacts incremental 111.x

          [JENKINS-74977] 2.489 fails to compress artifacts with a stack trace

          Mark Waite added a comment - - edited

          An incremental build of the plugin is available from

          Download link:

          Plugin Installation Manager input format: (documentation)

          • compress-artifacts:incrementals;org.jenkins-ci.plugins;111.vc48158612994

          Mark Waite added a comment - - edited An incremental build of the plugin is available from Download link: compress-artifacts Plugin Installation Manager input format: ( documentation ) compress-artifacts:incrementals;org.jenkins-ci.plugins;111.vc48158612994

            markewaite Mark Waite
            markewaite_comcast Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: