From e0b03b6a621cff0ee116e5a7165d31569629cfbd Mon Sep 17 00:00:00 2001 From: lmuppidi <44202516+lmuppidi@users.noreply.github.com> Date: Mon, 13 Oct 2025 01:08:12 -0500 Subject: [PATCH 1/3] Update pom.xml Using the latest stable release Apache Jackrabbit 2.22.x (Java 11 and later), I am trying to run example FirstHop.java and it failed with several errors. Including JDK version, which was given as 1.5 in the pom before, missing dependency for jackrabbit-jcr-commons. Another Problem was Derby 10.15.2.0 had EmbeddedDriver class location changes which resulted in javax.jcr.RepositoryException: Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver Made changes to pom.xml file to Derby 10.14.2.0 for compatibility reasons. --- examples/jackrabbit-firsthops/pom.xml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/examples/jackrabbit-firsthops/pom.xml b/examples/jackrabbit-firsthops/pom.xml index aba9b44e573..914dcee5984 100644 --- a/examples/jackrabbit-firsthops/pom.xml +++ b/examples/jackrabbit-firsthops/pom.xml @@ -42,6 +42,13 @@ 2.12.1 + + + org.apache.jackrabbit + jackrabbit-jcr-commons + 2.22.2 + + + + org.apache.derby + derby + 10.14.2.0 + + @@ -70,11 +85,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.8.1 - 1.5 - 1.5 - 1.5 + 11 + 11 true false true From 93f9710491a6b59dcbac8dbcf6cc5e4a822af5fa Mon Sep 17 00:00:00 2001 From: lmuppidi <44202516+lmuppidi@users.noreply.github.com> Date: Mon, 13 Oct 2025 01:09:32 -0500 Subject: [PATCH 2/3] Update pom.xml --- examples/jackrabbit-firsthops/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/jackrabbit-firsthops/pom.xml b/examples/jackrabbit-firsthops/pom.xml index 914dcee5984..0bfbe07b678 100644 --- a/examples/jackrabbit-firsthops/pom.xml +++ b/examples/jackrabbit-firsthops/pom.xml @@ -39,7 +39,7 @@ org.apache.jackrabbit jackrabbit-core - 2.12.1 + 2.22.2 From 938138e61c9c2e126e97bda461e9966cb616bcbe Mon Sep 17 00:00:00 2001 From: lmuppidi <44202516+lmuppidi@users.noreply.github.com> Date: Wed, 15 Oct 2025 23:28:13 -0500 Subject: [PATCH 3/3] Update pom.xml Ran the commands in the following sequence. mvn clean compile, mvn dependency:build-classpath -Dmdep.outputFile=classpath.txt java -cp "target/classes:$(cat classpath.txt)" org.apache.jackrabbit.firsthops.FirstHop and received the expected output. Logged in as anonymous to a Jackrabbit repository. --- examples/jackrabbit-firsthops/pom.xml | 52 +++++++++------------------ 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/examples/jackrabbit-firsthops/pom.xml b/examples/jackrabbit-firsthops/pom.xml index 0bfbe07b678..04aa6628746 100644 --- a/examples/jackrabbit-firsthops/pom.xml +++ b/examples/jackrabbit-firsthops/pom.xml @@ -19,6 +19,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + + org.apache.jackrabbit + jackrabbit-parent + 2.22.2 + ../../jackrabbit-parent/pom.xml + + org.apache.jackrabbit jackrabbit-firsthops 0.1-SNAPSHOT @@ -30,9 +37,8 @@ - javax.jcr - jcr - 2.0 + javax.jcr + jcr @@ -43,12 +49,12 @@ - - org.apache.jackrabbit - jackrabbit-jcr-commons - 2.22.2 + + org.apache.jackrabbit + jackrabbit-jcr-commons + 2.22.2 - + - - org.apache.derby - derby - 10.14.2.0 + ${slf4j.version} + - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 11 - 11 - true - false - true - false - - - - -