ArcadeData / arcadedb

ArcadeDB Multi-Model Database, one DBMS that supports SQL, Cypher, Gremlin, HTTP/JSON, MongoDB and Redis. ArcadeDB is a conceptual fork of OrientDB, the first Multi-Model DBMS. ArcadeDB supports Vector Embeddings.
https://arcadedb.com
Apache License 2.0
505 stars 63 forks source link

Error loading RedisDB plugin #197

Closed scwagner closed 3 years ago

scwagner commented 3 years ago

ArcadeDB Version: v21.11.1-SNAPSHOT (build ef7ba86106765c5ce63ea02834edb757b8ce4797/1636054159638/main

JDK Version: openjdk version "11.0.13" 2021-10-19

OS: Alpine Linux v3.14

Expected behavior

Following the directions from the documentation to enable the Redis driver from https://docs.arcadedb.com/#Redis-API:

docker run --rm -p 2480:2480 -p 2424:2424 --env arcadedb.server.rootPassword=playwithdata --env arcadedb.server.plugins="Redis:com.arcadedb.redisw.RedisProtocolPlugin" arcadedata/arcadedb:latest

indicates that it will output the message that the driver has been loaded.

Actual behavior

An error message during server startup:

com.arcadedb.server.ServerException: Error on loading plugin from class 'Redis:com.arcadedb.redisw.RedisProtocolPlugin; at com.arcadedb.server.ArcadeDBServer.registerPlugins(ArcadeDBServer.java:194) at com.arcadedb.server.ArcadeDBServer.start(ArcadeDBServer.java:132) at com.arcadedb.server.ArcadeDBServer.main(ArcadeDBServer.java:89) Caused by: java.lang.ClassNotFoundException: com.arcadedb.redisw.RedisProtocolPlugin at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:315) at com.arcadedb.server.ArcadeDBServer.registerPlugins(ArcadeDBServer.java:183) ... 2 more

Steps to reproduce

Execute the docker run command quoted above.

scwagner commented 3 years ago

It would appear after digging into the code that the package name is com.arcadedb.redis, not com.arcadedb.redisw.

Turns out that changing the command to be

docker run --rm -p 2480:2480 -p 2424:2424 --env arcadedb.server.rootPassword=playwithdata --env arcadedb.server.plugins="Redis:com.arcadedb.redis.RedisProtocolPlugin" arcadedata/arcadedb:latest

fixes the issue and it loads the plugin just fine.

lvca commented 3 years ago

Great it works and thanks for the sponsorship!

Please note the Redis plugin is a prototype, we're looking forward for feedback about the most common use cases instead of implementing all the Redis commands. I've just updated the documentation about the available commands.