Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30616

ColdStorage Cannot create a CoreSession outside a security context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: ADDONS_2021
    • Fix Version/s: coldstorage-2021.0.0
    • Component/s: Glacier

      Description

      We have systematically this error when using ColdStorag addon with the LTS version.

      2021-09-21T13:07:00,021 ERROR [WorkManagerImpl] Uncaught error on thread: Nuxeo-Work-default-48, current work might be lost, WorkManager metrics might be corrupted.
      org.nuxeo.ecm.core.api.NuxeoException: Work failed after 2 retries, class=class org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork id=1702073461548839.1697874777 category=checkColdStorageClassUpdated title=Listener checkColdStorageClassUpdated [checkColdStorageClassUpdated]
      	at org.nuxeo.ecm.core.work.AbstractWork.workFailed(AbstractWork.java:479) ~[nuxeo-core-event-2021.6.4.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:398) ~[nuxeo-core-event-2021.6.4.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) ~[nuxeo-core-event-2021.6.4.jar:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
      	at java.lang.Thread.run(Thread.java:829) [?:?]
      Caused by: org.nuxeo.ecm.core.api.NuxeoException: Cannot create a CoreSession outside a security context,  login() missing.
      	at org.nuxeo.ecm.core.api.CoreInstance.getPrincipal(CoreInstance.java:199) ~[nuxeo-core-api-2021.6.4.jar:?]
      	at org.nuxeo.ecm.core.api.CoreInstance.getCoreSession(CoreInstance.java:49) ~[nuxeo-core-api-2021.6.4.jar:?]
      	at org.nuxeo.coldstorage.events.CheckColdStorageClassUpdatedListener.handleEvent(CheckColdStorageClassUpdatedListener.java:50) ~[nuxeo-coldstorage-2021.0.12-rc.36.jar:?]
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:209) ~[nuxeo-core-event-2021.6.4.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:533) ~[nuxeo-core-event-2021.6.4.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:385) ~[nuxeo-core-event-2021.6.4.jar:?]
      	... 4 more
      	Suppressed: org.nuxeo.ecm.core.api.NuxeoException: Cannot create a CoreSession outside a security context,  login() missing.
      		at org.nuxeo.ecm.core.api.CoreInstance.getPrincipal(CoreInstance.java:199) ~[nuxeo-core-api-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.api.CoreInstance.getCoreSession(CoreInstance.java:49) ~[nuxeo-core-api-2021.6.4.jar:?]
      		at org.nuxeo.coldstorage.events.CheckColdStorageClassUpdatedListener.handleEvent(CheckColdStorageClassUpdatedListener.java:50) ~[nuxeo-coldstorage-2021.0.12-rc.36.jar:?]
      		at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:209) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:533) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:385) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
      		at java.lang.Thread.run(Thread.java:829) [?:?]
      	Suppressed: org.nuxeo.ecm.core.api.NuxeoException: Cannot create a CoreSession outside a security context,  login() missing.
      		at org.nuxeo.ecm.core.api.CoreInstance.getPrincipal(CoreInstance.java:199) ~[nuxeo-core-api-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.api.CoreInstance.getCoreSession(CoreInstance.java:49) ~[nuxeo-core-api-2021.6.4.jar:?]
      		at org.nuxeo.coldstorage.events.CheckColdStorageClassUpdatedListener.handleEvent(CheckColdStorageClassUpdatedListener.java:50) ~[nuxeo-coldstorage-2021.0.12-rc.36.jar:?]
      		at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:209) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:533) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:385) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) ~[nuxeo-core-event-2021.6.4.jar:?]
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
      		at java.lang.Thread.run(Thread.java:829) [?:?]
      2021
      
      

      To reproduce the issue:

      • create a new document
      • move it into ColdStorage.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: