java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;

Oracle Community | walec51 | 7 years ago
  1. 0

    Imposible to add a class library jar to Glassfish

    Oracle Community | 7 years ago | walec51
    java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;
  2. 0

    The version of Apache Commons Codec included with swarm-client-1.10-jar-with-dependencies.jar is to old for findbugs 4.51. This results in the the following: {noformat} 12:10:13 [FINDBUGS] Collecting findbugs analysis files... 12:10:18 ERROR: Publisher hudson.plugins.findbugs.FindBugsPublisher aborted due to exception 12:10:18 java.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/SwtWidgets at hudson.remoting.Channel@68077427:daily-build 12:10:18 at hudson.FilePath.act(FilePath.java:910) 12:10:18 at hudson.FilePath.act(FilePath.java:887) 12:10:18 at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:161) 12:10:18 at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:144) 12:10:18 at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333) 12:10:18 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 12:10:18 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) 12:10:18 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757) 12:10:18 at hudson.model.Build$BuildExecution.post2(Build.java:183) 12:10:18 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706) 12:10:18 at hudson.model.Run.execute(Run.java:1703) 12:10:18 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 12:10:18 at hudson.model.ResourceController.execute(ResourceController.java:88) 12:10:18 at hudson.model.Executor.run(Executor.java:231) 12:10:18 Caused by: java.io.IOException: Remote call on daily-build failed 12:10:18 at hudson.remoting.Channel.call(Channel.java:731) 12:10:18 at hudson.FilePath.act(FilePath.java:903) 12:10:18 ... 13 more 12:10:18 Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String; 12:10:18 at hudson.plugins.findbugs.parser.HexishString.toString(HexishString.java:58) 12:10:18 at hudson.plugins.findbugs.parser.HexishString.hashCode(HexishString.java:69) 12:10:18 at hudson.plugins.findbugs.parser.Bug.hashCode(Bug.java:328) 12:10:18 at java.util.HashMap.hash(HashMap.java:366) 12:10:18 at java.util.HashMap.put(HashMap.java:496) 12:10:18 at java.util.HashSet.add(HashSet.java:217) 12:10:18 at hudson.plugins.analysis.core.ParserResult.addAnnotation(ParserResult.java:229) 12:10:18 at hudson.plugins.analysis.core.ParserResult.addAnnotations(ParserResult.java:242) 12:10:18 at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:307) 12:10:18 at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264) 12:10:18 at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215) 12:10:18 at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184) 12:10:18 at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) 12:10:18 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461) 12:10:18 at hudson.remoting.UserRequest.perform(UserRequest.java:118) 12:10:18 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 12:10:18 at hudson.remoting.Request$2.run(Request.java:326) 12:10:18 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 12:10:18 at java.util.concurrent.FutureTask.run(FutureTask.java:262) 12:10:18 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 12:10:18 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 12:10:18 at hudson.remoting.Engine$1$1.run(Engine.java:63) 12:10:18 at java.lang.Thread.run(Thread.java:744) {noformat} Unpacking swarm-client-1.10-jar-with-dependencies.jar and replacing everything under org/apache/commons/codec with the 1.9 version of Apache Commons Codec fixed the problem. Here is the dependency tree of the swarm plugin: {noformat} [INFO] org.jenkins-ci.plugins:swarm-client:jar:1.11-SNAPSHOT [INFO] +- args4j:args4j:jar:2.0.21:compile [INFO] +- org.jenkins-ci.main:remoting:jar:2.32:compile [INFO] | +- org.apache.ant:ant:jar:1.8.3:compile [INFO] | | \- org.apache.ant:ant-launcher:jar:1.8.3:compile [INFO] | \- org.jenkins-ci:constant-pool-scanner:jar:1.2:compile [INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile [INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile [INFO] | \- commons-codec:commons-codec:jar:1.2:compile {noformat}

    Jenkins JIRA | 3 years ago | Sam Beroz
    java.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/SwtWidgets at hudson.remoting.Channel@68077427:daily-build
  3. 0

    The version of Apache Commons Codec included with swarm-client-1.10-jar-with-dependencies.jar is to old for findbugs 4.51. This results in the the following: {noformat} 12:10:13 [FINDBUGS] Collecting findbugs analysis files... 12:10:18 ERROR: Publisher hudson.plugins.findbugs.FindBugsPublisher aborted due to exception 12:10:18 java.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/SwtWidgets at hudson.remoting.Channel@68077427:daily-build 12:10:18 at hudson.FilePath.act(FilePath.java:910) 12:10:18 at hudson.FilePath.act(FilePath.java:887) 12:10:18 at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:161) 12:10:18 at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:144) 12:10:18 at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333) 12:10:18 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 12:10:18 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) 12:10:18 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757) 12:10:18 at hudson.model.Build$BuildExecution.post2(Build.java:183) 12:10:18 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706) 12:10:18 at hudson.model.Run.execute(Run.java:1703) 12:10:18 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 12:10:18 at hudson.model.ResourceController.execute(ResourceController.java:88) 12:10:18 at hudson.model.Executor.run(Executor.java:231) 12:10:18 Caused by: java.io.IOException: Remote call on daily-build failed 12:10:18 at hudson.remoting.Channel.call(Channel.java:731) 12:10:18 at hudson.FilePath.act(FilePath.java:903) 12:10:18 ... 13 more 12:10:18 Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String; 12:10:18 at hudson.plugins.findbugs.parser.HexishString.toString(HexishString.java:58) 12:10:18 at hudson.plugins.findbugs.parser.HexishString.hashCode(HexishString.java:69) 12:10:18 at hudson.plugins.findbugs.parser.Bug.hashCode(Bug.java:328) 12:10:18 at java.util.HashMap.hash(HashMap.java:366) 12:10:18 at java.util.HashMap.put(HashMap.java:496) 12:10:18 at java.util.HashSet.add(HashSet.java:217) 12:10:18 at hudson.plugins.analysis.core.ParserResult.addAnnotation(ParserResult.java:229) 12:10:18 at hudson.plugins.analysis.core.ParserResult.addAnnotations(ParserResult.java:242) 12:10:18 at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:307) 12:10:18 at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264) 12:10:18 at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215) 12:10:18 at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184) 12:10:18 at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) 12:10:18 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461) 12:10:18 at hudson.remoting.UserRequest.perform(UserRequest.java:118) 12:10:18 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 12:10:18 at hudson.remoting.Request$2.run(Request.java:326) 12:10:18 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 12:10:18 at java.util.concurrent.FutureTask.run(FutureTask.java:262) 12:10:18 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 12:10:18 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 12:10:18 at hudson.remoting.Engine$1$1.run(Engine.java:63) 12:10:18 at java.lang.Thread.run(Thread.java:744) {noformat} Unpacking swarm-client-1.10-jar-with-dependencies.jar and replacing everything under org/apache/commons/codec with the 1.9 version of Apache Commons Codec fixed the problem. Here is the dependency tree of the swarm plugin: {noformat} [INFO] org.jenkins-ci.plugins:swarm-client:jar:1.11-SNAPSHOT [INFO] +- args4j:args4j:jar:2.0.21:compile [INFO] +- org.jenkins-ci.main:remoting:jar:2.32:compile [INFO] | +- org.apache.ant:ant:jar:1.8.3:compile [INFO] | | \- org.apache.ant:ant-launcher:jar:1.8.3:compile [INFO] | \- org.jenkins-ci:constant-pool-scanner:jar:1.2:compile [INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile [INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile [INFO] | \- commons-codec:commons-codec:jar:1.2:compile {noformat}

    Jenkins JIRA | 3 years ago | Sam Beroz
    java.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/SwtWidgets at hudson.remoting.Channel@68077427:daily-build
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error when Upload Picture

    GitHub | 2 years ago | seanzhu
    java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;

      at fantasycards.services.PlayerDao.calcuatePasswordHash()
    2. fantasycards.services
      PlayerDao.registerPlayer
      1. fantasycards.services.PlayerDao.calcuatePasswordHash(PlayerDao.java:86)
      2. fantasycards.services.PlayerDao.registerPlayer(PlayerDao.java:56)
      3. fantasycards.services.PlayerDao.registerPlayer(PlayerDao.java:48)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. Embedded GlassFish Web
      EJBSecurityManager.runMethod
      1. org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
      1 frame