[HAP-1025] Plugin is broken with the latest Jenkins Created: 20/Jan/18  Updated: 14/Mar/18  Resolved: 14/Mar/18

Status: Resolved
Project: Jenkins Artifactory Plug-in
Component/s: None
Affects Version/s: 2.14.0
Fix Version/s: 2.15.0

Type: Bug Priority: Critical
Reporter: Renjith Pillai Assignee: Yahav Itzhak
Resolution: Fixed Votes: 0
Labels: None


 Description   

While doing an Artifactory upload using groovy from Pipeline script with latest Jenkins and Artifactory, the following exception is thrown
(Artifactory Plugin in Jenkins: 2.14.0, Jenkins: ver. 2.89.2)

Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to Description:jenkins-slaves (i-023883c262bdc1694)
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
		at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
		at hudson.remoting.Channel.call(Channel.java:908)
		at hudson.FilePath.act(FilePath.java:986)
		at hudson.FilePath.act(FilePath.java:975)
		at org.jfrog.hudson.pipeline.executors.GenericUploadExecutor.execution(GenericUploadExecutor.java:52)
		at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:65)
		at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:46)
		at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
		at hudson.security.ACL.impersonate(ACL.java:260)
		at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
java.lang.LinkageError: loader constraint violation: when resolving overridden method "com.fasterxml.jackson.databind.ser.std.StringSerializer.getSchema(Lcom/fasterxml/jackson/databind/SerializerProvider;Ljava/lang/reflect/Type;)Lcom/fasterxml/jackson/databind/JsonNode;" the class loader (instance of hudson/remoting/RemoteClassLoader) of the current class, com/fasterxml/jackson/databind/ser/std/StringSerializer, and its superclass loader (instance of hudson/remoting/RemoteClassLoader), have different Class objects for the type com/fasterxml/jackson/databind/JsonNode used in the signature
	at com.fasterxml.jackson.databind.ser.BasicSerializerFactory.<clinit>(BasicSerializerFactory.java:71)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:576)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:476)
	at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.getDownloadUploadSpec(SpecsHelper.java:145)
	at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:63)
	at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:189)
	at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:130)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2760)
	at hudson.remoting.UserRequest.perform(UserRequest.java:207)
	at hudson.remoting.UserRequest.perform(UserRequest.java:53)
	at hudson.remoting.Request$2.run(Request.java:358)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused: java.io.IOException: Remote call on Description:jenkins-slaves (i-023883c262bdc1694) failed
	at hudson.remoting.Channel.call(Channel.java:916)
	at hudson.FilePath.act(FilePath.java:986)
Caused: java.io.IOException: remote file operation failed: /home/ubuntu/jenkins/workspace/templates_master-WR64BLXQDZRAKCLEASVDBP5A325MPVFDUXKCNKRH7OBBX5DB63JA at hudson.remoting.Channel@4bbc16d:Description:jenkins-slaves (i-023883c262bdc1694)
	at hudson.FilePath.act(FilePath.java:993)
	at hudson.FilePath.act(FilePath.java:975)
	at org.jfrog.hudson.pipeline.executors.GenericUploadExecutor.execution(GenericUploadExecutor.java:52)
	at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:65)
	at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:46)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate(ACL.java:260)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)


 Comments   
Comment by Renjith Pillai [ 21/Jan/18 ]

Currently a manual download and installation of 2.12 version of plugin is needed to resolve this issue.

Comment by Yahav Itzhak [ 24/Jan/18 ]

Renjith Pillai,

Here is a snapshot that should fix the dependencies collision:
https://oss.jfrog.org/oss-snapshot-local/org/jenkins-ci/plugins/artifactory/2.14.x-SNAPSHOT/artifactory-2.14.x-20180124.105619-6.hpi

Here are the 2 commits that should hopefully resolve this issue:
https://github.com/JFrogDev/jenkins-artifactory-plugin/commit/50636c9d66f0cee78a12614685f545ccc4346835
https://github.com/JFrogDev/jenkins-artifactory-plugin/commit/6ce8c5691bc5950d323bd0f2b0bc50de6addb12a

Please let me know if it worked for you.

Generated at Sun Oct 20 11:08:45 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.