Hi ,
I am trying to access repository from external java application using JcrUtils.
repository = JcrUtils.getRepository("https://localhost:7502/crx/server"); this works
repository = JcrUtils.getRepository("https://localhost:5433/crx/server"); this doesn't work exceptions: javax.jcr.RepositoryException: Unable to access a repository with the following settings: org.apache.jackrabbit.repository.uri: epository.login The following RepositoryFactory classes were consulted: org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined org.apache.jackrabbit.commons.JndiRepositoryFactory: declined org.apache.jackrabbit.core.RepositoryFactoryImpl: declined org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory: failed because of IllegalArgumentException: URI is not absolute Perhaps the repository you are trying to access is not available at the moment. at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:204) at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:244) Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
These jars are not enough to connect to JCR standalone.
Please refer below link for list of jars required.
Have you verified that Webdav is enabled ? What do you see if you directly hit the following URL in the browser ?
https://localhost:5433/crx/server
Also, check if the port is enabled to access
yagyesh11235 wrote...
Hi ,
I am trying to access repository from external java application using JcrUtils.
repository = JcrUtils.getRepository("https://localhost:7502/crx/server"); this works
repository = JcrUtils.getRepository("https://localhost:5433/crx/server"); this doesn't work
So it works on port 7502, but not on port 5433? Are you trying to connect to a single AEM instance on two different ports?
It will only work on a single port, if you want to connect on port 5433, you would have to stop AEM, change the port and restart it on 5433. Then 7502 would not work. If you did try to change the port and it didn't work, how did you change the port number?
Regards,
Opkar
Hi Opkar,
I have enabled ssl for my author environment (running on port 7502) and secured port is 5433.On accessing via 5433 i get an empty repository.
This issue is happening on AEM 6.1
For CQ 5.6.1 , i have an author environment(running on port 4502) and secured port is 5433.This works
@kunal123 : I can access the repository via browser for 5433
What kind of external Java application it is.Please provide more details.
@Yagyesh,
https://jackrabbit.apache.org/api/2.8/org/apache/jackrabbit/commons/JcrUtils.html#getRepository
http://jackrabbit.apache.org/jcr/components/jackrabbit-jcr-to-dav.html
Jitendra
@kishore:
This is standalone java application which has dependency on cq-commons-5.8.2.jar,jackrabbit-standalone-2.6.5.jar
Can you please share the screen-shot of list of jars(related to CQ) you have included to execute your application.
-Kishore
These jars are not enough to connect to JCR standalone.
Please refer below link for list of jars required.
You need
jackrabbit-standalone jar
and
Jackrabbitjcr2dav jar
Choose latest versions
The problem is that org.apache.jackrabbit:jackrabbit-jcr-commons and org.apache.jackrabbit:jackrabbit-jcr2dav have the same file META-INF/services/javax.jcr.RepositoryFactory, which contains the Factory, the correct one is org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory.
Below, this file was removed from jackrabbit-jcr-commons using shade plugin, to avoid conflict with jackrabbit-jcr2dav.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>org.apache.jackrabbit:jackrabbit-jcr-commons</artifact>
<excludes>
<exclude>META-INF/services/javax.jcr.RepositoryFactory</exclude>
</excludes>
</filter>
</filters>
<finalName>turing-aem</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>indexer</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>your.mainclass</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
Views
Replies
Total Likes
@yagyesh11235 @Sandbox1 @Aditya_Band @GK-AEM @Jitendra_S_Toma
Hi all I'm trying to get the repository but I'm getting the same exception if i open in browser it's working fine, I have search in goggle they are suggesting to use jackrabbit-standalone jar 2.4.0 version in official website of jackrabbit I'm able to find up to 2.21.20 version only.
How to resolve this and I'm new to this AEM
Could you please help me
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies