I am attempting to write to a Blazegraph database file multiple times using the OpenRDF Java API. Here is some pseudocode that mimics what I'm trying to do:
//create Connection to the database
Repository repo = new Repository("database.jnl")
RepositoryConnection cxn = newConnection(repo)
cxn.add(someData)
cxn.close()
repo.shutDown()
Now file database.jnl is still there, and I want to repeat the process above, using a new RepositoryConnection
object on the same file. This works about 50-55% of the time, but often I receive an error:
java.io.IOException: Stream Closed
I'm wondering what could be the possible cause of an intermittent IOException
? It is strange to me that it does not occur either all or none of the time.