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

.hpi versus .jpi causes inability to upgrade Subversion Plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None
    • Ubuntu 11.10, OpenJDK 1.6.0_23, Tomcat 7.0.21, Jenkins 1.448 & 1.449
      Jenkins 1.456 on Windows Server 2003 64-bit, Sun JDK 6.0.260.3

      Reproduction:
      $JENKINS_HOME/plugins: subversion (directory), subversion.hpi
      1) Open http://<root>/pluginManager. Update Subversion plugin from 1.34 -> 1.37 using download now and install after restart button.
      $JENKINS_HOME/plugins: subversion (directory), subversion.bak (1.34), subversion.hpi.pinned, subversion.jpi (1.37)
      2) Restart Tomcat/Jenkins
      $JENKINS_HOME/plugins: subversion (directory), subversion.bak (1.34), subversion.hpi (1.34) subversion.hpi.pinned, subversion.jpi (1.37)
      3) PluginManager still reports old version

      Should note that the logs report:
      INFO: Ignoring /ci/jenkins-home/plugins/subversion.jpi because /ci/jenkins-home/plugins/subversion.hpi is already loaded

      Also the plugin is broken at this point with a NoClassDefFound on org/tmatesoft/svn/core/SVNException

      Clean State:
      1) /etc/init.d/tomcat7 stop
      2) cd $JENKINS_HOME/plugins
      3) rm subversion*
      4) /etc/init.d/tomcat7 start

      Workaround:
      1) Restore clean state
      2) Update plugin
      3) Stop tomcat/jenkins
      4) cd $JENKINS_HOME/plugins
      5) mv subversion.jpi subversion.hpi
      6) Start tomcat/jenkins

          [JENKINS-12514] .hpi versus .jpi causes inability to upgrade Subversion Plugin

          Alex Lehmann added a comment -

          fixed with JENKINS-13129

          Alex Lehmann added a comment - fixed with JENKINS-13129

          Reynald Borer added a comment -

          Still happening with Jenkins 1.458 running under debian squeeze (with the debian package).

          Reynald Borer added a comment - Still happening with Jenkins 1.458 running under debian squeeze (with the debian package).

          Bill Hazard added a comment -

          for those seeking a workaround:

          rm WEB-INF/plugins/subversion.hpi and re-install via Manage Plugins

          ditto for cvs and translation

          Bill Hazard added a comment - for those seeking a workaround: rm WEB-INF/plugins/subversion.hpi and re-install via Manage Plugins ditto for cvs and translation

          Lyle Lee added a comment -

          Must be consider about upgrade subversion plugin by hand without internet connection.

          Following the instruction on wiki page, restarting the server with jenkins.war after putting subversion.hpi in $JENKINS_HOME/plugins overwrites just copied new version with old one included in jenkins.war.

          I found that this problem can be solved by removing $JENKINS_HOME/war/WEB-INF/plugins/subversion.hpi before restarting the server. But it's not general way and also conflicts over wiki instruction.

          Lyle Lee added a comment - Must be consider about upgrade subversion plugin by hand without internet connection. Following the instruction on wiki page, restarting the server with jenkins.war after putting subversion.hpi in $JENKINS_HOME/plugins overwrites just copied new version with old one included in jenkins.war. I found that this problem can be solved by removing $JENKINS_HOME/war/WEB-INF/plugins/subversion.hpi before restarting the server. But it's not general way and also conflicts over wiki instruction.

          Nikhil Vasaikar added a comment - - edited

          I am facing a similar issue, when uploading a new hpi file. The plugin gets uploaded form the Advanced Tab. I can see the .jpi file and the exploded folder under JENKINS_HOME\plugins. I restarted Jenkins.

          When I go on the Configure screen, I can't see my plugin options, as if the plugin was never installed.

          Jenkins version : 1.488

          Nikhil Vasaikar added a comment - - edited I am facing a similar issue, when uploading a new hpi file. The plugin gets uploaded form the Advanced Tab. I can see the .jpi file and the exploded folder under JENKINS_HOME\plugins. I restarted Jenkins. When I go on the Configure screen, I can't see my plugin options, as if the plugin was never installed. Jenkins version : 1.488

          Oleg Nenashev added a comment -

          Does anyone see the issue on newest Jenkins versions (1.532+)?

          Oleg Nenashev added a comment - Does anyone see the issue on newest Jenkins versions (1.532+)?

          No further input. Closing.

          Kohsuke Kawaguchi added a comment - No further input. Closing.

          Yes, I still see this happening on the latest lts (1.565.2)
          Also for the credentials plugin

          Nico Mommaerts added a comment - Yes, I still see this happening on the latest lts (1.565.2) Also for the credentials plugin

          Martin Smith added a comment - - edited

          Hello! I'm still seeing this on the latest Jenkins LTS 1.609.3 (2015/09/02) as well. I've documented a lot of it in an issue filed against the Chef cookbook for Jenkins at https://github.com/chef-cookbooks/jenkins/issues/406, but the core of the issue is this:

          # sha256sum /var/chef/cache/cvs-2.12.plugin 
          6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba  /var/chef/cache/cvs-2.12.plugin
          
          # unzip /var/chef/cache/cvs-2.12.plugin
          # grep -i plugin-version META-INF/MANIFEST.MF 
          Plugin-Version: 2.12
          
          # sha256sum /var/lib/jenkins/plugins/cvs.jpi 
          6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba  cvs.jpi
          
          # grep -i plugin-version /var/lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF 
          Plugin-Version: 2.11
          
          # mv /var/lib/jenkins/war/WEB-INF/plugins/cvs.hpi /tmp/nonchef-cvs.hpi
          
          # service jenkins restart
          ok: run: jenkins: (pid 14918) 1s
          
          # grep -i plugin-version /var/lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF 
          Plugin-Version: 2.12
          

          As you can see, Jenkins won't upgrade the plugin, even though it's a newer version, until I manually remove the .hpi and restart Jenkins.

          Martin Smith added a comment - - edited Hello! I'm still seeing this on the latest Jenkins LTS 1.609.3 (2015/09/02) as well. I've documented a lot of it in an issue filed against the Chef cookbook for Jenkins at https://github.com/chef-cookbooks/jenkins/issues/406 , but the core of the issue is this: # sha256sum / var /chef/cache/cvs-2.12.plugin 6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba / var /chef/cache/cvs-2.12.plugin # unzip / var /chef/cache/cvs-2.12.plugin # grep -i plugin-version META-INF/MANIFEST.MF Plugin-Version: 2.12 # sha256sum / var /lib/jenkins/plugins/cvs.jpi 6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba cvs.jpi # grep -i plugin-version / var /lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF Plugin-Version: 2.11 # mv / var /lib/jenkins/war/WEB-INF/plugins/cvs.hpi /tmp/nonchef-cvs.hpi # service jenkins restart ok: run: jenkins: (pid 14918) 1s # grep -i plugin-version / var /lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF Plugin-Version: 2.12 As you can see, Jenkins won't upgrade the plugin, even though it's a newer version, until I manually remove the .hpi and restart Jenkins.

          Daniel Beck added a comment -

          Whatever that is, it's probably a different problem than the one reported almost four years ago.

          Daniel Beck added a comment - Whatever that is, it's probably a different problem than the one reported almost four years ago.

            kohsuke Kohsuke Kawaguchi
            acharlieh Charlie Huggard
            Votes:
            18 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:
              Resolved: