Hi all,
I think I figured out what the problem is with the JDBC driver. I just
happened to add a sleep of 10 milliseconds after each insert, and that
resolved all the issues I had before. This suggest that there is some
ugly concurrency bug on Virtuoso or its JDBC driver.
The problems I had before were:
1) Running a single threaded program which inserts triples on a fast
machine (same program works on my desktop, but not on our server)
2) Having multiple threads inserting triples
In both cases it gave me the following exception:
com.hp.hpl.jena.update.UpdateException: Convert results are FAILED.:
at virtuoso.jena.driver.VirtuosoUpdateRequest.exec(Unknown Source)
at com.dumontierlab.virtuoso.test.JdbcTest$1.run(JdbcTest.java:54)
at java.lang.Thread.run(Thread.java:637)
Caused by: virtuoso.jdbc3.VirtuosoException: Connection failed:
Connection refused
at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source)
at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source)
at virtuoso.jdbc3.VirtuosoConnection.<init>(Unknown Source)
at virtuoso.jdbc3.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
... 3 more
After adding a wait(10) after each insert , both the single and the
multi-threaded program worked. The multi-threaded one still gives some
exception sometimes, but after reducing the amount of threads to 3 and
increasing the sleep time to 100ms, it worked.
Should this be reported as a bug some where?
Thanks,
Alex