This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 8c225e6d7c upgrade neo4j java driver to 6.2.0, fixes #7739 (#7740)
8c225e6d7c is described below
commit 8c225e6d7cf937993a9855eabc75ab7200f98b15
Author: Bart Maertens <[email protected]>
AuthorDate: Mon Aug 3 08:56:57 2026 +0200
upgrade neo4j java driver to 6.2.0, fixes #7739 (#7740)
---
assemblies/static/src/main/resources/LICENSE | 2 +-
plugins/tech/neo4j/pom.xml | 18 +++++-------------
.../org/apache/hop/neo4j/shared/NeoConnection.java | 5 +++++
.../org/apache/hop/neo4j/transforms/cypher/Cypher.java | 6 +++---
.../apache/hop/neo4j/transforms/graph/GraphOutput.java | 8 ++++++--
.../hop/neo4j/transforms/output/Neo4JOutput.java | 2 +-
6 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/assemblies/static/src/main/resources/LICENSE
b/assemblies/static/src/main/resources/LICENSE
index 6bd561967f..dc2e95e1e1 100644
--- a/assemblies/static/src/main/resources/LICENSE
+++ b/assemblies/static/src/main/resources/LICENSE
@@ -1828,7 +1828,7 @@ This product bundles mxdump 0.14, which is available
under a
This product bundles native-protocol 1.5.1, which is available under a
"Apache 2.0" license. For details, see LICENSE.
-This product bundles neo4j-java-driver 5.15.0, which is available under a
+This product bundles neo4j-java-driver-all 6.2.0, which is available under a
"Apache 2.0" license. For details, see LICENSE.
This product bundles netty-all 4.2.15.Final, which is available under a
diff --git a/plugins/tech/neo4j/pom.xml b/plugins/tech/neo4j/pom.xml
index bee4fe33f6..11f4050bda 100755
--- a/plugins/tech/neo4j/pom.xml
+++ b/plugins/tech/neo4j/pom.xml
@@ -29,7 +29,7 @@
<name>Hop Plugins Technology Neo4j</name>
<properties>
- <neo4j.driver.version>5.15.0</neo4j.driver.version>
+ <neo4j.driver.version>6.2.0</neo4j.driver.version>
<testcontainers.version>1.21.4</testcontainers.version>
</properties>
@@ -46,21 +46,13 @@
</dependencyManagement>
<dependencies>
+ <!-- The "-all" artifact shades Netty and Reactor under
+ org.neo4j.driver.internal.shaded, so the driver is independent of
the
+ Netty and Reactor versions shipped in lib/core. -->
<dependency>
<groupId>org.neo4j.driver</groupId>
- <artifactId>neo4j-java-driver</artifactId>
+ <artifactId>neo4j-java-driver-all</artifactId>
<version>${neo4j.driver.version}</version>
- <exclusions>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>io.projectreactor</groupId>
- <artifactId>reactor-core</artifactId>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
diff --git
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/shared/NeoConnection.java
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/shared/NeoConnection.java
index fb55feec08..f0be18b4d4 100644
---
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/shared/NeoConnection.java
+++
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/shared/NeoConnection.java
@@ -405,6 +405,11 @@ public class NeoConnection extends HopMetadataBase
implements IHopMetadata {
//
configBuilder =
configBuilder.withLogging(Logging.javaUtilLogging(Level.WARNING));
+ // Driver 6.1 retries auto-commit queries once by default. Transforms
writing with
+ // auto-commit are not necessarily idempotent, so keep the pre-6.1
behaviour.
+ //
+ configBuilder = configBuilder.withAutoCommitRetriesDisabled(true);
+
Config config = configBuilder.build();
Driver driver;
diff --git
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java
index e1d6cb6164..7831e42aa5 100644
---
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java
+++
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java
@@ -595,11 +595,11 @@ public class Cypher extends BaseTransform<CypherMeta,
CypherData> {
boolean error = false;
ResultSummary summary = result.consume();
for (Notification notification : summary.notifications()) {
- if ("WARNING".equalsIgnoreCase(notification.severity())) {
+ if
(notification.rawSeverityLevel().filter("WARNING"::equalsIgnoreCase).isPresent())
{
// Log it
if (isBasic()) {
logBasic(
- notification.severity()
+ notification.rawSeverityLevel().orElse("")
+ " : "
+ notification.title()
+ " : "
@@ -612,7 +612,7 @@ public class Cypher extends BaseTransform<CypherMeta,
CypherData> {
} else {
// This is an error
//
- logError(notification.severity() + " : " + notification.title());
+ logError(notification.rawSeverityLevel().orElse("") + " : " +
notification.title());
logError(
notification.code()
+ " : "
diff --git
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/graph/GraphOutput.java
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/graph/GraphOutput.java
index 36546916c6..1904afa6fc 100644
---
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/graph/GraphOutput.java
+++
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/graph/GraphOutput.java
@@ -611,7 +611,11 @@ public class GraphOutput extends
BaseNeoTransform<GraphOutputMeta, GraphOutputDa
ResultSummary summary = result.consume();
boolean hasErrors = false;
for (Notification notification : summary.notifications()) {
- logError(notification.title() + " (" +
notification.severity() + ")");
+ logError(
+ notification.title()
+ + " ("
+ + notification.rawSeverityLevel().orElse("")
+ + ")");
logError(
notification.code()
+ " : "
@@ -644,7 +648,7 @@ public class GraphOutput extends
BaseNeoTransform<GraphOutputMeta, GraphOutputDa
boolean errors = false;
ResultSummary summary = result.consume();
for (Notification notification : summary.notifications()) {
- logError(notification.title() + " (" + notification.severity() + ")");
+ logError(notification.title() + " (" +
notification.rawSeverityLevel().orElse("") + ")");
logError(
notification.code()
+ " : "
diff --git
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/output/Neo4JOutput.java
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/output/Neo4JOutput.java
index de3f76276c..f32b7ef209 100644
---
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/output/Neo4JOutput.java
+++
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/output/Neo4JOutput.java
@@ -907,7 +907,7 @@ public class Neo4JOutput extends
BaseNeoTransform<Neo4JOutputMeta, Neo4JOutputDa
boolean error = false;
ResultSummary summary = result.consume();
for (Notification notification : summary.notifications()) {
- logError(notification.title() + " (" + notification.severity() + ")");
+ logError(notification.title() + " (" +
notification.rawSeverityLevel().orElse("") + ")");
logError(
notification.code()
+ " : "