[LIVECOPY-307] Template annotations endpoint broken in combination with LiveCopy Created: 20/Sep/21  Updated: 13/Jul/22  Resolved: 25/Mar/22

Status: Closed
Project: Live Copy
Component/s: None
Affects Version/s: 3.1.1
Fix Version/s: 3.2.8

Type: Bug Priority: Blocker
Reporter: Tobias Kerschbaum Assignee: Milan Divilek
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia 6.2.11
LiveCopy 3.2.5


Attachments: PNG File Screenshot 2022-03-25 at 8.28.00.png     PNG File Screenshot 2022-03-25 at 8.30.08.png     PNG File Screenshot 2022-03-28 at 11.17.40.png     PNG File Screenshot 2022-03-28 at 11.19.29.png     Text File stacktrace.txt    
Issue Links:
Relates
relates to LIVECOPY-299 DOC: Live Copy feature is working wit... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: External SPA Backlog
Sprint: DevX 6
Story Points: 5
Team: DeveloperX

 Description   

Steps to reproduce

  1. Create a BasePage
  2. Create a LiveCopy Page (in my example BasePage0)
  3. Open: localhost:8080/.rest/template-annotations/v1/BasePage0

Expected results

I expect to the proper result from the endpoint.

Actual results

{"error":{"code":"unknown","message":"javax.jcr.RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed."}}

 

This is the full Stacktrace: stacktrace.txt

Workaround

I reverted the following last commit, and it works perfectly again.

[-https://git.magnolia-cms.com/projects/MODULES/repos/pages/commits/f1f74da3a4431caa6851a0d8aa9861fb07d6d7d1-]

Update 11.03.2022:
Workaround is not working anymore.

Development notes

 



 Comments   
Comment by Milan Divilek [ 25/Mar/22 ]

Issue is cause by prematurely closing system session - https://git.magnolia-cms.com/projects/ADDON/repos/live-copy/commits/239432b1e636d8a75377f31f056872b3ccf245d2

We are using JCRSessionPerThreadSystemContext, that means system context is same within whole thread and closing it manually can cause issue like this. SystemContext is closed automatically in ContextFilter.

System context used in info.magnolia.livecopy.jcr.LiveCopyUtils#isMasterNodeRemoved

This system context is then closed automatically in info.magnolia.cms.filters.ContextFilter#doFilter

Generated at Mon Feb 12 02:27:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.