NEO4J - RHEL7 - 无法在空数据库上创建约束
NEO4J - RHEL7 - Cannot create constraint on empty DB
使用 ansible 在强化的 RHEL7 上部署了 NEO4j。
即使数据库为空,也无法创建约束。关于如何调试这个或可能是什么原因的任何想法?可以创建其他对象。这似乎是一些核心库的问题......
我们在另一个运行良好的实例上进行了相同的安装,所以我想它一定与部署有关......即使没有安装错误
谢谢。
错误日志如下:
020-07-09 12:11:13.898+0000 错误 [o.n.b.v.r.ErrorReporter] 客户端触发意外错误 [Neo.DatabaseError.Schema.ConstraintCreationFailed]: 无法创建 CONSTRAINT ON ( equipment:Equipment ) 断言 equipment.UUID 是唯一的:
, 参考 0a5adcde-dbeb-4ef0-b9aa-9bf32ef58e63。
2020-07-09 12:11:13.898+0000 错误 [o.n.b.v.r.ErrorReporter] 客户端触发了意外错误 [Neo.DatabaseError.Schema.ConstraintCreationFailed]:无法创建 CONSTRAINT ON ( equipment:Equipment ) ASSERT equipment.UUID 是独一无二的:
, 参考 0a5adcde-dbeb-4ef0-b9aa-9bf32ef58e63。无法创建 CONSTRAINT ON ( equipment:Equipment ) 断言 equipment.UUID 是唯一的:
org.neo4j.kernel.impl.query.QueryExecutionKernelException:无法在 (equipment:Equipment) 上创建约束,断言 equipment.UUID 是唯一的:
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI.start(TransactionStateMachineSPI.java:158)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.startExecution(TransactionStateMachine.java:444)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.execute(TransactionStateMachine.java:259)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.run(TransactionStateMachine.java:240)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:81)
at org.neo4j.bolt.v1.runtime.BoltStateMachine$State.run(BoltStateMachine.java:457)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:225)
at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun(BoltMessageRouter.java:93)
at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.lambda$enqueue[=10=](MetricsReportingBoltConnection.java:69)
at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:195)
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:170)
at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError(ExecutorBoltScheduler.java:153)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.neo4j.kernel.impl.query.QueryExecutionKernelException: 无法创建 CONSTRAINT ON ( equipment:Equipment ) ASSERT equipment.UUID IS UNIQUE:
at org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:65)
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI.start(TransactionStateMachineSPI.java:144)
... 17 more
原因:org.neo4j.cypher.CypherExecutionException:无法在 (equipment:Equipment) 上创建约束 ASSERT equipment.UUID 是唯一的:
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslationSupport$class.translateException(ExceptionTranslationSupport.scala:35)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext.translateException(ExceptionTranslatingQueryContext.scala:41)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext.createUniqueConstraint(ExceptionTranslatingQueryContext.scala:128)
at org.neo4j.cypher.internal.runtime.interpreted.UpdateCountingQueryContext.createUniqueConstraint(UpdateCountingQueryContext.scala:125)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureCallOrSchemaCommandExecutionPlanBuilder$$anonfun.apply(ProcedureCallOrSchemaCommandExecutionPlanBuilder.scala:80)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureCallOrSchemaCommandExecutionPlanBuilder$$anonfun.apply(ProcedureCallOrSchemaCommandExecutionPlanBuilder.scala:78)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.PureSideEffectExecutionPlan.run(PureSideEffectExecutionPlan.scala:55)
at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run.apply(LatestRuntimeVariablePlannerCompatibility.scala:128)
at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run.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)
... 18 more
Caused by: org.neo4j.kernel.api.exceptions.schema.CreateConstraintFailureException: 无法创建约束 org.neo4j.kernel.api.schema.constaints.UniquenessConstraintDescriptor@6: 现有数据不满足 CONSTRAINT ON ( label[1]:label[1] ) ASSERT 标签[1].属性[0] 是唯一的:无法为 :Equipment(UUID) [提供者: {key=lucene+native, version=2.0}] [labelId: 1, properties [0]] 填充索引
在 org.neo4j.kernel.impl.newapi.Operations.indexBackedConstraintCreate(Operations.java:1239)
在 org.neo4j.kernel.impl.newapi.Operations.uniquePropertyConstraintCreate(Operations.java:943)
在 org.neo4j.internal.kernel.api.SchemaWrite.uniquePropertyConstraintCreate(SchemaWrite.java:66)
在 org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext.createUniqueConstraint(TransactionBoundQueryContext.scala:670)
在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$createUniqueConstraint$1.apply$mcZ$sp(ExceptionTranslatingQueryContext.scala:128)
在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$createUniqueConstraint$1.apply(ExceptionTranslatingQueryContext.scala:128)
在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$createUniqueConstraint$1.apply(ExceptionTranslatingQueryContext.scala:128)
在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslationSupport$class.translateException(ExceptionTranslationSupport.scala:33)
... 31 更多
Caused by: org.neo4j.kernel.api.exceptions.schema.UniquePropertyValueValidationException: 现有数据不满足 CONSTRAINT ON ( label[1]:label[1] ) ASSERT label[1].属性[0] IS UNIQUE: Failed to populate index for :Equipment(UUID) [provider: {key=lucene+native, version=2.0}] [labelId: 1, 属性 [0]]
在 org.neo4j.kernel.impl.api.state.ConstraintIndexCreator.awaitConstrainIndexPopulation(ConstraintIndexCreator.java:244)
在 org.neo4j.kernel.impl.api.state.ConstraintIndexCreator.createUniquenessConstraintIndex(ConstraintIndexCreator.java:135)
在 org.neo4j.kernel.impl.newapi.Operations.indexBackedConstraintCreate(Operations.java:1224)
... 38 更多
由以下原因引起:org.neo4j.kernel.api.exceptions.index.IndexPopulationFailedKernelException:无法为 :Equipment(UUID) 填充索引 [provider: {key=lucene+native, version=2.0}] [labelId: 1, properties [0]]
在 org.neo4j.kernel.impl.api.index.IndexPopulationFailure$1.asIndexPopulationFailure(IndexPopulationFailure.java:47)
在 org.neo4j.kernel.impl.api.index.FailedIndexProxy.failureCause(FailedIndexProxy.java:80)
在 org.neo4j.kernel.impl.api.index.FailedIndexProxy.awaitStoreScanCompleted(FailedIndexProxy.java:75)
在 org.neo4j.kernel.impl.api.index.FlippableIndexProxy.awaitStoreScanCompleted(FlippableIndexProxy.java:325)
在 org.neo4j.kernel.impl.api.index.AbstractDelegatingIndexProxy.awaitStoreScanCompleted(AbstractDelegatingIndexProxy.java:122)
在 org.neo4j.kernel.impl.api.state.ConstraintIndexCreator.awaitConstrainIndexPopulation(ConstraintIndexCreator.java:232)
... 还有 40 个
由以下原因引起:java.lang.NoSuchMethodError:org.apache.lucene.codecs.blocktree.BlockTreeTermsWriter.validateAutoPrefixSettings(II)V
在 org.apache.lucene.codecs.autoprefix.AutoPrefixPostingsFormat.(AutoPrefixPostingsFormat.java:77)
在 org.apache.lucene.codecs.autoprefix.AutoPrefixPostingsFormat.(AutoPrefixPostingsFormat.java:52)
在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)
在 sun.reflect.NativeConstructorAccessorImpl.newInstance(未知来源)
在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(来源不明)
在 java.lang.reflect.Constructor.newInstance(来源不明)
在 java.lang.Class.newInstance(来源不明)
在 org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:72)
在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:51)
在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:38)
在 org.apache.lucene.codecs.PostingsFormat$Holder.(PostingsFormat.java:49)
在 org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112)
在 org.apache.lucene.codecs.lucene62.Lucene62Codec.(Lucene62Codec.java:167)
在 org.apache.lucene.codecs.lucene62.Lucene62Codec.(Lucene62Codec.java:82)
在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)
在 sun.reflect.NativeConstructorAccessorImpl.newInstance(未知来源)
在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(来源不明)
在 java.lang.reflect.Constructor.newInstance(来源不明)
在 java.lang.Class.newInstance(来源不明)
在 org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:72)
在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:51)
在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:38)
在 org.apache.lucene.codecs.Codec$Holder.(Codec.java:47)
在 org.apache.lucene.codecs.Codec.getDefault(Codec.java:143)
在 org.apache.lucene.index.LiveIndexWriterConfig.(LiveIndexWriterConfig.java:121)
在 org.apache.lucene.index.IndexWriterConfig.(IndexWriterConfig.java:151)
在 org.neo4j.kernel.api.impl.index.IndexWriterConfigs.standard(IndexWriterConfigs.java:81)
在 org.neo4j.kernel.api.impl.index.IndexWriterConfigs.population(IndexWriterConfigs.java:119)
在 org.neo4j.kernel.api.impl.index.IndexWriterConfigs.population(IndexWriterConfigs.java:114)
在 org.neo4j.kernel.api.impl.index.partition.WritableIndexPartitionFactory.createPartition(WritableIndexPartitionFactory.java:45)
在 org.neo4j.kernel.api.impl.index.AbstractLuceneIndex.open(AbstractLuceneIndex.java:103)
在 org.neo4j.kernel.api.impl.index.WritableAbstractDatabaseIndex.open(WritableAbstractDatabaseIndex.java:62)
在 org.neo4j.kernel.api.impl.schema.populator.LuceneIndexPopulator.create(LuceneIndexPopulator.java:51)
在 org.neo4j.kernel.impl.index.schema.fusion.InstanceSelector.consume(InstanceSelector.java:147)
在 org.neo4j.kernel.impl.index.schema.fusion.InstanceSelector.forAll(InstanceSelector.java:90)
在 org.neo4j.kernel.impl.index.schema.fusion.FusionIndexPopulator.create(FusionIndexPopulator.java:56)
在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator$IndexPopulation.create(MultipleIndexPopulator.java:525)
在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.lambda$create$0(MultipleIndexPopulator.java:144)
在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.forEachPopulation(MultipleIndexPopulator.java:408)
在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.create(MultipleIndexPopulator.java:141)
在 org.neo4j.kernel.impl.api.index.IndexPopulationJob.run(IndexPopulationJob.java:103)
在 org.neo4j.kernel.impl.api.index.IndexPopulationJobController$IndexPopulationJobWrapper.run(IndexPopulationJobController.java:82)
在 org.neo4j.kernel.impl.scheduler.ThreadPool.lambda$submit$0(ThreadPool.java:58)
在 java.util.concurrent.Executors$RunnableAdapter.call(来源不明)
在 java.util.concurrent.FutureTask.run(来源不明)
... 还有 3 个
由于这个错误,数据库似乎不是空的:
Existing data does not satisfy CONSTRAINT ON ( label[1]:label[1] )
ASSERT label[1].property[0] IS UNIQUE
它抱怨无法创建约束,因为现有数据不满足约束。
您可以通过以下查询找到罪魁祸首:
MATCH ( e:Equipment )
WITH e.UUID as id, count(*) as count
WHERE count > 1
RETURN id;
最后还是部署的问题。部署了一个更新的 lucene 库,其中不包含该方法。
使用 ansible 在强化的 RHEL7 上部署了 NEO4j。 即使数据库为空,也无法创建约束。关于如何调试这个或可能是什么原因的任何想法?可以创建其他对象。这似乎是一些核心库的问题...... 我们在另一个运行良好的实例上进行了相同的安装,所以我想它一定与部署有关......即使没有安装错误
谢谢。
错误日志如下:
020-07-09 12:11:13.898+0000 错误 [o.n.b.v.r.ErrorReporter] 客户端触发意外错误 [Neo.DatabaseError.Schema.ConstraintCreationFailed]: 无法创建 CONSTRAINT ON ( equipment:Equipment ) 断言 equipment.UUID 是唯一的: , 参考 0a5adcde-dbeb-4ef0-b9aa-9bf32ef58e63。 2020-07-09 12:11:13.898+0000 错误 [o.n.b.v.r.ErrorReporter] 客户端触发了意外错误 [Neo.DatabaseError.Schema.ConstraintCreationFailed]:无法创建 CONSTRAINT ON ( equipment:Equipment ) ASSERT equipment.UUID 是独一无二的: , 参考 0a5adcde-dbeb-4ef0-b9aa-9bf32ef58e63。无法创建 CONSTRAINT ON ( equipment:Equipment ) 断言 equipment.UUID 是唯一的:
org.neo4j.kernel.impl.query.QueryExecutionKernelException:无法在 (equipment:Equipment) 上创建约束,断言 equipment.UUID 是唯一的:
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI.start(TransactionStateMachineSPI.java:158)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.startExecution(TransactionStateMachine.java:444)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.execute(TransactionStateMachine.java:259)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.run(TransactionStateMachine.java:240)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:81)
at org.neo4j.bolt.v1.runtime.BoltStateMachine$State.run(BoltStateMachine.java:457)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:225)
at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun(BoltMessageRouter.java:93)
at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.lambda$enqueue[=10=](MetricsReportingBoltConnection.java:69)
at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:195)
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:170)
at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError(ExecutorBoltScheduler.java:153)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.neo4j.kernel.impl.query.QueryExecutionKernelException: 无法创建 CONSTRAINT ON ( equipment:Equipment ) ASSERT equipment.UUID IS UNIQUE:
at org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:65)
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI.start(TransactionStateMachineSPI.java:144)
... 17 more
原因:org.neo4j.cypher.CypherExecutionException:无法在 (equipment:Equipment) 上创建约束 ASSERT equipment.UUID 是唯一的:
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslationSupport$class.translateException(ExceptionTranslationSupport.scala:35)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext.translateException(ExceptionTranslatingQueryContext.scala:41)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext.createUniqueConstraint(ExceptionTranslatingQueryContext.scala:128)
at org.neo4j.cypher.internal.runtime.interpreted.UpdateCountingQueryContext.createUniqueConstraint(UpdateCountingQueryContext.scala:125)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureCallOrSchemaCommandExecutionPlanBuilder$$anonfun.apply(ProcedureCallOrSchemaCommandExecutionPlanBuilder.scala:80)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureCallOrSchemaCommandExecutionPlanBuilder$$anonfun.apply(ProcedureCallOrSchemaCommandExecutionPlanBuilder.scala:78)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.PureSideEffectExecutionPlan.run(PureSideEffectExecutionPlan.scala:55)
at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run.apply(LatestRuntimeVariablePlannerCompatibility.scala:128)
at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run.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)
... 18 more
Caused by: org.neo4j.kernel.api.exceptions.schema.CreateConstraintFailureException: 无法创建约束 org.neo4j.kernel.api.schema.constaints.UniquenessConstraintDescriptor@6: 现有数据不满足 CONSTRAINT ON ( label[1]:label[1] ) ASSERT 标签[1].属性[0] 是唯一的:无法为 :Equipment(UUID) [提供者: {key=lucene+native, version=2.0}] [labelId: 1, properties [0]] 填充索引 在 org.neo4j.kernel.impl.newapi.Operations.indexBackedConstraintCreate(Operations.java:1239) 在 org.neo4j.kernel.impl.newapi.Operations.uniquePropertyConstraintCreate(Operations.java:943) 在 org.neo4j.internal.kernel.api.SchemaWrite.uniquePropertyConstraintCreate(SchemaWrite.java:66) 在 org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext.createUniqueConstraint(TransactionBoundQueryContext.scala:670) 在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$createUniqueConstraint$1.apply$mcZ$sp(ExceptionTranslatingQueryContext.scala:128) 在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$createUniqueConstraint$1.apply(ExceptionTranslatingQueryContext.scala:128) 在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$createUniqueConstraint$1.apply(ExceptionTranslatingQueryContext.scala:128) 在 org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslationSupport$class.translateException(ExceptionTranslationSupport.scala:33) ... 31 更多 Caused by: org.neo4j.kernel.api.exceptions.schema.UniquePropertyValueValidationException: 现有数据不满足 CONSTRAINT ON ( label[1]:label[1] ) ASSERT label[1].属性[0] IS UNIQUE: Failed to populate index for :Equipment(UUID) [provider: {key=lucene+native, version=2.0}] [labelId: 1, 属性 [0]] 在 org.neo4j.kernel.impl.api.state.ConstraintIndexCreator.awaitConstrainIndexPopulation(ConstraintIndexCreator.java:244) 在 org.neo4j.kernel.impl.api.state.ConstraintIndexCreator.createUniquenessConstraintIndex(ConstraintIndexCreator.java:135) 在 org.neo4j.kernel.impl.newapi.Operations.indexBackedConstraintCreate(Operations.java:1224) ... 38 更多 由以下原因引起:org.neo4j.kernel.api.exceptions.index.IndexPopulationFailedKernelException:无法为 :Equipment(UUID) 填充索引 [provider: {key=lucene+native, version=2.0}] [labelId: 1, properties [0]] 在 org.neo4j.kernel.impl.api.index.IndexPopulationFailure$1.asIndexPopulationFailure(IndexPopulationFailure.java:47) 在 org.neo4j.kernel.impl.api.index.FailedIndexProxy.failureCause(FailedIndexProxy.java:80) 在 org.neo4j.kernel.impl.api.index.FailedIndexProxy.awaitStoreScanCompleted(FailedIndexProxy.java:75) 在 org.neo4j.kernel.impl.api.index.FlippableIndexProxy.awaitStoreScanCompleted(FlippableIndexProxy.java:325) 在 org.neo4j.kernel.impl.api.index.AbstractDelegatingIndexProxy.awaitStoreScanCompleted(AbstractDelegatingIndexProxy.java:122) 在 org.neo4j.kernel.impl.api.state.ConstraintIndexCreator.awaitConstrainIndexPopulation(ConstraintIndexCreator.java:232) ... 还有 40 个 由以下原因引起:java.lang.NoSuchMethodError:org.apache.lucene.codecs.blocktree.BlockTreeTermsWriter.validateAutoPrefixSettings(II)V 在 org.apache.lucene.codecs.autoprefix.AutoPrefixPostingsFormat.(AutoPrefixPostingsFormat.java:77) 在 org.apache.lucene.codecs.autoprefix.AutoPrefixPostingsFormat.(AutoPrefixPostingsFormat.java:52) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(未知来源) 在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(来源不明) 在 java.lang.reflect.Constructor.newInstance(来源不明) 在 java.lang.Class.newInstance(来源不明) 在 org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:72) 在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:51) 在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:38) 在 org.apache.lucene.codecs.PostingsFormat$Holder.(PostingsFormat.java:49) 在 org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112) 在 org.apache.lucene.codecs.lucene62.Lucene62Codec.(Lucene62Codec.java:167) 在 org.apache.lucene.codecs.lucene62.Lucene62Codec.(Lucene62Codec.java:82) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(未知来源) 在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(来源不明) 在 java.lang.reflect.Constructor.newInstance(来源不明) 在 java.lang.Class.newInstance(来源不明) 在 org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:72) 在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:51) 在 org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:38) 在 org.apache.lucene.codecs.Codec$Holder.(Codec.java:47) 在 org.apache.lucene.codecs.Codec.getDefault(Codec.java:143) 在 org.apache.lucene.index.LiveIndexWriterConfig.(LiveIndexWriterConfig.java:121) 在 org.apache.lucene.index.IndexWriterConfig.(IndexWriterConfig.java:151) 在 org.neo4j.kernel.api.impl.index.IndexWriterConfigs.standard(IndexWriterConfigs.java:81) 在 org.neo4j.kernel.api.impl.index.IndexWriterConfigs.population(IndexWriterConfigs.java:119) 在 org.neo4j.kernel.api.impl.index.IndexWriterConfigs.population(IndexWriterConfigs.java:114) 在 org.neo4j.kernel.api.impl.index.partition.WritableIndexPartitionFactory.createPartition(WritableIndexPartitionFactory.java:45) 在 org.neo4j.kernel.api.impl.index.AbstractLuceneIndex.open(AbstractLuceneIndex.java:103) 在 org.neo4j.kernel.api.impl.index.WritableAbstractDatabaseIndex.open(WritableAbstractDatabaseIndex.java:62) 在 org.neo4j.kernel.api.impl.schema.populator.LuceneIndexPopulator.create(LuceneIndexPopulator.java:51) 在 org.neo4j.kernel.impl.index.schema.fusion.InstanceSelector.consume(InstanceSelector.java:147) 在 org.neo4j.kernel.impl.index.schema.fusion.InstanceSelector.forAll(InstanceSelector.java:90) 在 org.neo4j.kernel.impl.index.schema.fusion.FusionIndexPopulator.create(FusionIndexPopulator.java:56) 在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator$IndexPopulation.create(MultipleIndexPopulator.java:525) 在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.lambda$create$0(MultipleIndexPopulator.java:144) 在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.forEachPopulation(MultipleIndexPopulator.java:408) 在 org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.create(MultipleIndexPopulator.java:141) 在 org.neo4j.kernel.impl.api.index.IndexPopulationJob.run(IndexPopulationJob.java:103) 在 org.neo4j.kernel.impl.api.index.IndexPopulationJobController$IndexPopulationJobWrapper.run(IndexPopulationJobController.java:82) 在 org.neo4j.kernel.impl.scheduler.ThreadPool.lambda$submit$0(ThreadPool.java:58) 在 java.util.concurrent.Executors$RunnableAdapter.call(来源不明) 在 java.util.concurrent.FutureTask.run(来源不明) ... 还有 3 个
由于这个错误,数据库似乎不是空的:
Existing data does not satisfy CONSTRAINT ON ( label[1]:label[1] ) ASSERT label[1].property[0] IS UNIQUE
它抱怨无法创建约束,因为现有数据不满足约束。
您可以通过以下查询找到罪魁祸首:
MATCH ( e:Equipment )
WITH e.UUID as id, count(*) as count
WHERE count > 1
RETURN id;
最后还是部署的问题。部署了一个更新的 lucene 库,其中不包含该方法。