Hi all, I am actually using OrientDB java api and am experiencing an issue
which you may solve easily:
Load of graphml file is correct and me eclipse console says everything is
ok and that vertices have been correctly inserted
I have no exception
However created data does not show in sutdio, neither any change to the
database config such as language.
At the same time the server, from the windows command says that data cannot
be persisted because database is not a disk based; However the
configuration in he studio and my java code clearly show and defined the
database as being disk based.
Could any one let me know what I do wrong, below are snapshots of java
code, studio and server log.
many thanks,
Alexis
Java code:
package com.bluage.graphDB.orientDB.test;
import com.orientechnologies.orient.client.db.ODatabaseHelper;
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.sql.OCommandSQL;
import com.tinkerpop.blueprints.impls.orient.OrientBaseGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
import com.tinkerpop.blueprints.util.io.graphml.GraphMLReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
public class TestLoadGraph {
private static final String INPUT_FILE = "data/SIFALL.graphml";
//"plocal:target/databases/GratefulDeadConcerts";
private static final String DBURL = "plocal:target/databases/Test";
private String inputFile = INPUT_FILE;
private String dbURL = DBURL;
public static void main(final String[] args) throws Exception {
new TestLoadGraph(args).testImport();
}
public TestLoadGraph() {
inputFile = INPUT_FILE;
dbURL = DBURL;
}
private TestLoadGraph(final String[] args) {
inputFile = args.length > 0 ? args[0] : INPUT_FILE;
dbURL = args.length > 1 ? args[1] : DBURL;
}
public void testImport() throws IOException, FileNotFoundException {
final boolean oldKeepOpen =
OGlobalConfiguration.STORAGE_KEEP_OPEN.getValueAsBoolean();
OGlobalConfiguration.STORAGE_KEEP_OPEN.setValue(true);
ODatabaseDocumentTx db = new ODatabaseDocumentTx(DBURL);
ODatabaseHelper.deleteDatabase(db, "plocal");
OrientBaseGraph g = new OrientGraphNoTx(dbURL);
System.out.println("Importing graph from file '" + inputFile + "' into
database: " + g + "...");
final long startTime = System.currentTimeMillis();
GraphMLReader.inputGraph(g, new FileInputStream(inputFile), 10000,
null, null, null);
System.out.println("Imported in " + (System.currentTimeMillis() -
startTime) + "ms. Vertexes: " + g.countVertices());
g.command(new OCommandSQL("alter database TIMEZONE GMT")).execute();
g.command(new OCommandSQL("alter database LOCALECOUNTRY EN")).execute();
g.command(new OCommandSQL("alter database LOCALELANGUAGE
EN")).execute();
g.commit();
OGlobalConfiguration.STORAGE_KEEP_OPEN.setValue(oldKeepOpen);
g.shutdown();
// g.drop();
}
}
Eclispe console:
Importing graph from file 'data/SIFALL.graphml' into database:
orientgraphnotx[plocal:target/databases/Test]...
Imported in 3697ms. Vertexes: 3683
Server log in windows command:
2014-05-13 10:35:37:155 INFO Loading configuration from:
D:/TOOLS/orientdb-community-1.7-rc2/config/orientdb-server-config.xml...
[OServerConfigurationLoaderXml]
2014-05-13 10:35:37:294 INFO OrientDB Server v1.7-rc2 (build
UNKNOWN@r${buildNumber}; 2014-03-25 15:54:54+0100) is starting up...
[OServer]
2014-05-13 10:35:37:302 INFO Databases directory:
D:\TOOLS\orientdb-community-1.7-rc2\databases [OServer]
2014-05-13 10:35:37:327 INFO Listening binary connections on 0.0.0.0:2424
(protocol v.20) [OServerNetworkListener]
2014-05-13 10:35:37:330 INFO Listening http connections on 0.0.0.0:2480
(protocol v.10) [OServerNetworkListener]
2014-05-13 10:35:37:342 INFO Installing dynamic plugin
'studio-1.7-rc2.zip'... [OServerPluginManager]
2014-05-13 10:35:37:386 INFO Installing GREMLIN language v.2.5.0-SNAPSHOT -
graph.pool.max=50 [OGraphServerHandler]
2014-05-13 10:35:37:391 INFO OrientDB Server v1.7-rc2 is active. [OServer]
2014-05-13 10:36:40:560 INFO Creating database
plocal:${ORIENTDB_HOME}/databases/Test [OServerCommandPostDatabase]
2014-05-13 10:37:48:417 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:37:48:434 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
2014-05-13 10:37:58:944 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:37:58:949 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
2014-05-13 10:38:10:377 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:38:10:383 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
2014-05-13 10:38:41:395 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:38:41:399 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
2014-05-13 10:38:44:305 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:38:44:310 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
2014-05-13 10:39:17:763 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
2014-05-13 10:39:17:789 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:39:43:120 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:39:43:128 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
2014-05-13 10:39:49:138 WARN ->0:0:0:0:0:0:0:1: Command not found:
GET.studio/{{ uml }} [ONetworkProtocolHttpDb]
2014-05-13 10:39:49:146 SEVE Internal server error:
java.lang.IllegalArgumentException: Cannot get allocation information for
database 'Test' because it is not a disk-based database
[ONetworkProtocolHttpDb]
Copy of server config
<https://lh3.googleusercontent.com/-UveNITl_SDY/U3Hdoyhq5JI/AAAAAAAAAAQ/Lzlhn7om6jg/s1600/localhost2480studioindex.png>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.