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!