Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Error on connecting to JCR using JcrUtils.getRepository (on SSL enabled environment)

Avatar

Level 2

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
1 Accepted Solution

Avatar

Correct answer by
Level 9

These jars are not enough to connect to JCR standalone.

Please refer below link for list of jars required.

http://experience-aem.blogspot.ch/2015/05/aem-6-sp2-accessing-crx-remotely-using-jcr-remoting-davex....

View solution in original post

0 Replies

Avatar

Employee Advisor

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

Avatar

Employee

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

Avatar

Level 2

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

Avatar

Level 9

What kind of external Java application it is.Please provide more details.

Avatar

Level 2

@kishore:

This is standalone java application which has dependency on  cq-commons-5.8.2.jar,jackrabbit-standalone-2.6.5.jar

Avatar

Level 9

Can you please share the screen-shot of list of jars(related to CQ) you have included to execute your application.

-Kishore

Avatar

Correct answer by
Level 9

These jars are not enough to connect to JCR standalone.

Please refer below link for list of jars required.

http://experience-aem.blogspot.ch/2015/05/aem-6-sp2-accessing-crx-remotely-using-jcr-remoting-davex....

Avatar

Level 1

You need 

jackrabbit-standalone jar

 

and 

Jackrabbitjcr2dav jar

 Choose latest versions