java.lang.NoSuchMethodError: java.lang.Byte.toUnsignedInt(B)I

GitHub | tinloaf | 10 months ago
  1. 0

    java.lang.Byte.toUnsignedInt() missing?

    GitHub | 10 months ago | tinloaf
    java.lang.NoSuchMethodError: java.lang.Byte.toUnsignedInt(B)I
  2. 0

    GitHub comment 1#185641649

    GitHub | 10 months ago | docbender
    java.lang.NoSuchMethodError: java.lang.Byte.toUnsignedInt(B)I
  3. 0

    GitHub comment 1#185699633

    GitHub | 10 months ago | docbender
    java.lang.NoSuchMethodError: java.lang.Byte.toUnsignedInt(B)I
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I have a simple junit test using SSHLauncher to run on a slave node attached via SSH: public void testSshNode() throws Exception{ String hostname = "localhost"; String username = System.getProperty("user.name"); SSHLauncher launcher = new SSHLauncher( /*host=*/hostname, /*port=*/22, /*username=*/username, /*password=*/"", /*privatekey=*/System.getProperty("user.home")+"/.ssh/arti-key", /*jvmOptions=*/""); DumbSlave node = new DumbSlave( /*name=*/hostname, /*nodeDescription=*/"created by job-executor", /*remoteFS=*/"/nobackup/"+username+"/arti/slaves/"+InetAddress.getLocalHost().getCanonicalHostName(), /*numExecutors=*/"4", // TODO We should not hardcode numExecutors here. /*mode=*/Node.Mode.NORMAL, /*labelString=*/hostname, /*launcher=*/launcher, /*retentionStrategy=*/RetentionStrategy.NOOP, /*nodeProperties=*/Collections.EMPTY_LIST); hudson.addNode(node); FreeStyleProject job = hudson.createProject(FreeStyleProject.class,"testjob"); DescribableList<Builder,Descriptor<Builder>> builders = job.getBuildersList(); builders.clear(); builders.add(new Shell("date >>/tmp/testSshNode.out")); job.setAssignedNode(node); job.scheduleBuild(new UserCause()); waitUntilNoActivity(); assertTrue(true); } It fails with this stacktrace: SEVERE: I/O error in channel localhost java.io.IOException: Unexpected termination of the channel at hudson.remoting.Channel$ReaderThread.run(Channel.java:953) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Channel$ReaderThread.run(Channel.java:947) Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping cvs Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping maven-plugin Exception in thread "Channel reader thread: localhost" java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:305) at hudson.remoting.Channel.terminate(Channel.java:695) at hudson.remoting.Channel$ReaderThread.run(Channel.java:971) Jan 10, 2011 1:21:26 PM hudson.model.Hudson cleanUp WARNING: Failed to shut down properly java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232) at java.util.concurrent.FutureTask.get(FutureTask.java:91) at hudson.model.Hudson.cleanUp(Hudson.java:2300) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:303) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:224) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$4.run(SlaveComputer.java:399) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Full log attached.

    Jenkins JIRA | 6 years ago | nlgu5kq4x6yl
    java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V
  6. 0

    I have a simple junit test using SSHLauncher to run on a slave node attached via SSH: public void testSshNode() throws Exception{ String hostname = "localhost"; String username = System.getProperty("user.name"); SSHLauncher launcher = new SSHLauncher( /*host=*/hostname, /*port=*/22, /*username=*/username, /*password=*/"", /*privatekey=*/System.getProperty("user.home")+"/.ssh/arti-key", /*jvmOptions=*/""); DumbSlave node = new DumbSlave( /*name=*/hostname, /*nodeDescription=*/"created by job-executor", /*remoteFS=*/"/nobackup/"+username+"/arti/slaves/"+InetAddress.getLocalHost().getCanonicalHostName(), /*numExecutors=*/"4", // TODO We should not hardcode numExecutors here. /*mode=*/Node.Mode.NORMAL, /*labelString=*/hostname, /*launcher=*/launcher, /*retentionStrategy=*/RetentionStrategy.NOOP, /*nodeProperties=*/Collections.EMPTY_LIST); hudson.addNode(node); FreeStyleProject job = hudson.createProject(FreeStyleProject.class,"testjob"); DescribableList<Builder,Descriptor<Builder>> builders = job.getBuildersList(); builders.clear(); builders.add(new Shell("date >>/tmp/testSshNode.out")); job.setAssignedNode(node); job.scheduleBuild(new UserCause()); waitUntilNoActivity(); assertTrue(true); } It fails with this stacktrace: SEVERE: I/O error in channel localhost java.io.IOException: Unexpected termination of the channel at hudson.remoting.Channel$ReaderThread.run(Channel.java:953) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Channel$ReaderThread.run(Channel.java:947) Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping cvs Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping maven-plugin Exception in thread "Channel reader thread: localhost" java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:305) at hudson.remoting.Channel.terminate(Channel.java:695) at hudson.remoting.Channel$ReaderThread.run(Channel.java:971) Jan 10, 2011 1:21:26 PM hudson.model.Hudson cleanUp WARNING: Failed to shut down properly java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232) at java.util.concurrent.FutureTask.get(FutureTask.java:91) at hudson.model.Hudson.cleanUp(Hudson.java:2300) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:303) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:224) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$4.run(SlaveComputer.java:399) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Full log attached.

    Jenkins JIRA | 6 years ago | nlgu5kq4x6yl
    java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V

    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

      java.lang.Byte.toUnsignedInt(B)I

      at org.openhab.binding.simplebinary.internal.SimpleBinaryProtocol.arrayToString()
    2. org.openhab.binding
      SimpleBinaryBinding.execute
      1. org.openhab.binding.simplebinary.internal.SimpleBinaryProtocol.arrayToString(SimpleBinaryProtocol.java:680)
      2. org.openhab.binding.simplebinary.internal.SimpleBinaryProtocol.evalCRC(SimpleBinaryProtocol.java:657)
      3. org.openhab.binding.simplebinary.internal.SimpleBinaryProtocol.compileNewDataFrame(SimpleBinaryProtocol.java:52)
      4. org.openhab.binding.simplebinary.internal.SimpleBinaryUART.sendNewDataCheck(SimpleBinaryUART.java:345)
      5. org.openhab.binding.simplebinary.internal.SimpleBinaryUART.checkNewData(SimpleBinaryUART.java:929)
      6. org.openhab.binding.simplebinary.internal.SimpleBinaryBinding.execute(SimpleBinaryBinding.java:233)
      6 frames
    3. org.openhab.core
      AbstractActiveService$RefreshThread.run
      1. org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156)
      2. org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173)
      2 frames