Export to file doesn't work - "object must not be null" in logs

4 views
Skip to first unread message

Håvard Ottestad

unread,
Feb 7, 2017, 11:05:20 AM2/7/17
to Stardog

Hi,


I'm trying to export everything from my database, because I messed up and need to turn on stable bnode ids. 


I'm running this command to export the data: stardog data export -v --named-graph ALL --format NQUADS  testSesame temp.nquads


It finishes, but the file is not complete. Looks like it's managed the first 100 000 triples, of roughly 89 000 000 triples. 


I found an error in the logs, so I tried to repair the database. Repair said everything was ok. Export still doesn't work though.


Logs below:



ERROR 2017-02-07 16:59:19,819 [StardogServer.WorkerGroup-13] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(161): There was an error while encoding the response

java.io.IOException: java.lang.NullPointerException: object must not be null

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:216) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:181) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:177) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:165) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$11.encode(ResponseBodyEncoders.java:389) ~[stardog-protocols-http-server-4.2.2.jar:?]

at com.complexible.stardog.protocols.http.server.HttpMessageEncoder$SingletonMessageResponseBodyEncoder.encode(HttpMessageEncoder.java:518) ~[stardog-protocols-http-server-4.2.2.jar:?]

at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.2.jar:?]

at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92-internal]

Caused by: java.lang.NullPointerException: object must not be null

at java.util.Objects.requireNonNull(Objects.java:228) ~[?:1.8.0_92-internal]

at org.openrdf.model.impl.SimpleStatement.<init>(SimpleStatement.java:80) ~[sesame-model-4.0.0.jar:?]

at org.openrdf.model.impl.AbstractValueFactory.createStatement(AbstractValueFactory.java:133) ~[sesame-model-4.0.0.jar:?]

at com.complexible.common.rdf.model.StardogValueFactory.createStatement(StardogValueFactory.java:450) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.stardog.index.dictionary.Mappings$QuadToStatement.apply(Mappings.java:119) ~[stardog-4.2.2.jar:?]

at com.complexible.stardog.index.dictionary.Mappings$QuadToStatement.apply(Mappings.java:97) ~[stardog-4.2.2.jar:?]

at com.complexible.common.collect.Iterators2$TransformIterator.next(Iterators2.java:142) ~[stardog-utils-common-4.2.2.jar:?]

at com.complexible.common.rdf.impl.StatementIterators$3.next(StatementIterators.java:125) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.impl.StatementIterators$3.next(StatementIterators.java:117) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:69) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:28) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]

at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]

at com.complexible.stardog.protocols.server.SubjectAwareStatementSource$1.hasNext(SubjectAwareStatementSource.java:85) ~[stardog-protocols-spec-server-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:203) ~[stardog-utils-rdf-4.2.2.jar:?]

... 14 more

ERROR 2017-02-07 16:59:19,820 [StardogServer.WorkerGroup-13] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(171): There was an error writing the HTTP response

java.io.IOException: java.lang.NullPointerException: object must not be null

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:216) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:181) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:177) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:165) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$11.encode(ResponseBodyEncoders.java:389) ~[stardog-protocols-http-server-4.2.2.jar:?]

at com.complexible.stardog.protocols.http.server.HttpMessageEncoder$SingletonMessageResponseBodyEncoder.encode(HttpMessageEncoder.java:518) ~[stardog-protocols-http-server-4.2.2.jar:?]

at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.2.jar:?]

at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92-internal]

Caused by: java.lang.NullPointerException: object must not be null

at java.util.Objects.requireNonNull(Objects.java:228) ~[?:1.8.0_92-internal]

at org.openrdf.model.impl.SimpleStatement.<init>(SimpleStatement.java:80) ~[sesame-model-4.0.0.jar:?]

at org.openrdf.model.impl.AbstractValueFactory.createStatement(AbstractValueFactory.java:133) ~[sesame-model-4.0.0.jar:?]

at com.complexible.common.rdf.model.StardogValueFactory.createStatement(StardogValueFactory.java:450) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.stardog.index.dictionary.Mappings$QuadToStatement.apply(Mappings.java:119) ~[stardog-4.2.2.jar:?]

