I am trying to create a connection in Arango databse using Java , IDE- Eclipse but while executing the program I am getting the exception "Unauthorized".
Note: I have logged in to Arango Database with user :root URL- http://127.0.0.1:8529/_db/_system/_admin/aardvark/index.html#logs
Program in Eclipse
import static com.arangodb.*;
public class FirstProject {
public static void main(String[] args) {
ArangoConfigure configure = new ArangoConfigure();
configure.init();
ArangoDriver arangoDriver = new ArangoDriver(configure);
String dbName = "mydb";
try {
arangoDriver.createDatabase(dbName);
System.out.println("Database created: " + dbName);
} catch (Exception e) {
System.out.println("Failed to create database " + dbName + "; " + e.getMessage());
}
}
}
I have used the tutorial https://www.arangodb.com/tutorials/tutorial-java-old/ to write this program and followed all the steps mentioned. Still getting unauthorized exception:Failed to create database mydb; Unauthorized