You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by "lmuppidi (via GitHub)" <gi...@apache.org> on 2025/10/13 06:15:09 UTC
[PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
lmuppidi opened a new pull request, #301:
URL: https://github.com/apache/jackrabbit/pull/301
From examples, FirstHop doesn't work as is from GitHub when 2.22.x is installed.
Made changes to pom.xml to address following issues
1) JDK version
2) Added dependency for missing jackrabbit-jcr-commons
3) Added version for <version>1.7.36</version>
4) Added org.apache.derby version as 10.14.2.0 to address missing EmbeddedDriver class issue while running FirstHop.java using the command mvn exec:java -Dexec.mainClass="org.apache.jackrabbit.firsthops.FirstHop"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3497655866
I tried with a clone from your fork and still can't get it to work:
/lib/jvm/jdk-11.0.27/bin/java -cp 'target/classes:C:\Users\jre\.m2\repository\javax\jcr\jcr\2.0\jcr-2.0.jar;C:\Users\jre\.m2\repository\org\apache\jackrabbit\jackrabbit-core\2.22.2\jackrabbit-core-2.22.2.jar;C:\Users\jre\.m2\repository\concurrent\concurrent\1.3.4\concurrent-1.3.4.jar;C:\Users\jre\.m2\repository\org\apache\commons\commons-collections4\4.5.0\commons-collections4-4.5.0.jar;C:\Users\jre\.m2\repository\commons-io\commons-io\2.17.0\commons-io-2.17.0.jar;C:\Users\jre\.m2\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;C:\Users\jre\.m2\repository\commons-pool\commons-pool\1.5.4\commons-pool-1.5.4.jar;C:\Users\jre\.m2\repository\org\apache\jackrabbit\oak-jackrabbit-api\1.82.0\oak-jackrabbit-api-1.82.0.jar;C:\Users\jre\.m2\repository\org\apache\jackrabbit\jackrabbit-data\2.22.2\jackrabbit-data-2.22.2.jar;C:\Users\jre\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.36\jcl-over-slf4j-1.7.36.jar;C:\Users\jre\.m2\repository\org\apache\jackrabbit\jackrabbit-spi-commons
\2.22.2\jackrabbit-spi-commons-2.22.2.jar;C:\Users\jre\.m2\repository\org\apache\jackrabbit\jackrabbit-spi\2.22.2\jackrabbit-spi-2.22.2.jar;C:\Users\jre\.m2\repository\org\apache\tika\tika-core\2.4.1\tika-core-2.4.1.jar;C:\Users\jre\.m2\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;C:\Users\jre\.m2\repository\org\apache\lucene\lucene-core\3.6.2\lucene-core-3.6.2.jar;C:\Users\jre\.m2\repository\org\apache\jackrabbit\jackrabbit-jcr-commons\2.22.2\jackrabbit-jcr-commons-2.22.2.jar;C:\Users\jre\.m2\repository\org\slf4j\slf4j-reload4j\1.7.36\slf4j-reload4j-1.7.36.jar;C:\Users\jre\.m2\repository\ch\qos\reload4j\reload4j\1.2.19\reload4j-1.2.19.jar' org.apache.jackrabbit.firsthops.FirstHop
Fehler: Hauptklasse org.apache.jackrabbit.firsthops.FirstHop konnte nicht gefunden oder geladen werden
Ursache: java.lang.ClassNotFoundException: org.apache.jackrabbit.firsthops.FirstHop
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3402823695
Please check with my changes in https://issues.apache.org/jira/browse/JCR-5198
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "lmuppidi (via GitHub)" <gi...@apache.org>.
lmuppidi commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3402755933
I do see the main method in the Java file (Github). Are you compiling it in Jdk11?
` public static void main(String[] args) throws Exception {
Repository repository = JcrUtils.getRepository();
Session session = repository.login(new GuestCredentials());
try {
String user = session.getUserID();
String name = repository.getDescriptor(Repository.REP_NAME_DESC);
System.out.println("Logged in as " + user + " to a " + name
+ " repository.");
} finally {
session.logout();
}
}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "lmuppidi (via GitHub)" <gi...@apache.org>.
lmuppidi commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3402952258
Yes I get the same error with your pom.xml changes. May be classloading issue with the Maven exec plugin...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "lmuppidi (via GitHub)" <gi...@apache.org>.
lmuppidi commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3402810796
Did you apply the pom.xml changes from this pull request for running FirstHop locally.
pom.xml was using java 1.5 before the change. Also check the version for <artifactId>exec-maven-plugin</artifactId>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "lmuppidi (via GitHub)" <gi...@apache.org>.
lmuppidi commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3409134889
Please review the changes again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3401448517
Thanks for the report. Seems it hasb't been tried for ages.
I fixed a few things in https://github.com/apache/jackrabbit/pull/302 (branch: JCR-5198), but I'm not sure about your Derby issue.
How do I check that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3402724282
I am (with my changes) getting:
~~~
[WARNING]
java.lang.Exception: The specified mainClass doesn't contain a main method with appropriate signature.
at org.codehaus.mojo.exec.ExecJavaMojo.lambda$execute$0 (ExecJavaMojo.java:294)
at java.lang.Thread.run (Thread.java:834)
Caused by: java.lang.NoSuchMethodException: No suitable main method found for class org.apache.jackrabbit.firsthops.FirstHop, and not Runnable
at org.codehaus.mojo.exec.ExecJavaMojo.doExec (ExecJavaMojo.java:404)
at org.codehaus.mojo.exec.ExecJavaMojo.lambda$execute$0 (ExecJavaMojo.java:289)
at java.lang.Thread.run (Thread.java:834)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.082 s
[INFO] Finished at: 2025-10-14T18:29:47+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.6.1:java (default-cli) on project jackrabbit-firsthops: An exception occurred while executing the Java class. The specified mainClass doesn't contain a main method with appropriate signature.: No suitable main method found for class org.apache.jackrabbit.firsthops.FirstHop, and not Runnable -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "lmuppidi (via GitHub)" <gi...@apache.org>.
lmuppidi commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3402639480
I got this runtime error while trying to run the FirstHop example class.
mvn exec:java -Dexec.mainClass="org.apache.jackrabbit.firsthops.FirstHop"
Exception:-
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
javax.jcr.RepositoryException: Cannot instantiate persistence manager
Attached the complete stack trace.
[FirstHop Exception Stack Trace.rtf](https://github.com/user-attachments/files/22908726/FirstHop.Exception.Stack.Trace.rtf)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pom.xml changes for running FirstHop.java with jackrabbit 2.22.x [jackrabbit]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #301:
URL: https://github.com/apache/jackrabbit/pull/301#issuecomment-3402774945
Yes.
~~~
$ echo $JAVA_HOME/
/lib/jvm/jdk-11.0.27/
~~~
This is really strange.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org