Я обновил старую версию neo4j 3.5.7 до 4.0.6 и следовал инструкциям по миграции. Модульные тесты выполняются, но как только я пытаюсь развернуть neo4j как встроенную базу данных на сервере приложений, во время выполнения ar, я получаю следующее ожидание:
at org.glassfish.javax.enterprise.concurrent//org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)
Caused by: java.lang.NoClassDefFoundError: Failed to link org/neo4j/cypher/internal/evaluator/SimpleInternalExpressionEvaluator$ExpressionParser$ (Module "my-application-ear-4.6.0-SNAPSHOT.ear" from Service Module Loader): Failed to link org/neo4j/cypher/internal/v4_0/parser/Expressions (Module "my-application-ear-4.6.0-SNAPSHOT.ear" from Service Module Loader): Failed to link org/neo4j/cypher/internal/v4_0/parser/Patterns (Module "my-application-ear-4.6.0-SNAPSHOT.ear" from Service Module Loader): Failed to link org/neo4j/cypher/internal/v4_0/parser/Literals (Module "my-application-ear-4.6.0-SNAPSHOT.ear" from Service Module Loader): Failed to link org/neo4j/cypher/internal/v4_0/parser/Strings (Module "my-application-ear-4.6.0-SNAPSHOT.ear" from Service Module Loader): Failed to link org/neo4j/cypher/internal/v4_0/parser/Base (Module "my-application-ear-4.6.0-SNAPSHOT.ear" from Service Module Loader): org/parboiled/scala/Parser
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.cypher.internal.evaluator.SimpleInternalExpressionEvaluator.$anonfun$evaluate$1(SimpleInternalExpressionEvaluator.scala:43)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.cypher.internal.evaluator.SimpleInternalExpressionEvaluator.errorContext(SimpleInternalExpressionEvaluator.scala:56)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.cypher.internal.evaluator.SimpleInternalExpressionEvaluator.evaluate(SimpleInternalExpressionEvaluator.scala:42)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.cypher.internal.evaluator.SimpleExpressionEvaluator.evaluate(SimpleExpressionEvaluator.java:44)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.MapConverter.apply(MapConverter.java:46)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.MapConverter.apply(MapConverter.java:31)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.TypeCheckers$DefaultValueConverter.defaultValue(TypeCheckers.java:321)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.MethodSignatureCompiler.signatureFor(MethodSignatureCompiler.java:84)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:252)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:226)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.GlobalProceduresRegistry.registerProcedure(GlobalProceduresRegistry.java:176)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.GlobalProceduresRegistry.registerProcedure(GlobalProceduresRegistry.java:164)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.procedure.impl.GlobalProceduresRegistry.registerProcedure(GlobalProceduresRegistry.java:153)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.graphdb.factory.module.edition.AbstractEditionModule.registerProcedures(AbstractEditionModule.java:95)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.lambda$setupProcedures$5(DatabaseManagementServiceFactory.java:278)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.graphdb.factory.module.edition.CommunityEditionModule.tryResolveOrCreate(CommunityEditionModule.java:258)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.setupProcedures(DatabaseManagementServiceFactory.java:225)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:131)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.dbms.api.DatabaseManagementServiceBuilder.newDatabaseManagementService(DatabaseManagementServiceBuilder.java:85)
at my-application-ear-4.6.0-SNAPSHOT.ear//org.neo4j.dbms.api.DatabaseManagementServiceBuilder.build(DatabaseManagementServiceBuilder.java:78)
Это список зависимостей maven, которые у меня есть теперь в банке, чтобы neo4j работал с модульными тестами:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-expression-evaluator</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-parser-4.0</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-bolt</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-security</artifactId>
<version>${neo4j.version}</version>
<exclusions>
<exclusion>
<!-- CVE-2008-0660 as we're running community, we don't need this -->
<groupId>org.neo4j.licensing-proxy</groupId>
<artifactId>zstd-proxy</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-slf4j</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j.community</groupId>
<artifactId>it-test-support</artifactId>
<version>${neo4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.parboiled</groupId>
<artifactId>parboiled-scala_2.12</artifactId>
<version>${parboiled-for-neo4j.version}</version>
<scope>test</scope>
</dependency>
Как ни странно, с версией 3.5 этого списка зависимостей было достаточно, и в wildfly он работал без проблем:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-bolt</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-security</artifactId>
<version>${neo4j.version}</version>
<exclusions>
<exclusion>
<!-- CVE-2008-0660 as we're running community, we don't need this -->
<groupId>org.neo4j.licensing-proxy</groupId>
<artifactId>zstd-proxy</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-slf4j</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j.community</groupId>
<artifactId>it-test-support</artifactId>
<version>${neo4j.version}</version>
<scope>test</scope>
</dependency>
Может быть, у кого-то такая же проблема, и кто-нибудь может мне подсказать? Любая помощь высоко ценится! Спасибо