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

java.lang.NoSuchMethodError: 'boolean org.apache.commons.lang.StringUtils.endsWithAny(java.lang.String, java.lang.String[])'

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We have a bunch of jenkins jobs. Most of them work, but  some fail with a strange error:

      jenkins 2.308 or 2.309 wirh maven integration 3.10 or 3.12

      
      Modules changed, recalculating dependency graph
      Established TCP socket on 34409
      maven35-agent.jar already up to date
      maven35-interceptor.jar already up to date
      maven3-interceptor-commons.jar already up to date
      [puzzle-app2] $ java -cp /data/jenkins/maven35-agent.jar:/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.6.2/boot/plexus-classworlds-2.6.0.jar:/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.6.2/conf/logging jenkins.maven3.agent.Maven35Main /data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.6.2 /data/jenkins/remoting.jar /data/jenkins/maven35-interceptor.jar /data/jenkins/maven3-interceptor-commons.jar 34409
      <===[JENKINS REMOTING CAPACITY]===>channel started
      Sep 02, 2021 10:08:15 AM hudson.remoting.UserRequest perform
      WARNING: LinkageError while performing UserRequest:hudson.maven.Maven3Builder@65c10514
      java.lang.NoSuchMethodError: 'boolean org.apache.commons.lang.StringUtils.endsWithAny(java.lang.String, java.lang.String[])'
      	at org.jenkins.ui.icon.Icon.toNormalizedIconName(Icon.java:221)
      	at hudson.model.BallColor.<init>(BallColor.java:82)
      	at hudson.model.BallColor.<clinit>(BallColor.java:57)
      	at hudson.model.Result.<clinit>(Result.java:58)
      	at java.base/java.lang.Class.forName0(Native Method)
      	at java.base/java.lang.Class.forName(Class.java:315)
      	at com.sun.proxy.$Proxy6.<clinit>(Unknown Source)
      	at jdk.internal.reflect.GeneratedSerializationConstructorAccessor49.newInstance(Unknown Source)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      	at java.base/java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:1092)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2180)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2464)
      	at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2358)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2196)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:493)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:451)
      	at java.base/java.util.HashMap.readObject(HashMap.java:1460)
      	at java.base/jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at java.base/java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1175)
      	at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2325)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2196)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2464)
      	at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2358)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2196)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:493)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:451)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:289)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:189)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:376)
      	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      
      channel stopped
      ERROR: Failed to parse POMs
      java.io.IOException: Remote call on Channel to Maven [java, -cp, /data/jenkins/maven35-agent.jar:/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.6.2/boot/plexus-classworlds-2.6.0.jar:/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.6.2/conf/logging, jenkins.maven3.agent.Maven35Main, /data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.6.2, /data/jenkins/remoting.jar, /data/jenkins/maven35-interceptor.jar, /data/jenkins/maven3-interceptor-commons.jar, 34409] failed
      	at hudson.remoting.Channel.call(Channel.java:1005)
      	at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:161)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:877)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:516)
      	at hudson.model.Run.execute(Run.java:1889)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      	at hudson.model.ResourceController.execute(ResourceController.java:100)
      	at hudson.model.Executor.run(Executor.java:433)
      Caused by: java.lang.NoSuchMethodError: 'boolean org.apache.commons.lang.StringUtils.endsWithAny(java.lang.String, java.lang.String[])'
      	at org.jenkins.ui.icon.Icon.toNormalizedIconName(Icon.java:221)
      	at hudson.model.BallColor.<init>(BallColor.java:82)
      	at hudson.model.BallColor.<clinit>(BallColor.java:57)
      	at hudson.model.Result.<clinit>(Result.java:58)
      	at java.base/java.lang.Class.forName0(Native Method)
      	at java.base/java.lang.Class.forName(Class.java:315)
      	at com.sun.proxy.$Proxy6.<clinit>(Unknown Source)
      	at jdk.internal.reflect.GeneratedSerializationConstructorAccessor49.newInstance(Unknown Source)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      	at java.base/java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:1092)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2180)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2464)
      	at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2358)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2196)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:493)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:451)
      	at java.base/java.util.HashMap.readObject(HashMap.java:1460)
      	at java.base/jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at java.base/java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1175)
      	at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2325)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2196)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2464)
      	at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2358)
      	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2196)
      	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1679)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:493)
      	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:451)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:289)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:189)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:376)
      	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      
      

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            I think JFrog track their issues elsewhere.

            Show
            danielbeck Daniel Beck added a comment - I think JFrog track their issues elsewhere.
            Hide
            jglick Jesse Glick added a comment -

            I would strongly recommend avoiding https://plugins.jenkins.io/maven-plugin/.

            Show
            jglick Jesse Glick added a comment - I would strongly recommend avoiding https://plugins.jenkins.io/maven-plugin/ .
            Hide
            kon Kalle Niemitalo added a comment -

            The page that was linked as “my Problem” seems to be a copy of https://github.com/jfrog/jenkins-artifactory-plugin/issues/556.

            Show
            kon Kalle Niemitalo added a comment - The page that was linked as “my Problem” seems to be a copy of https://github.com/jfrog/jenkins-artifactory-plugin/issues/556 .
            Hide
            timja Tim Jacomb added a comment -
            Show
            timja Tim Jacomb added a comment - There's a PR here: https://github.com/jfrog/jenkins-artifactory-plugin/pull/567
            Hide
            ebariaux Eric added a comment -

            I saw that the PR was merged to master, so I created a local build of the plugin and installed in our Jenkins, same issue.

            I saw that commons-lang 2.4 was still included in the libs folder of the plugin, creating the above class loading confusion.
            So I decided to update all dependant projects to use commons-lang3 and build all that locally and finally had a plugin that did not include any reference to commons-lang 2.x and this solved it (at least for 1 job that was constantly failing with that error).

            I did fork the required projects and submitted PRs.

            In the meantime, if you want to build locally, you can check:

            https://github.com/ebariaux/build-info

            https://github.com/ebariaux/file-specs-java

            https://github.com/ebariaux/jenkins-artifactory-plugin

             

            Show
            ebariaux Eric added a comment - I saw that the PR was merged to master, so I created a local build of the plugin and installed in our Jenkins, same issue. I saw that commons-lang 2.4 was still included in the libs folder of the plugin, creating the above class loading confusion. So I decided to update all dependant projects to use commons-lang3 and build all that locally and finally had a plugin that did not include any reference to commons-lang 2.x and this solved it (at least for 1 job that was constantly failing with that error). I did fork the required projects and submitted PRs. In the meantime, if you want to build locally, you can check: https://github.com/ebariaux/build-info https://github.com/ebariaux/file-specs-java https://github.com/ebariaux/jenkins-artifactory-plugin  

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              nweiss Norbert Weiß
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated: