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

Artifactory Plugin guava dependency problem

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: artifactory-plugin
    • Environment:
    • Similar Issues:

      Description

      org.jfrog.build.extractor.BuildInfoExtractorUtils.mergePropertiesWithSystemAndPropertyFile uses the method com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable that has been removed since guava 16.x and has been re-added in guava 17.x but with different parameters types: InputStream and Reader instead of Closeable.
      This breaks the maven build because java.lang.NoSuchMethodError is thrown.

      libguava-java:amd64 package has been upgraded on July from 15.0-2 to 17.0-1 in debian testing repository, so all new maven installation are affected.
      Restoring the library to previous version fix the problem.

      Please notice into attached log that system libraries (/usr/share/maven) are imported into classpath when launching java.

        Attachments

          Issue Links

            Activity

            svavassori Sergio Vavassori created issue -
            Hide
            shridhar Shridhar Patil added a comment -

            I am using Jenkins 1.578 and my plugin works on guava-17.0.jar.
            In Jenkins lib folder we have guava-11.0.1.jar.

            Scenario 1.
            On Windows 7 Enterprise 64-bit : I replaced the 11.0.0 jar with 17.0 version and my plugin and Jenkins both works fine.

            Scenario 2.
            On Linux x86_64 I replaced the 11.0.0 jar with 17.0 version and my plugin works fine.
            but after successfully running the job on Jenkins, I get error while opening the output console and I have to view the output on Plain text option.

            Exception

            javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.578.jar!/hudson/model/Run/console.jelly:65:27: <j:whitespace> com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
            at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103)
            at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
            at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
            at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
            at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
            at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
            at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
            at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
            at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)

            Show
            shridhar Shridhar Patil added a comment - I am using Jenkins 1.578 and my plugin works on guava-17.0.jar. In Jenkins lib folder we have guava-11.0.1.jar. Scenario 1. On Windows 7 Enterprise 64-bit : I replaced the 11.0.0 jar with 17.0 version and my plugin and Jenkins both works fine. Scenario 2. On Linux x86_64 I replaced the 11.0.0 jar with 17.0 version and my plugin works fine. but after successfully running the job on Jenkins, I get error while opening the output console and I have to view the output on Plain text option. Exception javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar: file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.578.jar!/hudson/model/Run/console.jelly:65:27: <j:whitespace> com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631) at org.kohsuke.stapler.Stapler.service(Stapler.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-24689 [ JENKINS-24689 ]
            integer Kanstantsin Shautsou made changes -
            Link This issue depends on JENKINS-28796 [ JENKINS-28796 ]
            Hide
            sjmk Sven K added a comment -

            The Problem still persists. (Jenkins LTS 1.616, Maven Plugin 2.12, Artifactory Plugin 2.3.1)
            In gradle, this workaround works https://github.com/JFrogDev/build-info/issues/39 but it would certainly be nicer if it could be solved on the Jenkins-side/Artifactory-Plugin-side. Are there any news/fixes for this?

            Show
            sjmk Sven K added a comment - The Problem still persists. (Jenkins LTS 1.616, Maven Plugin 2.12, Artifactory Plugin 2.3.1) In gradle, this workaround works https://github.com/JFrogDev/build-info/issues/39 but it would certainly be nicer if it could be solved on the Jenkins-side/Artifactory-Plugin-side. Are there any news/fixes for this?
            Hide
            ctparker Charles Parker added a comment - - edited

            I am also experiencing this exact problem on Amazon Linux using OpenJDK 8.0 and Ant 1.9.3 + Ivy 2.4.0 instead of Maven. The jar files in artifactory-plugin appear to take precedence over the normal build environment, which means that the old jar files (guava-r08.jar and Ivy 2.2.0 among others) are being used by the ant build instead of those in .ant/lib or those specified via ivy. This makes it impossible to use up-to-date versions of other plugins (i.e. checkstyle) in combination with artifactory.

            I believe this is related to JENKINS-24949 (the Ivy version of this issue), where I posted a workaround, YMMV.

            I disagree with the dependency of this bug on the Maven bugs. I am not using Maven in my build and I still encountered this issue.

            Show
            ctparker Charles Parker added a comment - - edited I am also experiencing this exact problem on Amazon Linux using OpenJDK 8.0 and Ant 1.9.3 + Ivy 2.4.0 instead of Maven. The jar files in artifactory-plugin appear to take precedence over the normal build environment, which means that the old jar files (guava-r08.jar and Ivy 2.2.0 among others) are being used by the ant build instead of those in .ant/lib or those specified via ivy. This makes it impossible to use up-to-date versions of other plugins (i.e. checkstyle) in combination with artifactory. I believe this is related to JENKINS-24949 (the Ivy version of this issue), where I posted a workaround, YMMV. I disagree with the dependency of this bug on the Maven bugs. I am not using Maven in my build and I still encountered this issue.
            danielbeck Daniel Beck made changes -
            Assignee yossis [ yossis ] Eyal Ben Moshe [ eyalbe ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 156584 ] JNJira + In-Review [ 179337 ]

              People

              • Assignee:
                eyalbe Eyal Ben Moshe
                Reporter:
                svavassori Sergio Vavassori
              • Votes:
                5 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: