我在 grails 上运行 neo4j 企业 1.8 并想升级到 1.8.1。由于我也广泛使用密码引擎,升级后我尝试执行一些查询。不幸的是,我在尝试启动 Cypher ExecutionEngine 时遇到了异常。
我写了一个为我工作的小服务:
import org.neo4j.cypher.javacompat.ExecutionEngine
import org.neo4j.kernel.impl.util.StringLogger
class CypherService {
def graphDatabaseService
static transactional = true
def executeString(String cypherString) {
log.debug "start method executeString"
ExecutionEngine executionEngine = new ExecutionEngine(graphDatabaseService, StringLogger.DEV_NULL)
if(executionEngine) {
def result = executionEngine.execute(cypherString)
return result
} else {
log.error "Could not initialize the execution engine for Cypher"
return null
}
}
}
启动执行引擎时,出现以下异常:
java.lang.NoSuchMethodError: com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap$Builder.maximumWeightedCapacity(J)Lcom/googlecode/concurrentlinkedhashmap/ConcurrentLinkedHashMap$Builder;
at org.neo4j.cypher.internal.LRUCache.<init>(LRUCache.scala:31)
at org.neo4j.cypher.ExecutionEngine$$anon$1.<init>(ExecutionEngine.scala:91)
at org.neo4j.cypher.ExecutionEngine.<init>(ExecutionEngine.scala:91)
at org.neo4j.cypher.javacompat.ExecutionEngine.<init>(ExecutionEngine.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:202)
at com.netjay.fanorakel.CypherService.executeString(CypherService.groovy:16)
知道这里出了什么问题,是否有避免这种情况的解决方案?
最好的迈克尔