Stardog Home Lock Error & NoClassDefFoundError

Hi,
I'm trying to adopt the latest version of Stardog(7.7.2) for a Maven Project. I can build the project successfully, however, then when I try a simple Java code for starting a connection, add&drop a Database, and disconnect, I receive either one of the errors below:

Stardog home is currently locked, cannot start kernel. Multiple instances of Stardog cannot use the same home directory.
Shut down the running Stardog server before starting another. The process ID for a running Stardog server is stored in the
stardog.pid file under STARDOG_HOME directory. If that file does not exist, you can use standard system tools to find the process holding the lock on.

OR

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess

Can you help me regarding what would be the reason for that? All the directories work well and I can start the Server on .cmd or Stardog Studio, but just cannot do it on IntelliJ, via Java code.

My code is as follows:

public static void main(String[] args) {
    Stardog aStardog = Stardog.builder().create();
    try {
        AdminConnection aAdminConnection = AdminConnectionConfiguration.toEmbeddedServer()
                .credentials("admin","admin").connect();
        aAdminConnection.newDatabase("new").create();
        aAdminConnection.drop("new");

    } catch (Exception e){
        e.printStackTrace();
    } finally {
        aStardog.shutdown();
    }
}

The dependencies:

    <dependency>
        <groupId>com.complexible.stardog</groupId>
        <artifactId>server</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
        <type>pom</type>
    </dependency>

    <dependency>
        <groupId>com.complexible.stardog.cache</groupId>
        <artifactId>stardog-cache-core</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>com.stardog.stark.io</groupId>
        <artifactId>stardog-stark-io-api</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>com.stardog.stark.query</groupId>
        <artifactId>stardog-stark-query-api</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>com.stardog.stark.query.io</groupId>
        <artifactId>stardog-stark-query-io</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>com.complexible.stardog</groupId>
        <artifactId>client-embedded</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>com.complexible.stardog</groupId>
        <artifactId>client-http</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
        <type>pom</type>
    </dependency>

    <dependency>
        <groupId>com.complexible.stardog.rdf4j</groupId>
        <artifactId>stardog-rdf4j</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.eclipse.rdf4j</groupId>
        <artifactId>rdf4j-runtime</artifactId>
        <version>2.2.4</version>
    </dependency>

    <dependency>
        <groupId>com.complexible.stardog.jena</groupId>
        <artifactId>stardog-jena</artifactId>
        <version>7.7.2</version>
        <scope>compile</scope>
    </dependency>

</dependencies>

<repositories>
    <repository>
        <id>stardog-public</id>
        <url>https://maven.stardog.com</url>
    </repository>
</repositories>

Thanks in advance!

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