Hi,
The purpose using Orientdb here is to utitlize it as RDF triple store, and test the performance with Virtuoso.
The problem now is load what kind of data and how to load data into orientdb.
1. load RDB data into OrientDB, and utilize blueprints to query using sparql;
2. load n-triples data into OrientDB, and utilize blueprints to query using sparql.
For the first kind of loading, there are some problems:
(a) How to add the tag, and how to align the data with ontologies?
(b) I found that when loading RDB data into OrientDB, one row should one record, and ';' ended as the command end tag.
But if the field data in the RDB contains ';', then the console.bat cannot understand the command, and will generate the fields not matched with values error. How to handle this kind of problem?
Is there any sites to describe the related problems?
Thanks very much.
For the second kind of loading:
I'm trying to load nt files into OrientDB, and I tried the functions described in "https://github.com/tinkerpop/gremlin/wiki/SPARQL-vs.-Gremlin ", I found that the classes used are not supported for lib jars problem in Gremlin console.
So I tried to load the files in Java code, and I download blueprints-graph-sail-2.2.0.jar, blueprints-sail-graph-2.2.0.jar and openrdf-sesame-2.6.10-onejar.jar to obtain the classes I needed.
The code is like below:
PropertyConfigurator.configure("config/log4j.properties");
OrientGraph graph = new OrientGraph("remote:localhost/tripletest",
"admin", "admin");
System.out.println(graph);
Sail sail = new GraphSail<OrientGraph>(graph);
System.out.println(sail);
SailGraph sailGraph = new SailGraph(sail);
try {
sailGraph.loadRDF(new FileInputStream("./20130301_location.nt"),
"http://data.samsung.com/ontology/dining/", "n-triples",
null);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
sailGraph.shutdown();
graph.shutdown();
}
There is no error in the code, but when I run it. Exception:"Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.tinkerpop.blueprints.impls.sail.SailGraph" is occurred.
Since there is not any related answers for this kind of exception, is there anybody could figure out what the problem is?
The orientdb release: 1.3.0, and all the blueprints related jars are 2.2.0.
I'm really confused with that. Thanks for any reply or suggestions.
--
---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi,
I have read about the Sail Implementation page, and I think that page is based on RDF data backend.
(a) My question is that if I import data from RDB to OrientDB, and one table one class. Meanwhile, the table structure is not aligned with Ontology.
All my data are stored in MySQL/PostgreSQL. And the relationships defined in Ontology is not just the relations between tables, the situation is more complicated.
Then, how to solve the problem I described in (a);
(b) The character ";" is in some fields, like reviews. And they are not in "" in the RDB data. But when I dump them from RDB using mysqldump command, they are between double quotes in the values command.
And for (a) and (b), I think (a) is more important. Even if I import all the data, how to allign and define all the relationships with ontologies is a very critical issue.
For question (2), I have solved the problem. For missing some openrdf and sesame related libraries.
Hope for your reply. Thanks very much.
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-sail-graph</artifactId>
<version>2.5.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-graph-sail</artifactId>
<version>2.5.0</version>
<optional>true</optional>
</dependency>
...
orientGraph.setUseClassForEdgeLabel(false);
new GraphSail<>(orientGraph);
...
SELECT FROM V;
WARNING: Requested command 'Committing the active transaction to create the new type 'http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type' as subclass of 'E'. The transaction will be reopen right after that. To avoid this behavior create the classes outside the transaction' must be executed outside active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction
com.orientechnologies.orient.core.exception.OSchemaException: Found invalid class name. Character '%' cannot be used in class name.
at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.createClassInternal(OSchemaShared.java:340)
at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.createClass(OSchemaShared.java:314)
at com.orientechnologies.orient.core.metadata.schema.OSchemaProxy.createClass(OSchemaProxy.java:97)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateClass.execute(OCommandExecutorSQLCreateClass.java:141)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:60)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:94)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:83)
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1181)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:340)
at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:169)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45)
Sep 15, 2014 12:08:04 AM com.tinkerpop.blueprints.oupls.sail.SailLoader load
INFO: loaded 0 statements in 66ms
Exception in thread "main" java.lang.AssertionError: expected:<29> but was:<0>
at org.junit.Assert.fail(Assert.java:74)
at org.junit.Assert.failNotEquals(Assert.java:448)
at org.junit.Assert.assertEquals(Assert.java:102)
at org.junit.Assert.assertEquals(Assert.java:323)
at org.junit.Assert.assertEquals(Assert.java:319)
at com.master.thesis.LoadData.testAll(LoadData.java:42)
at com.master.thesis.first.main(first.java:16)
Hi!I was trying to use SailLoader class to load a large amount of Data into OrientDb. I got the exact same errors now as you did!
I am using tinkeprop graph sail version 2.5.0.
--
---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
alter database custom useClassForEdgeLabel=false
so thats edge labels from orientDb are not used! From then on it worked.