Stardog Database Connection with Jena


I am trying to connect to a Stardog Database in order to add some triples. I am following the example shown in this tutorial.

try (final AdminConnection aConn = AdminConnectionConfiguration.toServer(url)
.credentials(username, password)
.connect()) {

  // Now we open a Connection our new database
  try (Connection conn = ConnectionConfiguration
  	                        .credentials(username, password)
  	                        .connect()) {


Connection to Stardog is done correctly. However, when I try to connect to the database, the following error occurs:
"com.complexible.stardog.StardogException: No driver was found which supports the connection string: 'embed://myNewDB', please double-check the URL and verify the protocol is correct and try again."

Anyone else dealing with this problem?

Thanks in advance,

That gist is several years old and only valid up to Stardog 3 or so. We now maintain a stardog-examples github repo, in which you can find the updated Jena tutorial

Hi @stephen,

Thanks for the reply. I see there are some changes in the updated Jena tutorial you suggested.

However, I have some problems with the following imports:

import com.complexible.stardog.Stardog;
import com.complexible.stardog.jena.SDJenaFactory;

I am using maven, and looking at other posts in this forum, I completed my pom.xml like this:

com.complexible.stardog stardog-spring 3.0.0 com.complexible.stardog client-http 5.0.1 pom

I guess I am missing some kind of "stardog-jena" and "Stardog" dependencies, but I am not sure...

You are correct. You can look at the build.gradle that applies to the tutorial class for a more complete example, but for those two classes specifically you will need to bring in the com.complexible.stardog:client-embedded:${stardogVersion} dependency as well as com.complexible.stardog.jena:stardog-jena:${stardogVersion}, replacing ${stardogVersion} with the version of stardog to which you are connecting.

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