java 调用 ethereum 的智能合约

@ajian1984 我是用的web3j这个工具与ethereum进行通讯,因为我的项目是一个B/S架构的,用的java spring boot你架构,我在项目里创建了与ethereum接口类:
package com.example.mortgage.ethereum;

import org.web3j.protocol.Web3j;
import org.web3j.protocol.http.HttpService;

public class Web3JClient {
private static String URL = "http://10.10.10.4:61911/";

public Web3JClient(){}

public volatile static Web3j web3j;

public static Web3j getClient(){
if(web3j==null){
synchronized (Web3JClient.class){
if(web3j==null){
web3j = Web3j.build(new HttpService(URL));
}
}
}
return web3j;
}

}
然后在我的控制器里调用:
public class PlatformController {

@Autowired
PlatformService platformService;

@RequestMapping("/index")
public String index(Model model){

try{
Web3j web3j;
Web3JClient web3jClient=new Web3JClient();
web3j=Web3JClient.getClient();

}catch (Exception e) {

e.printStackTrace();

}

return "index";
}
}
在Web3j.build(new HttpService(URL))这里出错,我这个端口我用telnet 测试,是没问题的,以下是出错信息:

2018-05-10 12:34:48.768 ERROR 9988 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: rx/schedulers/Schedulers] with root cause

java.lang.ClassNotFoundException: rx.schedulers.Schedulers
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_161]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_161]
at org.web3j.protocol.rx.JsonRpc2_0Rx.(JsonRpc2_0Rx.java:39) ~[core-2.2.1.jar:na]
at org.web3j.protocol.core.JsonRpc2_0Web3j.(JsonRpc2_0Web3j.java:90) ~[core-2.2.1.jar:na]
at org.web3j.protocol.core.JsonRpc2_0Web3j.(JsonRpc2_0Web3j.java:83) ~[core-2.2.1.jar:na]
at org.web3j.protocol.Web3j.build(Web3j.java:14) ~[core-2.2.1.jar:na]
at com.example.mortgage.ethereum.Web3JClient.getClient(Web3JClient.java:17) ~[classes/:na]
at com.example.mortgage.controller.PlatformController.index(PlatformController.java:50) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) ~[spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) ~[spring-webmvc-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) ~[spring-webmvc-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAd

签名

@ajian1984 我创建一个以太坊节点,如果通过java调用到eth的相关命令?

签名

@ajian1984 如果不验证签名的话,我的合同信息放在一个联盟链的话,我的合作方如何确认这个合同信息是我公司放上去且是真实有效的,而且链上的数据都是16进制显示的而且有一此其它信息,我的合作方如果下载链上的合同信息到本地,怎么能够把合同信息摘出来呢?

签名

@ajian1984 如果我的签名信息在链上不可见的话,别人怎么验证我交易呢?

签名

如果我在以太访上记录了我了一份买卖合同信息,我怎么查看这份合同信息的签名