Neo4j Cypher-如何调试导入期间的突然错误:Neo4j.exceptions.DatabaseError:发生未知错误

Neo4j Cypher-如何调试导入期间的突然错误:Neo4j.exceptions.DatabaseError:发生未知错误,neo4j,cypher,Neo4j,Cypher,我正在将900个XML文件一个接一个地重新导入我的本地Neo4j数据库。在文件288中,我在运行cypher查询时出错: neo4j.exceptions.DatabaseError:发生未知错误 从那时起,每次文件导入结束时都会出现此错误,即使是以前已成功导入的文件也是如此 在发生错误之前,我没有更改密码查询或数据库中的任何内容。我尝试在设置中增加堆大小和页面缓存。我的机器上也有足够的磁盘空间 我还能够通过Neo4j浏览器在数据库上成功运行查询 这是调试日志的外观,其中: 2018-07-15

我正在将900个XML文件一个接一个地重新导入我的本地Neo4j数据库。在文件288中,我在运行cypher查询时出错:

neo4j.exceptions.DatabaseError:发生未知错误

从那时起,每次文件导入结束时都会出现此错误,即使是以前已成功导入的文件也是如此

在发生错误之前,我没有更改密码查询或数据库中的任何内容。我尝试在设置中增加堆大小和页面缓存。我的机器上也有足够的磁盘空间

我还能够通过Neo4j浏览器在数据库上成功运行查询

这是调试日志的外观,其中:

2018-07-15 18:24:03.153+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [UnknownError]: null, reference 2e402580-d5f2-4b77-8621-84f034ca9356.
2018-07-15 18:24:03.155+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [UnknownError]: null, reference 2e402580-d5f2-4b77-8621-84f034ca9356.
java.lang.NullPointerException
    at org.neo4j.kernel.api.impl.schema.ValueEncoding$6.encodeQuery(ValueEncoding.java:244)
    at org.neo4j.kernel.api.impl.schema.LuceneDocumentStructure.newSeekQuery(LuceneDocumentStructure.java:110)
    at org.neo4j.kernel.api.impl.schema.reader.SimpleIndexReader.toLuceneQuery(SimpleIndexReader.java:135)
    at org.neo4j.kernel.api.impl.schema.reader.SimpleIndexReader.query(SimpleIndexReader.java:97)
    at org.neo4j.kernel.impl.index.schema.fusion.FusionIndexReader.query(FusionIndexReader.java:91)
    at org.neo4j.kernel.impl.newapi.Read.nodeIndexSeekWithFreshIndexReader(Read.java:207)
    at org.neo4j.kernel.impl.newapi.Read.lockingNodeUniqueIndexSeek(Read.java:181)
    at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext.lockingUniqueIndexSeek(TransactionBoundQueryContext.scala:312)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.NodeIndexSeeker$$anonfun$indexSeek$2.apply(NodeIndexSeeker.scala:61)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.NodeIndexSeeker$$anonfun$indexSeek$2.apply(NodeIndexSeeker.scala:61)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
    at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.NodeIndexSeeker$class.indexSeek(NodeIndexSeeker.scala:61)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.NodeIndexSeekSlottedPipe.indexSeek(NodeIndexSeekSlottedPipe.scala:36)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.NodeIndexSeekSlottedPipe.internalCreateResults(NodeIndexSeekSlottedPipe.scala:63)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.Pipe$class.createResults(Pipe.scala:45)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.NodeIndexSeekSlottedPipe.createResults(NodeIndexSeekSlottedPipe.scala:36)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.ActiveReadPipe.createResults(ActiveReadPipe.scala:29)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.ApplySlottedPipe$$anonfun$internalCreateResults$1.apply(ApplySlottedPipe.scala:36)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.ApplySlottedPipe$$anonfun$internalCreateResults$1.apply(ApplySlottedPipe.scala:34)
    at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:435)
    at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:441)
    at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:409)
    at scala.collection.Iterator$class.foreach(Iterator.scala:891)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
    at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59)
    at scala.collection.immutable.VectorBuilder.$plus$plus$eq(Vector.scala:732)
    at scala.collection.immutable.VectorBuilder.$plus$plus$eq(Vector.scala:708)
    at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310)
    at scala.collection.AbstractIterator.to(Iterator.scala:1334)
    at scala.collection.TraversableOnce$class.toIndexedSeq(TraversableOnce.scala:300)
    at scala.collection.AbstractIterator.toIndexedSeq(Iterator.scala:1334)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.EagerSlottedPipe.internalCreateResults(EagerSlottedPipe.scala:40)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:76)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.BaseExecutionResultBuilderFactory$BaseExecutionWorkflowBuilder.createResults(DefaultExecutionResultBuilderFactory.scala:105)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.BaseExecutionResultBuilderFactory$BaseExecutionWorkflowBuilder.build(DefaultExecutionResultBuilderFactory.scala:77)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.BuildInterpretedExecutionPlan$$anonfun$getExecutionPlanFunction$1.apply(BuildInterpretedExecutionPlan.scala:97)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.BuildInterpretedExecutionPlan$$anonfun$getExecutionPlanFunction$1.apply(BuildInterpretedExecutionPlan.scala:80)
    at org.neo4j.cypher.internal.BuildSlottedExecutionPlan$SlottedExecutionPlan.run(BuildSlottedExecutionPlan.scala:152)
    at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run$1.apply(LatestRuntimeVariablePlannerCompatibility.scala:128)
    at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run$1.apply(LatestRuntimeVariablePlannerCompatibility.scala:124)
    at org.neo4j.cypher.exceptionHandler$runSafely$.apply(exceptionHandler.scala:89)
    at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper.run(LatestRuntimeVariablePlannerCompatibility.scala:124)
    at org.neo4j.cypher.internal.PreparedPlanExecution.execute(PreparedPlanExecution.scala:29)
    at org.neo4j.cypher.internal.ExecutionEngine.execute(ExecutionEngine.scala:119)
    at org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:61)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI$1.start(TransactionStateMachineSPI.java:144)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.startExecution(TransactionStateMachine.java:446)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$2.run(TransactionStateMachine.java:343)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:81)
    at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$2.run(BoltStateMachine.java:456)
    at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:222)
    at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun$3(BoltMessageRouter.java:93)
    at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.lambda$enqueue$0(MetricsReportingBoltConnection.java:69)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:193)
    at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.processNextBatch(MetricsReportingBoltConnection.java:87)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:143)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:163)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$null$0(ExecutorBoltScheduler.java:145)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
