Я использую JQAssistant для сканирования артефакта, который вставит данные в базу данных Neo4J. Этот Neo4J сохраняется на диске в следующем месте: <JQAssistant_Location>\store\
. Файлы в этом месте можно увидеть на прикрепленном скриншоте.
Я пишу отдельное приложение, которое READ данных из этого магазина:
String storeLoc = "<JQAssistant_Location>\store"
GraphDatabaseFactory graphDatabaseFactory = new GraphDatabaseFactory();
graphDb = graphDatabaseFactory.newEmbeddedDatabase(new File(storeLoc)); // an exception is thrown at this line
LOGGER.info(String.format("Using store at [ %s ]", storeLoc));
При проверке исключения, выданного в вышеупомянутой строке, я вижу следующее cause
:
org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@3aacd128' was
successfully initialized, but failed to start. Please see the attached cause exception
"class com.google.common.collect.MapMakerInternalMap$StrongKeyStrongValueSegment cannot access its
superclass com.google.common.collect.MapMakerInternalMap$Segment".
Я добавил следующую зависимость Neo4J в свой POM:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.5.8</version>
</dependency>
Полный след ошибки стека приведен ниже:
java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, C:\Projects\folder1\folder2\folder3\jqassistant
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:230)
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:146)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:133)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:122)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$EmbeddedDatabaseCreator.newDatabase(GraphDatabaseFactory.java:178)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:210)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:79)
at com.example.application.extractors.architecure.data.factories.jqa.impl.JqaFileConnector.init(JqaFileConnector.java:31)
at com.example.application.extractors.architecure.data.impl.JQAssistantDataExtractor.start(JQAssistantDataExtractor.java:44)
at com.example.application.models.interfaces.extractors.Initializer.processRequirements(Initializer.java:31)
at com.example.application.extractors.architecure.data.ArchitectureExtractionInitializer.beginExtraction(ArchitectureExtractionInitializer.java:34)
at com.example.application.core.Runner.beginExtraction(Runner.java:69)
at com.example.application.server.controllers.ScanController.startScan(ScanController.java:16)
at spark.RouteImpl$1.handle(RouteImpl.java:72)
at spark.http.matching.Routes.execute(Routes.java:61)
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:134)
at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1671)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:505)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@3aacd128' was successfully initialized, but failed to start. Please see the attached cause exception "class com.google.common.collect.MapMakerInternalMap$StrongKeyStrongValueSegment cannot access its superclass com.google.common.collect.MapMakerInternalMap$Segment".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:225)
... 28 more
Caused by: java.lang.IllegalAccessError: class com.google.common.collect.MapMakerInternalMap$StrongKeyStrongValueSegment cannot access its superclass com.google.common.collect.MapMakerInternalMap$Segment
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:166)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:138)
at org.neo4j.collection.PrefetchingRawIterator.peek(PrefetchingRawIterator.java:50)
at org.neo4j.collection.PrefetchingRawIterator.hasNext(PrefetchingRawIterator.java:36)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProcedures(ProcedureJarLoader.java:111)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:85)
at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:323)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
Спасибо