It looks like you could have a mix of versions in your classpath. Could you share the output of running the "mvn dependency:tree" command in the root of *your* project?
I. On 22 March 2016 at 09:25, 王逸群 <wyqqri...@gmail.com> wrote: > Hi, > I intend to use SshClient to execute some scripts. The codes can be: > > SshClient sshClient = sshFactory.create()...; > sshClient.connect(); > String rawScript = "echo 1"; > ExecResponse result = sshClient.exec(rawScirpt); > > Then I got an error in the last line, the stack is here: > > java.lang.NoSuchMethodError: > org.jclouds.compute.domain.ExecResponse.<init>(Ljava/lang/String;Ljava/lang/String;I)V > at > org.jclouds.sshj.SshjSshClient$ExecConnection.create(SshjSshClient.java:452) > at > org.jclouds.sshj.SshjSshClient$ExecConnection.create(SshjSshClient.java:429) > at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:193) > at org.jclouds.sshj.SshjSshClient.exec(SshjSshClient.java:465) > at chef.ChefTool.install(ChefTool.java:221) > at chef.ChefTool.main(ChefTool.java:158) > 4446 [main] INFO net.schmizz.sshj.transport.TransportImpl - Disconnected - > BY_APPLICATION > SSH closed. > > I could execute the certain script when using earlier version, I > wonder if it contains a bug here. My jclouds version is 2.0.0-SNAPSHOT. > Thanks for your help! > > Best Regards, > Yiqun Wang