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

Avatar

Avatar

yagyesh11235

Avatar

yagyesh11235

yagyesh11235

31-12-2015

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

GK-AEM

Avatar

GK-AEM

GK-AEM

04-01-2016

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....

Answers (10)

Answers (10)

Avatar

Avatar

Aditya_Band

Avatar

Aditya_Band

Aditya_Band

14-02-2021

You need 

jackrabbit-standalone jar

 

and 

Jackrabbitjcr2dav jar

 Choose latest versions

Avatar

Avatar

yagyesh11235

Avatar

yagyesh11235

yagyesh11235

04-01-2016

Hi Kishore,

Attached is the screen shot for the same

Avatar

Avatar

GK-AEM

Avatar

GK-AEM

GK-AEM

04-01-2016

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

-Kishore

Avatar

Avatar

yagyesh11235

Avatar

yagyesh11235

yagyesh11235

04-01-2016

@kishore:

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

Avatar

Avatar

Jitendra_S_Toma

Avatar

Jitendra_S_Toma

Jitendra_S_Toma

04-01-2016

Avatar

Avatar

GK-AEM

Avatar

GK-AEM

GK-AEM

04-01-2016

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

Avatar

Avatar

yagyesh11235

Avatar

yagyesh11235

yagyesh11235

04-01-2016

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

Avatar

Opkar_Gill

Employee

Avatar

Opkar_Gill

Employee

Opkar_Gill
Employee

31-12-2015

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

Avatar

bsloki

MVP

Avatar

bsloki

MVP

bsloki
MVP

31-12-2015

Also, check if the port is enabled to access

Avatar

Avatar

kunal23

MVP

Avatar

kunal23

MVP

kunal23
MVP

31-12-2015

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