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
BedrockMission!

Learn More

View all

Sign in to view all badges

LiveRelationshipManager error: No content resource for resource at path "/content/..."

Avatar

Avatar
Boost 1
Level 1
Stochino
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
Stochino
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

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

06-05-2021

Hi all.

Recently Im facing an issue when I try to retrieve all liveCopyRelationships related to a page:

 

LiveRelationshipManager liveRelationshipManager = resourceResolver.adaptTo(LiveRelationshipManager.class);

RangeIterator liveRelationships = liveRelationshipManager.getLiveRelationships(myPageResource, null, null);

 

These instructions retrieve me all liveCopyRelationships but recently it does not work anymore ONLY on publish envs.

The issue is raised when i loop my RangeIterator as follow:

LiveRelationship liveCopy = (LiveRelationship) liveRelationships.next();

 

For certain page contents i get this error:

 

java.lang.RuntimeException: com.day.cq.wcm.api.WCMException: javax.jcr.ItemNotFoundException: No content resource for resource at path /content/myContentPage
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl$LiveRelationshipIterator.next(LiveRelationshipManagerImpl.java:1152) [com.day.cq.wcm.cq-msm-core:5.13.60]

[...]
Caused by: com.day.cq.wcm.api.WCMException: javax.jcr.ItemNotFoundException: No content resource for resource at path /content/myContentPage
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.buildRelationship(LiveRelationshipManagerImpl.java:869) [com.day.cq.wcm.cq-msm-core:5.13.60]
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.access$100(LiveRelationshipManagerImpl.java:81) [com.day.cq.wcm.cq-msm-core:5.13.60]
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl$LiveRelationshipIterator.seek(LiveRelationshipManagerImpl.java:1107) [com.day.cq.wcm.cq-msm-core:5.13.60]
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl$LiveRelationshipIterator.next(LiveRelationshipManagerImpl.java:1150) [com.day.cq.wcm.cq-msm-core:5.13.60]
... 24 common frames omitted
Caused by: javax.jcr.ItemNotFoundException: No content resource for resource at path /content/myContentPage
at com.day.cq.wcm.msm.impl.Utils.getContentResource(Utils.java:214) [com.day.cq.wcm.cq-msm-core:5.13.60]
at com.day.cq.wcm.msm.impl.StatusUtil.createLiveStatus(StatusUtil.java:57) [com.day.cq.wcm.cq-msm-core:5.13.60]
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.buildRelationship(LiveRelationshipManagerImpl.java:856) [com.day.cq.wcm.cq-msm-core:5.13.60]
... 27 common frames omitted

 

I cannot skip this error because raised exception is a runtimeException so i'd prefer to understand why this exception occurred rather than catch it with a generic Exception.

I really cannot understand in which scenario this could happen. Do you think that some content has been deleted on publish server? How could the liveCopyRelationship have been broken?

 

Can someone help me to understand why often this issue appears?

Thanks in advance.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 100
Employee
markus_bulla_adobe
Employee

Likes

110 likes

Total Posts

89 posts

Correct Reply

46 solutions
Top badges earned
Boost 100
Applaud 25
Affirm 25
Boost 50
Boost 25
View profile

Avatar
Boost 100
Employee
markus_bulla_adobe
Employee

Likes

110 likes

Total Posts

89 posts

Correct Reply

46 solutions
Top badges earned
Boost 100
Applaud 25
Affirm 25
Boost 50
Boost 25
View profile
markus_bulla_adobe
Employee

06-05-2021

Hi @Stochino!

While I haven't faced this exact exception yet, I would recommend the following to analyze the issue further:

 

You're saying that the issue only occurs on your publish instances.
I'm a bit curious about why you would need to know about LiveCopy relationships on the publish tier, but that's a different question. I'm not even sure if all required LiveCopy information (e. g. properties and mixins) are replicated on publication. This would be a first step to do: compare the content between author and publish instance on a repository level and see if there are differences for the concerned pages.

Another topic that is common to be involved for differences between author and publish tier is user sessions and permissions: while on the author instance every user needs to log in before accessing the system (thus has a session and certain permissions according to his group memberships) on the publish side visitors often don't have to login and are assigned the "anonymous" role with very limited permissions. In this context it would be interesting to know what resourceResolver your code uses. Where does it come from? Does it have the necessary permissions (on the publish side) to access the concerned content?

If you are using a service user or your user (the one for the resourceResolver) has certain group membership, have you verified that the user(s) and the groups are replicated to the publish side as well?

 

Hope that helps for further analysis!

Answers (1)

Answers (1)

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

528 likes

Total Posts

660 posts

Correct Reply

218 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

528 likes

Total Posts

660 posts

Correct Reply

218 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

06-05-2021

Hi @Stochino

Can you check if the page/path where the exception is thrown has jcr:content node. (Check if it is missing/removed accidently)

Example : path mentioned as part of exception, javax.jcr.ItemNotFoundException: No content resource for resource at path /content/myContentPage