2018-07-15 18:31:01.390+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [UnknownError]: null, reference 9f667b61-c2e3-4a3f-9903-ef0b98ef5493.
2018-07-15 18:31:01.392+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [UnknownError]: null, reference 9f667b61-c2e3-4a3f-9903-ef0b98ef5493.
java.lang.NullPointerException
    at org.neo4j.kernel.api.impl.schema.ValueEncoding$6.encodeQuery(ValueEncoding.java:244)
    at org.neo4j.kernel.api.impl.schema.LuceneDocumentStructure.newSeekQuery(LuceneDocumentStructure.java:110)
    at org.neo4j.kernel.api.impl.schema.reader.SimpleIndexReader.toLuceneQuery(SimpleIndexReader.java:135)
    at org.neo4j.kernel.api.impl.schema.reader.SimpleIndexReader.query(SimpleIndexReader.java:97)
    at org.neo4j.kernel.impl.index.schema.fusion.FusionIndexReader.query(FusionIndexReader.java:91)
    at org.neo4j.kernel.impl.newapi.Read.nodeIndexSeekWithFreshIndexReader(Read.java:207)
    at org.neo4j.kernel.impl.newapi.Read.lockingNodeUniqueIndexSeek(Read.java:181)
    at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext.lockingUniqueIndexSeek(TransactionBoundQueryContext.scala:312)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.NodeIndexSeeker$$anonfun$indexSeek$2.apply(NodeIndexSeeker.scala:61)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.NodeIndexSeeker$$anonfun$indexSeek$2.apply(NodeIndexSeeker.scala:61)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
    at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.NodeIndexSeeker$class.indexSeek(NodeIndexSeeker.scala:61)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.NodeIndexSeekSlottedPipe.indexSeek(NodeIndexSeekSlottedPipe.scala:36)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.NodeIndexSeekSlottedPipe.internalCreateResults(NodeIndexSeekSlottedPipe.scala:63)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.Pipe$class.createResults(Pipe.scala:45)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.NodeIndexSeekSlottedPipe.createResults(NodeIndexSeekSlottedPipe.scala:36)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.ActiveReadPipe.createResults(ActiveReadPipe.scala:29)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.ApplySlottedPipe$$anonfun$internalCreateResults$1.apply(ApplySlottedPipe.scala:36)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.ApplySlottedPipe$$anonfun$internalCreateResults$1.apply(ApplySlottedPipe.scala:34)
    at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:435)
    at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:441)
    at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:409)
    at scala.collection.Iterator$class.foreach(Iterator.scala:891)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
    at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59)
    at scala.collection.immutable.VectorBuilder.$plus$plus$eq(Vector.scala:732)
    at scala.collection.immutable.VectorBuilder.$plus$plus$eq(Vector.scala:708)
    at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310)
    at scala.collection.AbstractIterator.to(Iterator.scala:1334)
    at scala.collection.TraversableOnce$class.toIndexedSeq(TraversableOnce.scala:300)
    at scala.collection.AbstractIterator.toIndexedSeq(Iterator.scala:1334)
    at org.neo4j.cypher.internal.runtime.slotted.pipes.EagerSlottedPipe.internalCreateResults(EagerSlottedPipe.scala:40)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:76)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:72)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.BaseExecutionResultBuilderFactory$BaseExecutionWorkflowBuilder.createResults(DefaultExecutionResultBuilderFactory.scala:105)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.BaseExecutionResultBuilderFactory$BaseExecutionWorkflowBuilder.build(DefaultExecutionResultBuilderFactory.scala:77)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.BuildInterpretedExecutionPlan$$anonfun$getExecutionPlanFunction$1.apply(BuildInterpretedExecutionPlan.scala:97)
    at org.neo4j.cypher.internal.compatibility.v3_4.runtime.BuildInterpretedExecutionPlan$$anonfun$getExecutionPlanFunction$1.apply(BuildInterpretedExecutionPlan.scala:80)
    at org.neo4j.cypher.internal.BuildSlottedExecutionPlan$SlottedExecutionPlan.run(BuildSlottedExecutionPlan.scala:152)
    at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run$1.apply(LatestRuntimeVariablePlannerCompatibility.scala:128)
    at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run$1.apply(LatestRuntimeVariablePlannerCompatibility.scala:124)
    at org.neo4j.cypher.exceptionHandler$runSafely$.apply(exceptionHandler.scala:89)
    at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper.run(LatestRuntimeVariablePlannerCompatibility.scala:124)
    at org.neo4j.cypher.internal.PreparedPlanExecution.execute(PreparedPlanExecution.scala:29)
    at org.neo4j.cypher.internal.ExecutionEngine.execute(ExecutionEngine.scala:119)
    at org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:61)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI$1.start(TransactionStateMachineSPI.java:144)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.startExecution(TransactionStateMachine.java:446)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$2.run(TransactionStateMachine.java:343)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:81)
    at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$2.run(BoltStateMachine.java:456)
    at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:222)
    at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun$3(BoltMessageRouter.java:93)
    at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.lambda$enqueue$0(MetricsReportingBoltConnection.java:69)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:193)
    at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.processNextBatch(MetricsReportingBoltConnection.java:87)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:143)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:163)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$null$0(ExecutorBoltScheduler.java:145)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

有什么想法我可以进一步调试它,或者我可以做些什么来修复它吗?

在一步一步调试完整个查询之后,我发现只有在我合并到的每个键上添加COALESCE时,它才会起作用,这非常奇怪,因为我的代码不可能让这些值为空或null,或者除了字符串以外的任何东西。

我现在明白了,我可能从调试日志中推断出类似的情况,其中在错误开始时显示NullPointerException(以前没有看到)。