簡體   English   中英

spring-data-neo4j中CREATE上的Unclosed括號異常

[英]Unclosed Parenthesis exception on CREATE in spring-data-neo4j

我正在運行Spring Data Neo4j 2.3.3版。 當我嘗試通過GraphRepository執行CREATE語句時,我收到以下異常:

org.springframework.dao.InvalidDataAccessResourceUsageException: Error executing statement ...  nested exception is Unclosed parenthesis
"CREATE (:line{id:1})-[:ROOT]->(:point{id:10})-[:NEXT]->(:point{id:11})-[:NEXT]->(:point{id:12})-[:NEXT]->(p:point{id:13})"
         ^

...只是隱藏在它下面打印的相同的東西, ^出現在正確的地方。 正如您所看到的,如果您查看我的查詢,則沒有未公開的括號。 這里發生了什么?

編輯:出於測試目的,我嘗試將語句縮減為: CREATE (:line{id:1}) ,我得到相同的結果。

編輯:我嘗試升級我的pom使用版本3.0.0,現在我得到以下異常:

 Error creating bean with name 'controller': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.example.model.LineRepo org.example.controller.Controller.lineRepo; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lineRepo': Cannot resolve reference to bean 'neo4jTemplate' while setting bean property 'neo4jTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.data.neo4j.config.Neo4jConfiguration#0': Cannot resolve reference to bean 'graphDatabaseService' while setting bean property 'graphDatabaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphDatabaseService' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.neo4j.kernel.EmbeddedGraphDatabase]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions@61634a3b' failed to initialize. Please see attached cause exception.

給出的最深層根本原因是:

java.lang.NoSuchMethodError: org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction.getOrCreateThirdPartyFileSystem(Ljava/lang/Class;Lorg/neo4j/helpers/Function;)Lorg/neo4j/kernel/impl/nioneo/store/FileSystemAbstraction$ThirdPartyFileSystem;

除了升級依賴項之外,沒有任何改變。 它所指的'controller'是我用GraphRepository @Autowired的控制器

Spring Data Neo4j 2.3.3適用於Neo4j 1.9,它不支持標簽(您在Cypher中使用的語法)。 您需要使用3.0.0才能獲得Neo4j 2.0支持。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM