Hi Henrik,
Jena timeout exception
Exception in thread "main" org.apache.jena.shared.JenaException: Can not create
ResultSet.:virtuoso.jdbc4.VirtuosoException: Virtuoso Communications Link
Failure (timeout) : Read timed out
RDF4J timeout exception
Exception in thread "main" org.eclipse.rdf4j.
Thanks Hugh, you are really helpfull.
If I use
VirtuosoQueryExecution vqe = VirtuosoQueryExecutionFactory.create(query,
graph);
vqe.setTimeout(timeout);
What kind of exception does it throw ? I can't find it in the documantation.
I know that
TupleQuery tupleQuery =
connection.prepareTupleQuery
Hi Henrik,
For query execution in Jena:
class VirtGraph
method
public void setQueryTimeout(int seconds)
OR
class VirtuosoQueryExecution
method
/**
* Set time, in milliseconds
*
* @see #setTimeout(long, TimeUnit)
*/
public void setTimeout(long timeout)
see
ht
Thanks Hugh,
how do I use the timeot within my java code where I use
virtDataSource = new VirtuosoDataSource();
virtDataSource.setServerName(serverAddress);
virtDataSource.setPortNumber(Integer.parseInt(serverPort));
virtDataSource.setUser(user);
virtDataSource.setPassword(password);
So there i
Hi Henrik,
Glad to hear you have solved the problem.
As the Virtuoso Jena and RDF4J provider use the Virtuoso JDBC Driver for
connecting to the Virtuoso Server you can pass any of the connect string
options of the JDBC driver, one of which is "/TIMEOUT=", to the
providers as detailed at:
Hi Hugh,
Problem solved, I had to call new virtGraph = VirtGraph() for each query
and not only once.
Before I only called VirtuosoQueryExecutionFactory.create(sparql,
virtGraph) in each query, using the same virtGraph.
A partially related question :
How do I properly use query timeouts for both
Hi Henrik,
Can you please provide more detailed example jena3 & rdf4j sample code
demonstrating how you are seeking to use both such that we can obtain a better
understanding of the apparent concurrent query execution problem ?
Best Regards
Hugh Williams
Professional Services
OpenLink Software,
Hi Hugh,
the problem is that the jena code is blocking while executing whereas
the rdf4j code is non blocking and does allow multiple simultaneous
queries.
So I'm looking for a non blocking jena solution. Is there any ?
Best,
Jenrik
Am 22.11.2017 um 00:50 schrieb Hugh Williams:
Hi Henrik,
Hi Henrik,
The jena code can be simplified to the following to give an equivalent
execution to rdf4j:
String query = "select .";
VirtuosoQueryExecution vqe = VirtuosoQueryExecutionFactory.create(query,
virtGraph);
Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.