I have a question: I have written this post where I said that I had the problems when I loaded large RDF file in my RDF Triple Store.
How I can load a model in TDB TripleStore
This solutions worked, but today it causes another problems.
My part of code code is:
String file = "C:\\file.nt";
String queryStr = "select * {graph <http://nameFile> { ?s ?p ?o }}";
String directory;
directory = "C:\\tdb";
Dataset dataset = TDBFactory.createDataset(directory);
dataset.begin(ReadWrite.WRITE) ;
Query query = QueryFactory.create(queryStr);
QueryExecution qexec = QueryExecutionFactory.create(query, dataset);
qexec.getContext().set(TDB.symUnionDefaultGraph, true);
ResultSet results = qexec.execSelect();
if (!results.hasNext()) {
Model model = dataset.getNamedModel("http://nameFile");
TDBLoader.loadModel(model, file);
}
dataset.commit();
dataset.end();
I get an error
java.lang.OutOfMemoryError: GC overhead limit exceeded
Why?
In the previous code I get a
java.lang.OutOfMemoryError: Java heap space
error instead, but I thought to resolve it. This code runs on Web Service. I'm using Netbeans and Glassfish 4.0.
What am I doing wrong?
I have used also the "-XX:-UseGCOverheadLimit" VM Options, but I don't get effects.
Thanks and sorry.