Summary
A project that depends only on com.arcadedb:arcadedb-gremlin:26.8.1 fails at runtime on the first Gremlin query with:
java.lang.NoClassDefFoundError: com/arcadedb/remote/RemoteDatabase
RemoteDatabase lives in arcadedb-network, which the published POM never declares. The only path to it is arcadedb-server, declared with scope=provided — which is not transitive, so consumers never receive it.
Version: 26.8.1.
Reproducer
pom.xml, one dependency:
<dependencies>
<dependency>
<groupId>com.arcadedb</groupId>
<artifactId>arcadedb-gremlin</artifactId>
<version>26.8.1</version>
</dependency>
</dependencies>
final Path dir = Files.createTempDirectory("g");
try (final DatabaseFactory f = new DatabaseFactory(dir.resolve("db").toString());
final Database db = f.create()) {
db.getSchema().createVertexType("V");
db.getQueryEngine("gremlin").analyze("g.V()"); // NoClassDefFoundError
}
Resolving that POM:
| artifact |
on the resolved classpath |
arcadedb-engine |
yes (via arcadedb-integration) |
arcadedb-network |
no |
Adding arcadedb-network by hand makes the same program run.
Why it resolves this way
From the published arcadedb-gremlin-26.8.1.pom:
com.arcadedb:arcadedb-server scope=provided
com.arcadedb:arcadedb-server scope=test
com.arcadedb:arcadedb-integration scope=compile
arcadedb-network is not declared at all. The module compiles because arcadedb-server (provided) brings it in at compile time; provided is then dropped for consumers, and nothing else supplies it.
Why it is hit immediately
The class is referenced on the ordinary query path, not in some remote-only corner:
// gremlin/src/main/java/com/arcadedb/gremlin/ArcadeGremlin.java:71
if (graph.database instanceof RemoteDatabase)
An instanceof against a missing class fails when the enclosing method is linked, so even a purely embedded user who never touches remote functionality trips over it. ArcadeGraph and ArcadeGraphFactory import it too.
Suggested fix
Declare the dependency the module actually uses, at compile scope:
<dependency>
<groupId>com.arcadedb</groupId>
<artifactId>arcadedb-network</artifactId>
<version>${project.version}</version>
</dependency>
Relying on a provided dependency for a compile-time reference works in the reactor and silently breaks for every downstream consumer, since the reactor build never resolves the module the way Maven Central serves it.
Worth checking the sibling wrappers (graphql, mongodbw, redisw, postgresw, bolt) for the same pattern, and adding a smoke test that resolves each published artifact on its own and runs one query — that is the only shape of test that catches this class of problem, since it cannot reproduce inside the multi-module build.
Secondary
With the classpath completed, the same run prints:
ANTLR Tool version 4.9.1 used for code generation does not match the current runtime version 4.13.2
ANTLR Runtime version 4.9.1 used for parser compilation does not match the current runtime version 4.13.2
TinkerPop's generated parser was built against ANTLR 4.9.1 while 4.13.2 is what resolves. It is a warning rather than a failure here, but the pairing is worth pinning deliberately rather than inheriting.
Summary
A project that depends only on
com.arcadedb:arcadedb-gremlin:26.8.1fails at runtime on the first Gremlin query with:RemoteDatabaselives inarcadedb-network, which the published POM never declares. The only path to it isarcadedb-server, declared withscope=provided— which is not transitive, so consumers never receive it.Version: 26.8.1.
Reproducer
pom.xml, one dependency:Resolving that POM:
arcadedb-enginearcadedb-integration)arcadedb-networkAdding
arcadedb-networkby hand makes the same program run.Why it resolves this way
From the published
arcadedb-gremlin-26.8.1.pom:arcadedb-networkis not declared at all. The module compiles becausearcadedb-server(provided) brings it in at compile time;providedis then dropped for consumers, and nothing else supplies it.Why it is hit immediately
The class is referenced on the ordinary query path, not in some remote-only corner:
An
instanceofagainst a missing class fails when the enclosing method is linked, so even a purely embedded user who never touches remote functionality trips over it.ArcadeGraphandArcadeGraphFactoryimport it too.Suggested fix
Declare the dependency the module actually uses, at compile scope:
Relying on a
provideddependency for a compile-time reference works in the reactor and silently breaks for every downstream consumer, since the reactor build never resolves the module the way Maven Central serves it.Worth checking the sibling wrappers (
graphql,mongodbw,redisw,postgresw,bolt) for the same pattern, and adding a smoke test that resolves each published artifact on its own and runs one query — that is the only shape of test that catches this class of problem, since it cannot reproduce inside the multi-module build.Secondary
With the classpath completed, the same run prints:
TinkerPop's generated parser was built against ANTLR 4.9.1 while 4.13.2 is what resolves. It is a warning rather than a failure here, but the pairing is worth pinning deliberately rather than inheriting.