刚刚弄Hazelcast 不太懂,求救于各位大神们,在线等候。
我的代码,包已经加入classpath:
ClientConfig clientConfig = new ClientConfig();
clientConfig.addAddress("127.0.0.1:5701");
HazelcastInstance client = HazelcastClient.newHazelcastClient(clientConfig);
IMap map = client.getMap("customers");
System.out.println("Map Size:" + map.size());
出现如下错误:
信息: ConnectionManager shutdown
Exception in thread "main" java.lang.IllegalStateException: Unable to connect to cluster
at com.hazelcast.client.HazelcastClient.<init>(HazelcastClient.java:97)
at com.hazelcast.client.HazelcastClient.newHazelcastClient(HazelcastClient.java:143)
at GettingStarted.main(GettingStarted.java:26)
请问解决了么?