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

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor
    • Component/s: gitlab-api-plugin
    • None
    • Environment:
      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.
       

            Assignee:
            Parichay Barpanda
            Reporter:
            Jake Torrance
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: