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
public static void main(String[] args) {
var boltUrl = "bolt+s://%s".formatted(address);
var driver = GraphDatabase.driver(boltUrl, AuthTokens.basic(username, password));
for (int i = 1; i <= 20; i++) {
driver.executableQuery("CREATE (:TestSource {name: $name})")
.withParameters(Map.of("name", "name-" + i))
.execute();
}
var result = driver.executableQuery("MATCH (a: TestSource) RETURN count(a) as count").execute();
var count = result.records().get(0).get("count").asInt();
System.out.println("Count: " + count);
driver.close();
}
Execution will stuck at this line var result = driver.executableQuery("MATCH (a: TestSource) RETURN count(a) as count").execute();
After doing some debugging I found that the messageDecoderCumulator property is read at this line. Since the JSM is enabled and this property is not allowed to be read the JVM throws a SecurityException and I believe the code calls here doesn't properly handle the exception and causes client to stuck. It worked after adding this line to policy file permission java.util.PropertyPermission "messageDecoderCumulator", "read";.
It's not trivial to find the cause since there is no log, I could find it after several hours 🤦
The text was updated successfully, but these errors were encountered:
hzerip
changed the title
No query is returned even though there is data
Client stuck on query execution with security manager enabled
Aug 2, 2024
Neo4j version: 5-aura
Neo4j Mode: AuraDB
Driver version: Java language driver 5.22.0
Operating system: macOS/Linux
Steps to reproduce
Execution will stuck at this line
var result = driver.executableQuery("MATCH (a: TestSource) RETURN count(a) as count").execute();
After doing some debugging I found that the
messageDecoderCumulator
property is read at this line. Since the JSM is enabled and this property is not allowed to be read the JVM throws a SecurityException and I believe the code calls here doesn't properly handle the exception and causes client to stuck. It worked after adding this line to policy filepermission java.util.PropertyPermission "messageDecoderCumulator", "read";
.It's not trivial to find the cause since there is no log, I could find it after several hours 🤦
The text was updated successfully, but these errors were encountered: