Reputation: 31
The deploy maven artifacts is failing with Jenkins Artifactory Plugin - Version 3.11.4(which is working good with 3.10.6) Please suggest for any solution. Which was the same issue reported in Version 3.10.4 and was fixed in 3.10.6 - (old reference - https://www.jfrog.com/jira/browse/HAP-1442) and which is repeated again with 3.11.4
22:50:23 java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.toString(Ljava/io/InputStream;Ljava/nio/charset/Charset;)Ljava/lang/String;
22:50:23 at org.jfrog.build.extractor.ModuleParallelDeployHelper.deployArtifacts(ModuleParallelDeployHelper.java:37)
22:50:23 at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:88)
22:50:23 at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:171)
22:50:23 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
22:50:23 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
22:50:23 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:137)
22:50:23 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
22:50:23 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
22:50:23 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
22:50:23 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
22:50:23 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
22:50:23 at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
22:50:23 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
22:50:23 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
22:50:23 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
22:50:23 at java.lang.reflect.Method.invoke(Method.java:498)
22:50:23 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
22:50:23 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
22:50:23 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
22:50:23 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
22:50:23 Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.toString(Ljava/io/InputStream;Ljava/nio/charset/Charset;)Ljava/lang/String;
22:50:23 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
22:50:23 at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
22:50:23 at org.jfrog.build.extractor.ModuleParallelDeployHelper.deployArtifacts(ModuleParallelDeployHelper.java:35)
22:50:23 ... 19 more
22:50:23 Caused by: java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.toString(Ljava/io/InputStream;Ljava/nio/charset/Charset;)Ljava/lang/String;```
Upvotes: 1
Views: 250
Reputation: 6043
Jenkins Artifactory Plugin 3.11.4 uses IOUtils.toString(InputStream, Charset), which presented in Apache IOUtils 2.3, April 2012. For some reason, the Maven resolver chose Apache IOUtils below 2.3, which is very old. This may occur due to another Jenkins plugin that utilizes this version.
This Pull Request should fix this issue by using IOUtils.toString(InputStream, String). The fix will be available in the next release.
As a workaround, you can downgrade to 3.10.6.
Upvotes: 2