No driver found to connect stardog from java

Hello there!
I've started to use Stardog recently and I downloaded the latest community version! But I'm struggling so much with manipulating Stardog from java application. non of the java code provided on the Stardog website and github are working on my pc and it keeps telling me that "No driver was found which supports the connection string: 'http://localhost:5820/', please double-check the URL and verify the protocol is correct and try again."
Here is a sample code that I'm trying:

    Stardog aStardog = Stardog.builder().create();
    try (final AdminConnection aConn = AdminConnectionConfiguration.toServer("http://localhost:5820/")
        .credentials("admin", "admin")
        .connect()) {
    aConn.list().forEach(item -> System.out.println(item));
    if (aConn.list().contains("myDB")) {aConn.drop("myDB");}
    aConn.disk("myDB").create();
}

I also tried to do it using DriverManager with the following code and got the same error:

    try{
        DriverManager dm = DriverManager.Instance;
        Driver driver = dm.getDriver("http://localhost:5820/");
        Connection conn = driver.connect("http://localhost:5820/", null);
    }

Please help me!
Many thanks!

Hi,

You will need (at a minimum) to download the client-http dependency from our Maven repository. This error simply means that you're missing it.

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