我正在使用以下cypher脚本尝试neo4j-jdbc和mybatis:
MATCH (p:CouponProgram)-[r]->(s:Solution) RETURN labels(p)[0] as src, id(p) as srcId, p.name as srcName, p.code as srcCode, p.discount as srcDiscount, type(r) as relation, labels(s)[0] as tgt, id(s) as tgtId, s.description as tgtDescription
然而,当mybatis执行相同的脚本时,我得到了#34; java.lang.StackOverflowError"错误:
2017-10-18 07:16:39.579 DEBUG 37849 --- [nio-8080-exec-2] c.e.n.mapper.Neo4jMapper.getAll4Test02 : ==> Preparing: MATCH (p:CouponProgram)-[r]->(s:Solution) RETURN labels(p)[0] as src, id(p) as srcId, p.name as srcName, p.code as srcCode, p.discount as srcDiscount, type(r) as relation, labels(s)[0] as tgt, id(s) as tgtId, s.description as tgtDescription
2017-10-18 07:16:39.587 DEBUG 37849 --- [nio-8080-exec-2] c.e.n.mapper.Neo4jMapper.getAll4Test02 : ==> Parameters:
2017-10-18 07:16:39.634 DEBUG 37849 --- [nio-8080-exec-2] c.e.n.mapper.Neo4jMapper.getAll4Test02 : <== Total: 10
2017-10-18 07:16:46.787 ERROR 37849 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.StackOverflowError] with root cause
java.lang.StackOverflowError: null
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:293) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.3.jar:4.5.3]
at org.neo4j.jdbc.http.driver.CypherExecutor.getServerVersion(CypherExecutor.java:254) ~[neo4j-jdbc-driver-3.1.0.jar:na]
at org.neo4j.jdbc.http.HttpDatabaseMetaData.<init>(HttpDatabaseMetaData.java:38) ~[neo4j-jdbc-driver-3.1.0.jar:na]
at org.neo4j.jdbc.http.HttpDatabaseMetaData.<init>(HttpDatabaseMetaData.java:43) ~[neo4j-jdbc-driver-3.1.0.jar:na]
at org.neo4j.jdbc.http.HttpConnection.getMetaData(HttpConnection.java:105) ~[neo4j-jdbc-driver-3.1.0.jar:na]
at org.neo4j.jdbc.http.HttpConnection.getMetaData(HttpConnection.java:40) ~[neo4j-jdbc-driver-3.1.0.jar:na]
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:254) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:259) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:259) ~[mybatis-3.4.5.jar:3.4.5]
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getNextResultSet(DefaultResultSetHandler.java:259) ~[mybatis-3.4.5.jar:3.4.5]
当我在mybatis执行脚本后检查结果集时,我发现结果集为空?!
请告知。