打开数据库OrientDB时出错

时间:2016-07-26 04:34:22

标签: java orientdb

这是错误(已编辑):

Exception in thread "main" com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database 'remote:192.168.1.129/test'
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:204)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:168)
    at learn.kenji.com.KenjiLearnOrient.main(KenjiLearnOrient.java:10)

这非常奇怪,我完全按照这里提到的http://orientdb.com/docs/2.1/Document-Database.html使用此代码

    ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:192.168.1.129/test").open("root", "mypass123");        
    // CREATE A NEW DOCUMENT AND FILL IT
    ODocument doc = new ODocument("Person");
    doc.field("name", "Luke");
    doc.field("surname", "Skywalker");
    doc.field("city", new ODocument("City").field("name", "Rome").field("country", "Italy"));

    // SAVE THE DOCUMENT
    doc.save();
    db.close();

我能够通过控制台连接

connect remote:192.168.1.129/test root mypass123

我想知道我做错了什么?

由于

0 个答案:

没有答案