You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by na...@apache.org on 2023/03/08 23:23:24 UTC

[hop] branch 2528 created (now 70a15e7532)

This is an automated email from the ASF dual-hosted git repository.

nadment pushed a change to branch 2528
in repository https://gitbox.apache.org/repos/asf/hop.git


      at 70a15e7532 Derby database type don't work #2528

This branch includes the following new commits:

     new 70a15e7532 Derby database type don't work #2528

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[hop] 01/01: Derby database type don't work #2528

Posted by na...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nadment pushed a commit to branch 2528
in repository https://gitbox.apache.org/repos/asf/hop.git

commit 70a15e753271a144fb254c83183a248ec870f845
Author: Nicolas Adment <39...@users.noreply.github.com>
AuthorDate: Thu Mar 9 00:22:55 2023 +0100

    Derby database type don't work #2528
---
 .../hop-user-manual/modules/ROOT/pages/database/databases/derby.adoc | 5 ++++-
 .../main/java/org/apache/hop/databases/derby/DerbyDatabaseMeta.java  | 2 +-
 .../java/org/apache/hop/databases/derby/DerbyDatabaseMetaTest.java   | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/hop-user-manual/modules/ROOT/pages/database/databases/derby.adoc b/docs/hop-user-manual/modules/ROOT/pages/database/databases/derby.adoc
index b8482dbacf..8c5e9f827c 100644
--- a/docs/hop-user-manual/modules/ROOT/pages/database/databases/derby.adoc
+++ b/docs/hop-user-manual/modules/ROOT/pages/database/databases/derby.adoc
@@ -28,6 +28,9 @@ under the License.
 |Version Included | 10.15.1.3
 |Hop Dependencies | None
 |Documentation | https://db.apache.org/derby/derby_downloads.html[Documentation Link]
-|JDBC Url | jdbc:derby:myDB
+|JDBC Url | jdbc:derby:<host>[:<port>]/<database>
+|JDBC Url Embedded | jdbc:derby:<database>
 |Driver folder | Hop Installation/plugins/databases/derby/lib
 |===
+
+NOTE: Derby JDBC driver has two different modes, if you want to use Derby Embbeded, replace the _derbyclient.jar_ file with _derby.jar_
\ No newline at end of file
diff --git a/plugins/databases/derby/src/main/java/org/apache/hop/databases/derby/DerbyDatabaseMeta.java b/plugins/databases/derby/src/main/java/org/apache/hop/databases/derby/DerbyDatabaseMeta.java
index 780fd86005..abac25342f 100644
--- a/plugins/databases/derby/src/main/java/org/apache/hop/databases/derby/DerbyDatabaseMeta.java
+++ b/plugins/databases/derby/src/main/java/org/apache/hop/databases/derby/DerbyDatabaseMeta.java
@@ -51,7 +51,7 @@ public class DerbyDatabaseMeta extends BaseDatabaseMeta implements IDatabase {
     if (Utils.isEmpty(getHostname())) {
       return "org.apache.derby.jdbc.EmbeddedDriver";
     } else {
-      return "org.apache.derby.jdbc.ClientDriver";
+      return "org.apache.derby.client.ClientAutoloadedDriver";
     }
   }
 
diff --git a/plugins/databases/derby/src/test/java/org/apache/hop/databases/derby/DerbyDatabaseMetaTest.java b/plugins/databases/derby/src/test/java/org/apache/hop/databases/derby/DerbyDatabaseMetaTest.java
index 331fcf2b6e..413c1307a6 100644
--- a/plugins/databases/derby/src/test/java/org/apache/hop/databases/derby/DerbyDatabaseMetaTest.java
+++ b/plugins/databases/derby/src/test/java/org/apache/hop/databases/derby/DerbyDatabaseMetaTest.java
@@ -51,7 +51,7 @@ public class DerbyDatabaseMetaTest {
 
     assertEquals("org.apache.derby.jdbc.EmbeddedDriver", nativeMeta.getDriverClass());
     nativeMeta.setHostname("FOOHOST");
-    assertEquals("org.apache.derby.jdbc.ClientDriver", nativeMeta.getDriverClass());
+    assertEquals("org.apache.derby.client.ClientAutoloadedDriver", nativeMeta.getDriverClass());
 
     assertEquals("jdbc:derby://FOO/WIBBLE", nativeMeta.getURL("FOO", "", "WIBBLE"));
     assertEquals("jdbc:derby://FOO:BAR/WIBBLE", nativeMeta.getURL("FOO", "BAR", "WIBBLE"));