我正在使用 OrientDB-3.1.2。我可以从浏览器连接 OrientDB,但从代码中它无法连接到 db。这是我的代码片段
private static OrientGraphFactory gFactory;
private OrientGraph graphDB;
gFactory = new OrientGraphFactory("remote:localhost:2480/<db-name>").setupPool(0, 40);
this.graphDB = gFactory.getTx();
所以这给了我一个例外——
ERROR Message:{Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot create a connection to remote server address(es): [127.0.0.1:2480]
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ DB name="<some-db-name>"
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1906)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1750)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:570)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentRemote.internalOpen(ODatabaseDocumentRemote.java:235)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.core.db.OrientDBRemote.open(OrientDBRemote.java:110)
} Module:{} Summary:{}
2020-09-09 17:53:31,294 ERROR Message:{ ... 66 more
有人可以建议我,我在哪里做错了吗?