org.neo4j.driver.v1.exceptions.ClientException: You are using a session from multiple locations at the same time, which is not supported. If you want to use multiple threads, you should ensure that each session is used by only one thread at a time. One way to do that is to give each thread its own dedicated session.

GitHub | graemerocher | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Version 1.0.2 of Java driver not thread safe

    GitHub | 9 months ago | graemerocher
    org.neo4j.driver.v1.exceptions.ClientException: You are using a session from multiple locations at the same time, which is not supported. If you want to use multiple threads, you should ensure that each session is used by only one thread at a time. One way to do that is to give each thread its own dedicated session.

    Root Cause Analysis

    1. org.neo4j.driver.v1.exceptions.ClientException

      You are using a session from multiple locations at the same time, which is not supported. If you want to use multiple threads, you should ensure that each session is used by only one thread at a time. One way to do that is to give each thread its own dedicated session.

      at org.neo4j.driver.internal.connector.ConcurrencyGuardingConnection.markAsInUse()
    2. org.neo4j.driver
      PooledConnection.run
      1. org.neo4j.driver.internal.connector.ConcurrencyGuardingConnection.markAsInUse(ConcurrencyGuardingConnection.java:192)
      2. org.neo4j.driver.internal.connector.ConcurrencyGuardingConnection.run(ConcurrencyGuardingConnection.java:65)
      3. org.neo4j.driver.internal.pool.PooledConnection.run(PooledConnection.java:64)
      3 frames