Unable to load data

Stardog add data has stopped working (I am providing the full path but I have removed it intentionally in the examples below)

stardog data add main -g http://example.com/bibo -u admin -p admin -v ~/Documents/..../ontology/bibo.rdf 

the stack trace is here:

The detailed stack trace for the error is:
com.complexible.stardog.cli.CliException: There was a fatal failure during preparation of 3eaf62c8-87a0-4f42-941e-83ffc38d25f3 java.nio.file.NoSuchFileException: /Users/.../Documents/..../ontology/bibo.rdf
	at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:87)
	at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:56)
	at com.complexible.stardog.cli.CLI.main(CLI.java:114)
Caused by: com.complexible.stardog.protocols.http.client.BaseHttpClient$HttpClientException: There was a fatal failure during preparation of 3eaf62c8-87a0-4f42-941e-83ffc38d25f3 java.nio.file.NoSuchFileException: /Users/.../Documents/..../ontology/bibo.rdf
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:565)
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:380)
	at com.complexible.stardog.protocols.http.client.HttpClientImpl.applyChange(HttpClientImpl.java:428)
	at com.complexible.stardog.protocols.http.client.HttpConnection.applyChanges(HttpConnection.java:438)
	at com.complexible.stardog.api.impl.MixedChangeCollector.pushOutstanding(MixedChangeCollector.java:105)
	at com.complexible.stardog.api.impl.AbstractConnection.pushOutstandingAndCommit(AbstractConnection.java:355)
	at com.complexible.stardog.api.impl.AbstractConnection.commit(AbstractConnection.java:258)
	at com.complexible.stardog.cli.impl.ConnectionCommand.commitAndClose(ConnectionCommand.java:181)
	at com.complexible.stardog.cli.impl.Add.execute(Add.java:99)
	at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:75)
	... 2 more
Caused by: com.complexible.stardog.StardogException: There was a fatal failure during preparation of 3eaf62c8-87a0-4f42-941e-83ffc38d25f3 java.nio.file.NoSuchFileException: /Users/.../Documents/..../ontology/bibo.rdf
	at com.complexible.stardog.ErrorCodes.parseToThrowable(ErrorCodes.java:59)
	at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:532)
	... 11 more

I'm a little confused with the path to the file you're trying to load. Do you actually have "...." in there?

no. It is an actual path. The path is totally fine and the file exists.

What user are you running Stardog as? Is it a different user than the user running the import?

It is the same user and the admin user.

I looked back at your original post and I missed that you had removed that path but you had actually elided it and that's where the "...." was coming from.

You said that it stopped working so it was working at one point and now is throwing this error. What version of Stardog are you running and did you possibly upgrade Stardog between the time that it was working and when it stopped working?

I'd double check that you didn't start Stardog with a different user and/or try addsing the --server-side flag

I have had the same stardog version which is the latest. I tried to pull the new docker image and run it again just in case something had gone wrong. I only have one user so user is not an issue.

You're running docker?

Yes, I am running docker.

Can you include the docker command you're running?

stardog data add main -g http://example.com/bibo -u admin -p admin -v ontology/bibo.rdf 

this is the command. With the full stack trace as above. I also have tried the command that I put in the first message with an added -v but the stack trace is the same and nothing much is added as to what is going wrong.

What is the docker command that you're executing to run Stardog?

I have switched to restore and it resolved.

docker run -it -v ~/stardog-home/:/var/opt/stardog -p 5820:5820 stardog/stardog

So you're running the Stardog server in Docker, allocating an interactive tty, and running the stardog data add command from within the running container?

You can't add the document because the document isn't in the container nor is it in a mounted volume. I'm not sure how you got this to previously work unless you were adding the document from within the mounted volume ~/stardog-home. If you don't want to do that you can copy the document into the running container with docker cp

Based on the documentation, I created a link and then used add

export STARDOG_JAVA_ARGS="-Dstardog.default.cli.server=http://localhost:5820"
stardog data add main -g http://example.com/bibo -u admin -p admin -v ontology/bibo.rdf 

Why shouldn't this work?

Just maybe to add more context, currently, I am able to execute the above command (with the change of server URL) to the cloud version of stardog that we have while my local one has completely stopped responding to add via command line but is responsive both via API and stardog studio.

Yes, please add more context. Every time we go back and forth you add some new information. It's like a modern day "who's on first" by Abbot and Costello.

Who is running Stardog?
Exactly, who.
I'm asking you, who's running Stardog?
Why are you asking me?
I want to know why Stardog's not running?
Why's the cluster.
I'm not talkin' bout the cluster!

I can't tell what you're running, where you're running it, how you're running it. When it worked. When it stopped working. What might have changed.

What link? Where? To what? Do you have a link to the docs that you're referencing?

It should but it depends where you're running it. Is that being run in the container? Do you also have a local version of Stardog installed that you're using for the client cli that isn't running from a container?

The thing is details were irrelevant until you asked me. The reason I told you about the second instance is irrelevant to my issue. I just mentioned it because you said that it shouldn't work.

By link, this is what I meant, and I put the code there above too:

export STARDOG_JAVA_ARGS="-Dstardog.default.cli.server=http://localhost:5820"

Yes, I have a cli for stardog and stardog-admin both installed via home brew:

​​brew install stardog-union/tap/stardog

I also have a stardog studio that I downloaded as a DMG. Stardog instance is running in a docker container.

I don't know what details you want, if you ask what you need, I will answer you. Anyhow, I have a support meeting next week, I can ask there.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.