arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

Gremlin transactions give `gremlin-groovy is not an available GremlinScriptEngine`

Open Givemeurcookies opened this issue 5 months ago • 15 comments

ArcadeDB Version:

23.12.2

OS and JDK Version:

Using docker:latest on ARM architecute

Expected behavior

I just stumbled over Arcadedb and wanted to set it up with an existing codebase which uses the Javascript Gremlin driver. From reading the documentation, transactions should work. I see there's a mention about having to include gremlin-groovy in the classpath but as I'm not familiar with Java or the project, I have no clue how to include this, especially when I am using docker and I eventually want to move everything to Kubernetes if I am to use Arcadedb.

Actual behavior

If I try to run a transaction using Gremlin in Javascript/Node.js, I get the error gremlin-groovy is not an available GremlinScriptEngine. I assume this is due to the missing library in the classpath, but again, I have no clue how to add this. I believe the documentation should either describe how to add the library for a docker image/kubernetes setup or if it's not supported, it should be mentioned in the documentation.

Steps to reproduce

  1. Run docker ```docker run --rm -p 2480:2480 -p 8182:8182
    --env JAVA_OPTS="-Darcadedb.server.rootPassword=playwithdata \
  • GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin,"
    arcadedata/arcadedb:latest```
  1. Install gremlin through npm i gremlin
import gremlin from 'gremlin';

const graph_url = 'ws://localhost:8182/gremlin';
const authenticator = new gremlin.driver.auth.PlainTextSaslAuthenticator('root', 'playwithdata');
const drc = new DriverRemoteConnection(graph_url, { connectOnStartup: false, authenticator, mimeType: 'application/vnd.gremlin-v3.0+json' });

const graph = new Graph();
const g = graph.traversal().withRemote(drc);

const tx = g.tx();
const gtx = tx.begin();
try {
    gtx.addV("testVertex").next();
    tx.commit();
} catch(){
    tx.rollback();
}

Givemeurcookies avatar Jan 24 '24 22:01 Givemeurcookies