我看到一个奇怪的问题,当我添加一个我自己使用系统路径从Sonatype下载的jar时,一切正常,但是当我尝试直接从Sonatype存储库下载时,一旦运行我的代码,我得到一个AbstractMethodError。
从https://oss.sonatype.org/index.html#nexus-search;quick~neo4j2开始自己添加jar:
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-neo4j2-graph</artifactId>
<version>2.5.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/../../../blueprints/blueprints-neo4j2-graph/target/blueprints-neo4j2- graph-2.5.0-SNAPSHOT.jar</systemPath>
</dependency>
以下是我如何将Sonatype存储库和依赖项添加到我的pom.xml中:
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-neo4j2-graph</artifactId>
<version>2.5.0-SNAPSHOT</version>
</dependency>
</dependencies>
我不确定问题是什么,因为罐子很好。有人能想出来吗?
AbstractMethodError:
java.lang.AbstractMethodError: org.neo4j.kernel.impl.cache.CacheProvider.newNodeCache(Lorg/neo4j/kernel/impl/util/StringLogger;Lorg/neo4j/kernel/configuration/Config;Lorg/neo4j/kernel/monitoring/Monitors;)Lorg/neo4j/kernel/impl/cache/Cache;
at org.neo4j.kernel.impl.core.DefaultCaches.node(DefaultCaches.java:51)
at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:522)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:301)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:63)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:92)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:198)
at com.tinkerpop.blueprints.impls.neo4j2.Neo4j2Graph.<init>(Neo4j2Graph.java:153)
at com.tinkerpop.blueprints.impls.neo4j2.Neo4j2Graph.<init>(Neo4j2Graph.java:135)
at com.seeq.appserver.driver.graph.specific.Neo4jSpecific.openConnection(Neo4jSpecific.java:22)
at com.seeq.appserver.driver.graph.specific.GraphSpecific$openConnection.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at com.seeq.appserver.driver.graph.blueprints.BlueprintsDriver.openConnection(BlueprintsDriver.groovy:68)
at com.seeq.appserver.driver.graph.blueprints.ITBlueprintsDriverNeo4j.oneTimeSetUp(ITBlueprintsDriverNeo4j.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
依赖树:
[INFO] +- com.tinkerpop.rexster:rexster-protocol:jar:2.4.0:compile
[INFO] | +- com.tinkerpop.rexster:rexster-core:jar:2.4.0:compile
[INFO] | | +- com.sun.jersey:jersey-json:jar:1.17:compile
[INFO] | | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] | | | | \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] | | | | +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.2:compile
[INFO] | | | +- org.codehaus.jackson:jackson-xc:jar:1.9.2:compile
[INFO] | | | \- com.sun.jersey:jersey-core:jar:1.17:compile
[INFO] | | \- javax.servlet:javax.servlet-api:jar:3.0.1:compile
[INFO] | +- com.tinkerpop.gremlin:gremlin-groovy:jar:2.4.0:compile
[INFO] | | +- com.tinkerpop.gremlin:gremlin-java:jar:2.4.0:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.0.4:compile
[INFO] | | +- org.apache.ivy:ivy:jar:2.3.0:compile
[INFO] | | +- org.codehaus.groovy:groovy:jar:1.8.9:compile
[INFO] | | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | | +- asm:asm:jar:3.2:compile
[INFO] | | | +- asm:asm-commons:jar:3.2:compile
[INFO] | | | +- asm:asm-util:jar:3.2:compile
[INFO] | | | +- asm:asm-analysis:jar:3.2:compile
[INFO] | | | \- asm:asm-tree:jar:3.2:compile
[INFO] | | +- org.apache.ant:ant:jar:1.8.3:compile
[INFO] | | | \- org.apache.ant:ant-launcher:jar:1.8.3:compile
[INFO] | | \- org.fusesource.jansi:jansi:jar:1.5:compile
[INFO] | +- com.tinkerpop:pipes:jar:2.4.0:compile
[INFO] | +- org.msgpack:msgpack:jar:0.6.5:compile
[INFO] | | \- org.javassist:javassist:jar:3.15.0-GA:compile
[INFO] | +- org.codehaus.jettison:jettison:jar:1.3.3:compile
[INFO] | | \- stax:stax-api:jar:1.0.1:compile
[INFO] | \- org.glassfish.grizzly:grizzly-framework:jar:2.2.16:compile
[INFO] +- com.tinkerpop.blueprints:blueprints-core:jar:2.4.0:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-json-org:jar:2.1.2:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.1.2:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.1.2:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.1.1:compile
[INFO] | | \- org.json:json:jar:20090211:compile
[INFO] | +- colt:colt:jar:1.2.0:compile
[INFO] | | \- concurrent:concurrent:jar:1.3.4:compile
[INFO] | \- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] +- com.tinkerpop.blueprints:blueprints-neo4j2-graph:jar:2.5.0-SNAPSHOT:system
[INFO] +- org.neo4j:neo4j:jar:2.0.1:compile
[INFO] | +- org.neo4j:neo4j-kernel:jar:2.0.1:compile
[INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] | +- org.neo4j:neo4j-lucene-index:jar:2.0.1:compile
[INFO] | | \- org.apache.lucene:lucene-core:jar:3.6.2:compile
[INFO] | +- org.neo4j:neo4j-graph-algo:jar:2.0.1:compile
[INFO] | +- org.neo4j:neo4j-udc:jar:2.0.1:compile
[INFO] | +- org.neo4j:neo4j-graph-matching:jar:2.0.1:compile
[INFO] | +- org.neo4j:neo4j-cypher:jar:2.0.1:compile
[INFO] | | +- org.neo4j:neo4j-cypher-commons:jar:2.0.1:compile
[INFO] | | +- org.neo4j:neo4j-cypher-compiler-1.9:jar:2.0.1:compile
[INFO] | | +- org.neo4j:neo4j-cypher-compiler-2.0:jar:2.0.1:compile
[INFO] | | | \- org.parboiled:parboiled-scala_2.10:jar:1.1.6:compile
[INFO] | | | \- org.parboiled:parboiled-core:jar:1.1.6:compile
[INFO] | | \- org.scala-lang:scala-library:jar:2.10.3:compile
[INFO] | \- org.neo4j:neo4j-jmx:jar:2.0.1:compile