cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

"Executing queries that use periodic commit in an open transaction is not possible

When i am running LOAD csv using periodic commit from spring neo4j i am getting exception like
nested exception is org.neo4j.driver.v1.exceptions.ClientException: Executing queries that use periodic commit in an open transaction is not possible.] with root cause

org.neo4j.driver.v1.exceptions.ClientException: Executing queries that use periodic commit in an open transaction is not possible.

4 REPLIES 4

The USING PERIODIC COMMIT part of the LOAD CSV is incompatible with the way APOC executes Cypher subqueries. You might try using apoc.load.csv() instead.

If I run my load in the Neo4j Browser using
:auto USING PERIODIC COMMIT 1000 .....LOAD CSV WITH HEADERS FROM 'file: bla bla.
the bulk load works.
If I drop the ":auto" prefix causes it to fail on the same "Executing queries that use periodic commit in an open transaction is not possible"

So.. I tried to run what worked in the browser in my java application.
Im not using APOC in my query.
Behold.. it fails to understand what the ":auto" is about.
Remove it and as expected the "..periodic commit in an open transaction.." error comes back.
Can you point to any working example of a java application Load CSV ... ?

This error, "Executing queries that use periodic commit in an open transaction is not possible", shows up whenever the .csv file has less than 1000 number of rows. Take out the periodic commit and it runs smoothly.

There was a similar post: Error while import

The :auto is not Cypher, it's a command for the Browser and Cypher-shell applications to instruct them to execute the transaction in auto-commit mode.

It's the applications, not the driver, that knows about those commands, so your own application using the driver has no idea what :commit is or what to do about it.

For a Java driver to execute a USING PERIODIC COMMIT LOAD CSV query, the query must be executed via auto-commit, and not through a transactional function.