using Community Edition v2.1.11
I write a simple data synchronizer, that gets the data from MS-SQL DB, and synchronizes it with data that I have in OrientDB graph.
Updates may be rather massive, and the graph should be updated every 20 minutes, so I'd prefer to use the plocal mode for it; also, other applications should have all-time read access to the graph, so I decided to embed the server inside the Java app, and put the synchronization process to the scheduler (ScheduledExecutorService).
The problem is, that despite the docs, I can't access the DB that runs on the embedded server from the console or studio:
orientdb> connect remote:localhost/test root myP@ss
Disconnecting from the database [null]...OK Connecting to database [remote:localhost/test] with user 'root'... Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'C:/orientdb/databases/test' with mode=rw
Error: com.orientechnologies.orient.core.exception.OSerializationException: Cann ot load database's configuration. The database seems corrupted
Error: com.orientechnologies.common.concur.lock.OLockException: File 'C:\orientd b\databases\test\database.ocf' is locked by another process, maybe the database is in use by another process. Use the remote mode with a OrientDB server to allo w multiple access to the same database
Here's my server initialization code:
String orientdbHome = "C:/orientdb/";
System.setProperty("ORIENTDB_HOME", orientdbHome);
OServer server = OServerMain.create();
server.startup(new File("C:/orientdb/config/embedded_config.xml"));
OGlobalConfiguration.WAL_LOCATION.setValue("/Temp/wal");
server.activate();
OrientGraph g = new OrientGraph("plocal:C:/orientdb/databases/Test");
I'm new to Orient, so I'm sure that I miss something, but even Google can't help me figuring out what exactly :(