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

Avatar

Avatar
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
yagyesh11235
Level 1

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
Validate 100
Level 6
GK-AEM
Level 6

Likes

41 likes

Total Posts

482 posts

Correct reply

32 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile

Avatar
Validate 100
Level 6
GK-AEM
Level 6

Likes

41 likes

Total Posts

482 posts

Correct reply

32 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile
GK-AEM
Level 6

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
Boost 1
Level 1
Aditya_Band
Level 1

Like

1 like

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
Aditya_Band
Level 1

Like

1 like

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
Aditya_Band
Level 1

14-02-2021

You need 

jackrabbit-standalone jar

 

and 

Jackrabbitjcr2dav jar

 Choose latest versions

Avatar

Avatar
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
yagyesh11235
Level 1

04-01-2016

Hi Kishore,

Attached is the screen shot for the same

Avatar

Avatar
Validate 100
Level 6
GK-AEM
Level 6

Likes

41 likes

Total Posts

482 posts

Correct reply

32 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile

Avatar
Validate 100
Level 6
GK-AEM
Level 6

Likes

41 likes

Total Posts

482 posts

Correct reply

32 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile
GK-AEM
Level 6

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
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
yagyesh11235
Level 1

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
Validate 1
Level 7
Jitendra_S_Toma
Level 7

Likes

76 likes

Total Posts

617 posts

Correct reply

84 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 7
Jitendra_S_Toma
Level 7

Likes

76 likes

Total Posts

617 posts

Correct reply

84 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
Jitendra_S_Toma
Level 7

04-01-2016

Avatar

Avatar
Validate 100
Level 6
GK-AEM
Level 6

Likes

41 likes

Total Posts

482 posts

Correct reply

32 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile

Avatar
Validate 100
Level 6
GK-AEM
Level 6

Likes

41 likes

Total Posts

482 posts

Correct reply

32 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile
GK-AEM
Level 6

04-01-2016

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

Avatar

Avatar
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
yagyesh11235
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
yagyesh11235
Level 1

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
Validate 1
Employee
Opkar_Gill
Employee

Likes

138 likes

Total Posts

952 posts

Correct reply

280 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Employee
Opkar_Gill
Employee

Likes

138 likes

Total Posts

952 posts

Correct reply

280 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
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
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile
bsloki
MVP

31-12-2015

Also, check if the port is enabled to access

Avatar

Avatar
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct reply

173 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct reply

173 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile
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