Am following up this article[0], where i can observe that if i use
Repository repository = JcrUtils.getRepository("http://localhost:4502/crx/server");
am able to see the below error.
And also has observed that if i use without any server crx detail like
Repository repository = JcrUtils.getRepository();
then it works and shows the output.
[0] https://helpx.adobe.com/experience-manager/using/programmatically-accessing-cq-content-usi ng.html
Solved! Go to Solution.
Views
Replies
Total Likes
kk krish wrote...
Still able to see same error, Attached is my simple java class and pom file which am using, and below is command for running project.
mvn exec:java -Dexec.mainClass="com.org.krish.test.GetRepository"
Everything looks good except the dependency. Add the below dependency and it should work:
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr2dav</artifactId>
<version>2.4.0</version>
</dependency>
Thanks.
Views
Replies
Total Likes
According to this[0], any http(s) URI would use the org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory [1] and I'm not seeing that as one of the RepositoryFactory classes that were consulted. Not exactly an answer, but maybe that'll help you further troubleshoot the issue.
[0] https://jackrabbit.apache.org/api/2.8/org/apache/jackrabbit/commons/JcrUtils.html#getRepository(java...)
[1] https://jackrabbit.apache.org/api/2.2/org/apache/jackrabbit/jcr2dav/Jcr2davRepositoryFactory.html
Views
Replies
Total Likes
I ran into the same issue. I added the below code in the first line of my application and it worked correctly.
org.apache.log4j.BasicConfigurator.configure();
Views
Replies
Total Likes
This article was written using Eclipse from a standalone app. ie - an external Java Swing app.
Are you trying to follow this to build an AEM Bundle that is deployed in the OSGi service container?
Views
Replies
Total Likes
Still able to see same error, Attached is my simple java class and pom file which am using, and below is command for running project.
mvn exec:java -Dexec.mainClass="com.org.krish.test.GetRepository"
Views
Replies
Total Likes
Try running code in a Java IDE and let us know what happens.
Views
Replies
Total Likes
kk krish wrote...
Still able to see same error, Attached is my simple java class and pom file which am using, and below is command for running project.
mvn exec:java -Dexec.mainClass="com.org.krish.test.GetRepository"
Everything looks good except the dependency. Add the below dependency and it should work:
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr2dav</artifactId>
<version>2.4.0</version>
</dependency>
Thanks.
Views
Replies
Total Likes
Thanks it works, But still able to see some warnings in log, attached full command prompt trace.
Views
Replies
Total Likes