DevOps Automation

 View Only
Expand all | Collapse all

java.lang.NoSuchMethodError for "Jenkins Pipeline" plugin of Jenkins for UrbanCode

  • 1.  java.lang.NoSuchMethodError for "Jenkins Pipeline" plugin of Jenkins for UrbanCode

    Posted Tue June 06, 2023 09:38 AM

    I got error when Jenkins Job deply the source to UrbanCode

    ------

    Adding files to component version. ERROR: Step ?Publish artifacts to IBM UrbanCode Deploy? failed: Failed to run build on channel: hudson.remoting.Channel:Boulder_TEL_ATS : Remote call on Boulder_TEL_ATS failed [Set GitHub commit status (universal)] PENDING on repos [] (sha:72a2ad7) with context:TEL9/Db2/Command_Dev Finished: FAILURE

    -------

    java.lang.NoSuchMethodError: org/apache/http/entity/ContentType.create(Ljava/lang/String;[Lorg/apache/http/NameValuePair;)Lorg/apache/http/entity/ContentType; (loaded from <Unknown> by hudson.remoting.RemoteClassLoader) called from class org.apache.http.entity.mime.MultipartEntityBuilder (loaded from <Unknown> by hudson.remoting.RemoteClassLoader). at org.apache.http.entity.mime.MultipartEntityBuilder.buildEntity(MultipartEntityBuilder.java:209) at org.apache.http.entity.mime.MultipartEntity.getEntity(MultipartEntity.java:119) at org.apache.http.entity.mime.MultipartEntity.isChunked(MultipartEntity.java:138) at org.apache.http.entity.HttpEntityWrapper.isChunked(HttpEntityWrapper.java:67) at org.apache.http.protocol.RequestContent.process(RequestContent.java:105) at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:131) at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:165) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:485) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at com.urbancode.ds.client.AddVersionFilesCommand.execute(AddVersionFilesCommand.java:207) at com.urbancode.ds.client.AddVersionFilesCommand.execute(AddVersionFilesCommand.java:136) at com.urbancode.ud.client.VersionClient.addVersionFiles(VersionClient.java:143) at com.urbancode.ds.jenkins.plugins.urbandeploypublisher.RestClientHelper.uploadVersionFiles(RestClientHelper.java:104) at com.urbancode.ds.jenkins.plugins.urbandeploypublisher.PublishArtifactsCallable.call(PublishArtifactsCallable.java:131) at com.urbancode.ds.jenkins.plugins.urbandeploypublisher.PublishArtifactsCallable.call(PublishArtifactsCallable.java:23) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:375) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73) at java.util.concurrent.FutureTask.run(FutureTask.java:277) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.lang.Thread.run(Thread.java:812)

    --------

    I found that the "ContentType"should be in the "httpcore.jar". I searched the "httpcore.jar" in Jenkins Node(Boulder_TEL_ATS) and found that

    -rwxr-x--- 1 ucdwas ucdwas 282269 Feb 16 2018 ./TaaS-agent/lib/httpcore.jar -rwxrwxr-x 1 ucdwas ucdwas 365892 Mar 24 2020 ./TaaS-agent/var/plugins/com.urbancode.plugin.VFS_31_e4c6aa050a3dbee13786253fce29b4100f7a27a07e7e21897028b16e70873d15/lib/httpcore-nio.jar -rwxrwxr-x 1 ucdwas ucdwas 326874 Mar 24 2020 ./TaaS-agent/var/plugins/com.urbancode.plugin.VFS_31_e4c6aa050a3dbee13786253fce29b4100f7a27a07e7e21897028b16e70873d15/lib/httpcore.jar

    Thare are two different httpcore.jar in Jenkins Node(Boulder_TEL_ATS).

    The "./TaaS-agent/lib/httpcore.jar" is Version 4.3.2.

    The "./TaaS-agent/var/plugins/com.urbancode.plugin.XXX/lib/httpcore.jar" is Version 4.4.11.The "ContentType.create(Ljava/lang/String;[Lorg/apache/http/NameValuePair;)" can't be found in Version 4.3.2.So it seems that the urbancode plugin should use the httpcore.jar(4.4.11) in his directory, but it used the httpcore.jar(4.3.2) of "./TaaS-agent/lib/httpcore.jar" instead.

    I don't know the reason and can't find jar path setting for urbancode plugin in Jenkins. Can anyone give me some idea?

    Why the urbancode plugin isn't using the httpcore.jar in his path? And how can I set some path or parameter to let urbancode plugin use proper httpcore.jar?


    #Support
    #UrbanCodeDeploy
    #SupportMigration



  • 2.  RE: java.lang.NoSuchMethodError for "Jenkins Pipeline" plugin of Jenkins for UrbanCode

    Posted Wed January 20, 2021 09:12 AM

    using the plugin of “https://www.urbancode.com/plugindoc/jenkins-pipeline/”


    #Support
    #UrbanCodeDeploy
    #SupportMigration