Using API: Connection.export seems to exit with no warning, error etc

0 views
Skip to first unread message

john....@gmail.com

unread,
Jun 12, 2014, 10:46:03 AM6/12/14
to sta...@clarkparsia.com

Using the Java API when I call ReasoningConnection.export(...).to(....) the programs seems to exit, with no warnings or errors.

I've tried with/without contexts, reasoning, different format, different output sources etc.
All have same result.

Is there more information available about how to enable useful debugging to provide more detail?


When I run the attached test case I get this output:

 .
 .
 .
Creating indexes...finished in 00:00:00.009
Successfully created database 'test_export'.
Creating indexes...finished in 00:00:00.009
Successfully created database 'test_export'.

Properties:
index.disk.page.size:  8192
search.enabled:  false
database.home:  null
transactions.durable:  false
index.file.name.diff:  diff
index.differential.merge.limit:  10000
load.bucket.size:  1000000
reasoning.schema.graphs:  [tag:stardog:api:context:default]
index.bulkloader.output:  java.io.PrintStream@2fefb21c
index.differential.enable.limit:  1000000
index.bulkloader.named.graphs:  true
index.persist:  false
index.connection.timeout:  3600000
database.time.modification:  2014-06-12T15:36:19.540+01:00
index.file.name.keys:  keys
database.online:  true
index.differential.size:  0
index.statistics.update.automatic:  true
database.namespaces:  [rdf :: http://www.w3.org/1999/02/22-rdf-syntax-ns#, rdfs :: http://www.w3.org/2000/01/rdf-schema#, xsd :: http://www.w3.org/2001/XMLSchema#, owl :: http://www.w3.org/2002/07/owl#, stardog :: tag:stardog:api:, rdf :: http://www.w3.org/1999/02/22-rdf-syntax-ns#, rdfs :: http://www.w3.org/2000/01/rdf-schema#, xsd :: http://www.w3.org/2001/XMLSchema#, owl :: http://www.w3.org/2002/07/owl#, stardog :: tag:stardog:api:]
index.file.name.pages:  pages
reasoning.consistency.automatic:  false
database.time.creation:  2014-06-12T15:36:19.540+01:00
index.literals.canonical:  true
index.file.name.dict:  dict
index.stats.type:  0
icv.consistency.automatic:  false
query.timeout:  null
index.strategy:  QUADS
index.dictionary.page.type:  OFF_HEAP
index.file.name.stats:  stats
database.archetypes:  []
index.dictionary.compress.literal:  2048
index.persist.sync:  true
index.named.graphs:  true
update.bucket.size:  1000000
index.dictionary.page.size:  4096
index.dictionary.minimize:  false
icv.active.graphs:  [tag:stardog:api:context:default]
index.dictionary.literal.huge:  false
index.dictionary.compress.namespace:  true
icv.reasoning.type:  NONE
search.index.state:  DIRTY
index.disk.file.size:  2147483647
index.type:  Memory
index.size:  0
search.reindex.mode:  sync
index.statistics.update.dbminsize:  10000
index.mmap.pages:  false
index.dictionary.type:  1
database.name:  test_export
reasoning.punning.enabled:  false
icv.enabled:  false
index.disk.file.factory:  0
index.statistics.update.count:  0


Exporting:
>>>Context: Context1
<http://a.b.c/d#s2> <http://a.b.c/d#p2> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> <http://a.b.c/d#CONTEXT1> .

Nothing after this. No warnings, errors etc.

StardogExport.java

Mike Grove

unread,
Jun 12, 2014, 11:28:40 AM6/12/14
to stardog
This is a case of the javadocs being unclear.  The OutputStream provided to the Exporter is closed when the export is complete, so what's happening is stdout is being closed, so all subsequent attempts to write to it are basically ignored.  The program completes successfully, which you'll notice if you simply step through in a debugger or alter what is passed into the to function.  For example, you can provide an UncloseableOutputStream, ie new UncloseableOutputStream(System.out), and you'll see the expected output.

We'll improve the javadocs.

Thanks.

Mike
 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

john....@gmail.com

unread,
Jun 12, 2014, 11:34:05 AM6/12/14
to sta...@clarkparsia.com
Thanks!
Reply all
Reply to author
Forward
0 new messages