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

If other plugins include older jersey2 versions, gitlab-api-plugin breaks with HK2 exceptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • gitlab-api-plugin
    • None
    • Jenkins 2.332.3
      Gitlab api plugin 5.0.1-72.vb_8c272862e86
      Artifactory plugin 3.16.2

      Example exception: Exception caught: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory

      This happens because Artifactory plugin includes 
      jersey-hk2-2.30.1.jar, which is incompatible with the jars in jersey2-api plugin.
       
      Now, this is likely an issue in Artifactory plugin, but as the Artifactory plugin is very common in Jenkins i expect a lot of people will run into this issue. A workaround is to remove the jersey-hk2-2.30.1.jar from the Artifactory plugin's WEB-INF/lib directory.
       

            baymac Parichay Barpanda
            jtorranc Jake Torrance
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: