You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// assert correct line count
LOAD CSV WITH HEADERS FROM "file:///path/to/empty.csv" AS line
RETURN count(*);
empty.csv is an empty (0 byte) file.
Expected behavior
An error like "Invalid CSV" is returned. The error is recoverable in the client session, and the server does not log an exception.
Actual behavior
The cypher-shell session shows this error, and is no longer usable:
next on empty iterator
Exception in thread "Thread-0" org.neo4j.driver.v1.exceptions.ClientException: Cannot run more statements in the current session as an unrecoverable error has happened. Please close the current session and re-run your statement in a new session.
at org.neo4j.driver.internal.NetworkSession.ensureNoUnrecoverableError(NetworkSession.java:274)
at org.neo4j.driver.internal.NetworkSession.reset(NetworkSession.java:132)
at org.neo4j.shell.state.BoltStateHandler.reset(BoltStateHandler.java:169)
at org.neo4j.shell.CypherShell.reset(CypherShell.java:183)
at org.neo4j.shell.CypherShell$1.run(CypherShell.java:190)
This is logged in the server's debug.log:
2017-04-01 18:28:17.784+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [UnknownError]: next on empty iterator. See debug.log for more details, reference a937cd46-55dd-44c6-b91a-ab0745c8cb90.
2017-04-01 18:28:17.784+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [UnknownError]: next on empty iterator, reference a937cd46-55dd-44c6-b91a-ab0745c8cb90. next on empty iterator
java.util.NoSuchElementException: next on empty iterator
at scala.collection.Iterator$$anon$2.next(Iterator.scala:39)
at scala.collection.Iterator$$anon$2.next(Iterator.scala:37)
at org.neo4j.cypher.internal.compiler.v3_1.spi.CSVResources$$anon$1.next(CSVResources.scala:101)
at org.neo4j.cypher.internal.compiler.v3_1.spi.CSVResources$$anon$1.next(CSVResources.scala:79)
at org.neo4j.cypher.internal.compiler.v3_1.pipes.LoadCSVPipe$$anonfun$internalCreateResults$1.apply(LoadCSVPipe.scala:111)
at org.neo4j.cypher.internal.compiler.v3_1.pipes.LoadCSVPipe$$anonfun$internalCreateResults$1.apply(LoadCSVPipe.scala:103)
at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:434)
at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at org.neo4j.cypher.internal.compiler.v3_1.pipes.EagerAggregationPipe.internalCreateResults(EagerAggregationPipe.scala:101)
at org.neo4j.cypher.internal.compiler.v3_1.pipes.PipeWithSource.createResults(Pipe.scala:131)
at org.neo4j.cypher.internal.compiler.v3_1.pipes.PipeWithSource.createResults(Pipe.scala:128)
at org.neo4j.cypher.internal.compiler.v3_1.executionplan.DefaultExecutionResultBuilderFactory$ExecutionWorkflowBuilder.createResults(DefaultExecutionResultBuilderFactory.scala:98)
at org.neo4j.cypher.internal.compiler.v3_1.executionplan.DefaultExecutionResultBuilderFactory$ExecutionWorkflowBuilder.build(DefaultExecutionResultBuilderFactory.scala:68)
at org.neo4j.cypher.internal.compiler.v3_1.executionplan.InterpretedExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1.apply(ExecutionPlanBuilder.scala:164)
at org.neo4j.cypher.internal.compiler.v3_1.executionplan.InterpretedExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1.apply(ExecutionPlanBuilder.scala:148)
at org.neo4j.cypher.internal.compiler.v3_1.executionplan.InterpretedExecutionPlanBuilder$$anon$1.run(ExecutionPlanBuilder.scala:123)
at org.neo4j.cypher.internal.compatibility.CompatibilityFor3_1$ExecutionPlanWrapper$$anonfun$run$1.apply(CompatibilityFor3_1.scala:277)
at org.neo4j.cypher.internal.compatibility.CompatibilityFor3_1$ExecutionPlanWrapper$$anonfun$run$1.apply(CompatibilityFor3_1.scala:275)
at org.neo4j.cypher.internal.compatibility.exceptionHandlerFor3_1$runSafely$.apply(CompatibilityFor3_1.scala:192)
at org.neo4j.cypher.internal.compatibility.CompatibilityFor3_1$ExecutionPlanWrapper.run(CompatibilityFor3_1.scala:275)
at org.neo4j.cypher.internal.PreparedPlanExecution.execute(PreparedPlanExecution.scala:26)
at org.neo4j.cypher.internal.ExecutionEngine.execute(ExecutionEngine.scala:107)
at org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:59)
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI$1.start(TransactionStateMachineSPI.java:135)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.run(TransactionStateMachine.java:187)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:77)
at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$2.run(BoltStateMachine.java:396)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:196)
at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun$3(BoltMessageRouter.java:80)
at org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.execute(RunnableBoltWorker.java:135)
at org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.run(RunnableBoltWorker.java:89)
at java.lang.Thread.run(Thread.java:745)
The text was updated successfully, but these errors were encountered:
Running
LOAD CSV WITH HEADERS
with an empty CSV file causes an unexpected, unrecoverable error.Neo4j Version: 3.1.3
Operating System: macOS 10.12.3
API: Cypher
Steps to reproduce
Run this in
cypher-shell
:empty.csv
is an empty (0 byte) file.Expected behavior
An error like "Invalid CSV" is returned. The error is recoverable in the client session, and the server does not log an exception.
Actual behavior
The cypher-shell session shows this error, and is no longer usable:
This is logged in the server's
debug.log
:The text was updated successfully, but these errors were encountered: