diff --git a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java index 761994f69..e1bf026ac 100644 --- a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java +++ b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java @@ -91,7 +91,12 @@ public static void main(String[] args) { NebulaPoolConfig nebulaPoolConfig = new NebulaPoolConfig(); nebulaPoolConfig.setMaxConnSize(100); List addresses = Arrays.asList(new HostAddress("127.0.0.1", 9669)); - pool.init(addresses, nebulaPoolConfig); + Boolean initResult = pool.init(addresses, nebulaPoolConfig); + if (!initResult) { + log.error("pool init failed."); + return; + } + session = pool.getSession("root", "nebula", false); { String createSchema = "CREATE SPACE IF NOT EXISTS test(vid_type=fixed_string(20)); "