at com.complexible.stardog.index.dictionary.Mappings$QuadToStatement.apply(Mappings.java:97) ~[stardog-4.2.2.jar:?]

at com.complexible.common.collect.Iterators2$TransformIterator.next(Iterators2.java:142) ~[stardog-utils-common-4.2.2.jar:?]

at com.complexible.common.rdf.impl.StatementIterators$3.next(StatementIterators.java:125) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.impl.StatementIterators$3.next(StatementIterators.java:117) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:69) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:28) ~[stardog-utils-rdf-4.2.2.jar:?]

at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]

at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]

at com.complexible.stardog.protocols.server.SubjectAwareStatementSource$1.hasNext(SubjectAwareStatementSource.java:85) ~[stardog-protocols-spec-server-4.2.2.jar:?]

at com.complexible.common.rdf.StatementSources.write(StatementSources.java:203) ~[stardog-utils-rdf-4.2.2.jar:?]

... 14 more

Zachary Whitley

unread,
Feb 7, 2017, 11:09:03 AM2/7/17
to Stardog
This is a bit of a long shot but is there any chance you created the database with the --index-triples-only option?

--
-- --
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+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.

Håvard Ottestad

unread,
Feb 7, 2017, 11:24:33 AM2/7/17
to Stardog
Nope

Zachary Whitley

unread,
Feb 7, 2017, 11:39:02 AM2/7/17
to Stardog
I did say it was a long shot. You might want to give exporting it in a different serialization a try like TRIG or TRIX. (not saying it isn't a problem but just trying to give suggestions that might get you access to the data)

On Tue, Feb 7, 2017 at 11:24 AM, Håvard Ottestad <hmott...@gmail.com> wrote:
Nope

Håvard Ottestad

unread,
Feb 7, 2017, 11:48:12 AM2/7/17
to Stardog
I've tried exporting to trig and to nquads. I've tried just server side. I've also tried just exporting the default graph, to ntriples. Nothing is working. 

I tried taking a regular backup, this worked. No errors at least.

Håvard Ottestad

unread,
Feb 7, 2017, 11:49:17 AM2/7/17
to Stardog
I think I'm going to try exporting a construct query instead. See if that works.

Håvard Ottestad

unread,
Feb 7, 2017, 11:58:23 AM2/7/17
to Stardog
Got a timeout. Naturally.

Stephen Nowell

unread,
Feb 7, 2017, 12:00:31 PM2/7/17
to sta...@clarkparsia.com
Hi Håvard,

What if you try using the --server-side flag on the `data export` command?

Cheers,
Stephen

On 2/7/17 11:58, Håvard Ottestad wrote:
> Got a timeout. Naturally.
> --
> -- --
> 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

Håvard Ottestad

unread,
Feb 7, 2017, 12:14:38 PM2/7/17
to Stardog
Hi Stephen.

Still getting the same errors in the logs. And this time the actually command fails too:

There was an error while attempting to write to the local export file

The detailed stack trace for the error is:

com.complexible.stardog.cli.CliException: There was an error while attempting to write to the local export file

at com.complexible.stardog.cli.impl.Export.execute(Export.java:214)

at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:61)

at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)

at com.complexible.stardog.cli.CLI.main(CLI.java:104)

Caused by: com.complexible.stardog.StardogException: There was an error while attempting to write to the local export file

at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:433)

at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:304)

at com.complexible.stardog.protocols.http.client.HttpClientImpl.serverExport(HttpClientImpl.java:719)

at com.complexible.stardog.protocols.http.client.HttpClientImpl.serverExport(HttpClientImpl.java:93)

at com.complexible.stardog.api.impl.SPECExporter.serverExport(SPECExporter.java:69)

at com.complexible.stardog.api.impl.SPECExporter.toServer(SPECExporter.java:141)

at com.complexible.stardog.cli.impl.Export.execute(Export.java:191)

... 3 more

Reply all
Reply to author
Forward
0 new messages