Luca Frosini
Luca Frosini

Reputation: 31

Create new database on OrientDB 2.2.12

I'm trying to connect to OrientDB server (version 2.2.12) using OServerAdmin to create new graph db.

OServerAdmin serverAdmin = new OServerAdmin("remote:localhost") .connect("root","rootPWD");

This code works well with 2.2.0 versin but now fails with the following exception:

java.lang.AbstractMethodError: com.orientechnologies.orient.core.engine.OEngineAbstract.startup()V
    at com.orientechnologies.orient.client.remote.OEngineRemote.startup(OEngineRemote.java:60)
    at com.orientechnologies.orient.core.Orient.initEngines(Orient.java:579)
    at com.orientechnologies.orient.core.Orient.registerEngines(Orient.java:318)
    at com.orientechnologies.orient.core.Orient.startup(Orient.java:232)
    at com.orientechnologies.orient.core.Orient.<clinit>(Orient.java:97)
    at com.orientechnologies.orient.core.storage.OStorageAbstract.<clinit>(OStorageAbstract.java:56)
    at com.orientechnologies.orient.client.remote.OServerAdmin.<init>(OServerAdmin.java:64)
    ....

Upvotes: 1

Views: 106

Answers (1)

Oleksandr Gubchenko
Oleksandr Gubchenko

Reputation: 1369

I've tried your code on 2.2.10 version:

import java.io.IOException;

import com.orientechnologies.orient.client.remote.OServerAdmin;

public class stack40216764 {

    public static void main(String[] args) {
        try {
            OServerAdmin serverAdmin = new OServerAdmin("remote:localhost").connect("root","root");
            if(serverAdmin.isConnected())
                System.out.println("connected");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }


    }

}

And I have "connected" as output without any error. Share full code of the application.

Upvotes: 0

Related Questions