1
我有一個用例,我需要在neo4j中的並行線程中運行我的存儲過程。我寫了存儲過程,並將其包含在neo4j插件中。但是,當我運行的是存儲過程我得到以下錯誤:在neo4j中獲取以下錯誤「java.lang.UnsupportedOperationException:.....」
2016-06-24 05:45:54.683+0000 INFO Remote interface available at http://localhost:7474/
java.lang.UnsupportedOperationException: Creating new transactions and/or spawning threads are not supported operations in store procedures.
at org.neo4j.kernel.impl.proc.ProcedureGDBFacadeSPI.assertSameThread(ProcedureGDBFacadeSPI.java:108)
at org.neo4j.kernel.impl.proc.ProcedureGDBFacadeSPI.isInOpenTransaction(ProcedureGDBFacadeSPI.java:124)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:335)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTx(GraphDatabaseFacade.java:330)
at example.SearchTask.call(SearchTask.java:33)
at example.SearchTask.call(SearchTask.java:17)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
我已經明白,在Neo4j的定製存儲過程不能並行線程運行。
但我期待有什麼方法可以讓我平行運行。
謝謝你正在工作 –
謝謝@Stefan Armbruster,你真的救了我! –