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

OpenText Application Automation Tools fail startup with Jenkins 2.459 and 2.460

      The Plugin throws an error when trying to install on a new Jenkins with version 2.460.
      We update our Jenkins weekly to avoid any security-issues etc. 

      The error breaks our build and we are not able to roll out new Jenkins-versions.

       

      Steps to repoduce:

      • run new Jenkins without plugins
      docker run --name jenkins --rm -p 8080:8080 docker.io/jenkins/jenkins:2.460-jdk17 
      • try to install hp-application-automation-tools-plugin from Plugins-Screen

      Expected:

      • Plugin can be installed without any mayor issue

      Actual:

      • log shows an error (see attached log-file for complete stacktrace)
      Caused: com.google.inject.ProvisionException: Unable to provision, see the following errors:1) [Guice/ErrorInjectingConstructor]: NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
        at GlobalEventsListenerOctaneImpl.<init>(GlobalEventsListenerOctaneImpl.java:62)Learn more:
        https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR1 error======================
      Full classname legend:
      ======================
      GlobalEventsListenerOctaneImpl: "com.microfocus.application.automation.tools.octane.events.GlobalEventsListenerOctaneImpl"
      ========================
      End of classname legend:
      ========================        at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
              at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
              at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:448)
              at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
              at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1148)
              at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:406)
              at hudson.ExtensionFinder$GuiceFinder$3.find(ExtensionFinder.java:360)
              at jenkins.ExtensionComponentSet$3.find(ExtensionComponentSet.java:98)
              at jenkins.ExtensionComponentSet$1.find(ExtensionComponentSet.java:70)
              at jenkins.ExtensionComponentSet$3.find(ExtensionComponentSet.java:98)
              at jenkins.ExtensionComponentSet$3.find(ExtensionComponentSet.java:98)
              at hudson.ExtensionList.load(ExtensionList.java:391)
              at hudson.ExtensionList.refresh(ExtensionList.java:345)
              at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2934)
              at hudson.PluginManager.start(PluginManager.java:999)
              at hudson.model.UpdateCenter$CompleteBatchJob.run(UpdateCenter.java:2369)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
              at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:121)
              at java.base/java.lang.Thread.run(Unknown Source) 

      After this, a configuration (e.g. Octane-Servers) is not possible.

       

          [JENKINS-73235] OpenText Application Automation Tools fail startup with Jenkins 2.459 and 2.460

          Mark Waite added a comment -

          I confirmed that the failure happens in 2.459 and 2.460 and does not happen in 2.458. I assume that the incorrect dependencies that are being included in the plugin will need to be fixed. JENKINS-72498 is the issue that tracks that fix

          Mark Waite added a comment - I confirmed that the failure happens in 2.459 and 2.460 and does not happen in 2.458. I assume that the incorrect dependencies that are being included in the plugin will need to be fixed. JENKINS-72498 is the issue that tracks that fix

          marco added a comment - - edited

          Do you have a hot fix for it ?, i need to have the latest Jenkins version and this issue might take a long time to fix?

          marco added a comment - - edited Do you have a hot fix for it ?, i need to have the latest Jenkins version and this issue might take a long time to fix?

          Mark Waite added a comment -

          I do not have a hot fix for it. The plugin maintainer will need to make the fix. Since application automation tools is a commercial product, you should use your support processes to request a fix from the commercial vendor.

          Mark Waite added a comment - I do not have a hot fix for it. The plugin maintainer will need to make the fix. Since application automation tools is a commercial product, you should use your support processes to request a fix from the commercial vendor.

          Daniel Horn added a comment - - edited

          We created a support request at the vendors portal
          https://portal.microfocus.com/s/customdetailpage?500Q4000008dyqwIAA=&language=en_US

           

          Thanks markewaite for the information. I assumed, the vendor also trackts this issue board.

          Daniel Horn added a comment - - edited We created a support request at the vendors portal https://portal.microfocus.com/s/customdetailpage?500Q4000008dyqwIAA=&language=en_US   Thanks markewaite for the information. I assumed, the vendor also trackts this issue board.

          It seems that 2.459 introduced commons-fileupload2-core-2.0.0-M2.jar and commons-fileupload2-javax-2.0.0-M2.jar instead of commons-fileupload-1.5.jar which was used up to version 2.458 which breaks the plugin.

          The workaround is to copy commons-fileupload-1.5.jar file into plugins `WEB-INF/lib` directory `plugins/hp-application-automation-tools-plugin/WEB-INF/lib`.

          Igor Kolomiyets added a comment - It seems that 2.459 introduced commons-fileupload2-core-2.0.0-M2.jar and commons-fileupload2-javax-2.0.0-M2.jar instead of commons-fileupload-1.5.jar which was used up to version 2.458 which breaks the plugin. The workaround is to copy commons-fileupload-1.5.jar file into plugins `WEB-INF/lib` directory `plugins/hp-application-automation-tools-plugin/WEB-INF/lib`.

          Mark Waite added a comment - - edited

          Thanks for finding a workaround ikolomiyets, that's very good to share with others.

          The switch to Commons File Upload 2.x is part of the transition to upgrade from Spring Security 5.x to Spring Security 6.x. The Spring project has announced that August 31, 2024 is the end of life of Spring Security 5.x.

          Upgrading to Spring Security 6.x requires that we upgrade to Commons File Upload 2.x, Jetty 12, and Jakarta EE 9. Each of those upgrades is a major upgrade. The upgrade to Spring Security 6.x requires Java 17. That is coming soon to Jenkins weekly as well.

          The plugin maintainer needs to fix the excessive inclusion of dependencies in the plugin so that the workaround is not needed. That is described in JENKINS-72498

          Mark Waite added a comment - - edited Thanks for finding a workaround ikolomiyets , that's very good to share with others. The switch to Commons File Upload 2.x is part of the transition to upgrade from Spring Security 5.x to Spring Security 6.x. The Spring project has announced that August 31, 2024 is the end of life of Spring Security 5.x . Upgrading to Spring Security 6.x requires that we upgrade to Commons File Upload 2.x, Jetty 12, and Jakarta EE 9. Each of those upgrades is a major upgrade. The upgrade to Spring Security 6.x requires Java 17. That is coming soon to Jenkins weekly as well. The plugin maintainer needs to fix the excessive inclusion of dependencies in the plugin so that the workaround is not needed. That is described in JENKINS-72498

          Daniel Horn added a comment -

          Thank you all, for your continuous support.
          I relayed the information back to the maintainer/vendor.

          Daniel Horn added a comment - Thank you all, for your continuous support. I relayed the information back to the maintainer/vendor.

          Basil Crow added a comment - - edited

          There is a compatibility layer here in Stapler. As long as plugins only consume org.apache.commons.fileupload.FileItem via StaplerRequest#getFileItem (and not org.apache.commons.fileupload.FileItemFactory or org.apache.commons.fileupload.disk.DiskFileItemFactory) they will get the compatibility logic even if core is running FileUpload 2. See https://github.com/jenkinsci/miniorange-saml-sp-plugin/pull/6 for an example of how to make this change. I tried to do this for hpe-application-automation-tools-plugin but the plugin doesn't even compile right now and has many other issues as Mark alluded to, so I didn't bother to submit a PR. If you don't want to use StaplerRequest#getFileItem then you can update the plugin's core baseline to one that has FileUpload 2.x (that is, a recent weekly) and then migrate from org.apache.commons.fileupload.disk.DiskFileItemFactory to org.apache.commons.fileupload2.core.DiskFileItemFactory, but that would likely be even more work given how out-of-date the parent POM is in hpe-application-automation-tools-plugin. Either way hpe-application-automation-tools-plugin needs a bit of modernization work.

          Basil Crow added a comment - - edited There is a compatibility layer here in Stapler. As long as plugins only consume org.apache.commons.fileupload.FileItem via StaplerRequest#getFileItem (and not org.apache.commons.fileupload.FileItemFactory or org.apache.commons.fileupload.disk.DiskFileItemFactory ) they will get the compatibility logic even if core is running FileUpload 2. See https://github.com/jenkinsci/miniorange-saml-sp-plugin/pull/6 for an example of how to make this change. I tried to do this for hpe-application-automation-tools-plugin but the plugin doesn't even compile right now and has many other issues as Mark alluded to, so I didn't bother to submit a PR. If you don't want to use StaplerRequest#getFileItem then you can update the plugin's core baseline to one that has FileUpload 2.x (that is, a recent weekly) and then migrate from org.apache.commons.fileupload.disk.DiskFileItemFactory to org.apache.commons.fileupload2.core.DiskFileItemFactory , but that would likely be even more work given how out-of-date the parent POM is in hpe-application-automation-tools-plugin . Either way hpe-application-automation-tools-plugin needs a bit of modernization work.

          Basil Crow added a comment -

          To summarize, yes this is a break in compatibility in core; sorry for that, but there is really nothing we can do to fix it. Core just needs to move forward here for the sake of the rest of the ecosystem, and this plugin has to adapt. I had attempted to proactively prepare this plugin but it was just too far behind the norm in core baseline, libraries, and plugin POM, and wouldn't even compile, so the maintainers need to fix that before the work can begin to make this plugin compatible with recent core changes.

          Basil Crow added a comment - To summarize, yes this is a break in compatibility in core; sorry for that, but there is really nothing we can do to fix it. Core just needs to move forward here for the sake of the rest of the ecosystem, and this plugin has to adapt. I had attempted to proactively prepare this plugin but it was just too far behind the norm in core baseline, libraries, and plugin POM, and wouldn't even compile, so the maintainers need to fix that before the work can begin to make this plugin compatible with recent core changes.

          Daniel Horn added a comment -

          I had a few mails with the vendor, who provided me with a hotfix (i checked it with our setup and seemed to work)
          Unfortunately it's 18MB, which exceeds the maximum attachment size, otherwise I would love provide it.
          Do you know a other official solution, I could upload it?

          Regarding a official drop and release of this fix, I got following answer:

          I have received feedback from the R&D Team.
          
          The most recent plugin version 24.2 has already been published one week ago. See https://plugins.jenkins.io/hp-application-automation-tools-plugin/releases/
          The Team has opened a defect ticket for this issue and marked it as Critical.
          
          The next release 24.3 will be dedicated to upgrading the plugin Java version from 8 to 21 to support the latest Jenkins versions. This upgrade of the Java will address and solve this issue in your case too. We have not released it yet because we still need deeper testing from all teams involved in the release cycle.
          
          The 24.3 indicates that the ETA is by the end of the 3rd quarter of this year. 

           

           

          Daniel Horn added a comment - I had a few mails with the vendor, who provided me with a hotfix (i checked it with our setup and seemed to work) Unfortunately it's 18MB, which exceeds the maximum attachment size, otherwise I would love provide it. Do you know a other official solution, I could upload it? Regarding a official drop and release of this fix, I got following answer: I have received feedback from the R&D Team. The most recent plugin version 24.2 has already been published one week ago. See https: //plugins.jenkins.io/hp-application-automation-tools-plugin/releases/ The Team has opened a defect ticket for this issue and marked it as Critical. The next release 24.3 will be dedicated to upgrading the plugin Java version from 8 to 21 to support the latest Jenkins versions. This upgrade of the Java will address and solve this issue in your case too. We have not released it yet because we still need deeper testing from all teams involved in the release cycle. The 24.3 indicates that the ETA is by the end of the 3rd quarter of this year.    

            buzas Laura Buzas
            dhorn Daniel Horn
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: