-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Aspera Connector
-
Epic Link:
-
Tags:
-
Sprint:nxApps 2020 Cycle 8
In some cases, mainly on Lis's test for PR-141. We saw in the logs some errors at
org.nuxeo.ecm.core.api.NuxeoException: Cannot use a CoreSession outside a transaction at org.nuxeo.ecm.core.api.local.LocalSession.getSession(LocalSession.java:106) ~[nuxeo-core-10.10-HF27.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.resolveReference(AbstractSession.java:337) ~[nuxeo-core-10.10-HF27.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.getDocument(AbstractSession.java:953) ~[nuxeo-core-10.10-HF27.jar:?] at com.nuxeo.aspera.connector.service.AsperaNodeServiceImpl.syncTransfer(AsperaNodeServiceImpl.java:215) ~[nuxeo-aspera-core-3.0.0-SNAPSHOT-PR-141.jar:?] at com.nuxeo.aspera.connector.events.CheckTransferredFilesAvailability.handleEvent(CheckTransferredFilesAvailability.java:66) [nuxeo-aspera-core-3.0.0-SNAPSHOT-PR-141.jar:?] at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242) [nuxeo-core-event-10.10-HF30.jar:?] at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:119) [nuxeo-core-event-10.10-HF30.jar:?] at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:65) [nuxeo-core-event-10.10-HF30.jar:?] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.0.jar:?] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.0.jar:?] 2020-08-12T21:30:08,097 WARN [Quartz_Worker-1] [com.nuxeo.aspera.connector.events.CheckTransferredFilesAvailability] Error on transfer=f1c991ff-0173-4530-a56a-e3dc89a81f81 org.nuxeo.ecm.core.api.NuxeoException: Cannot use a CoreSession outside a transaction at org.nuxeo.ecm.core.api.local.LocalSession.getSession(LocalSession.java:106) ~[nuxeo-core-10.10-HF27.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.resolveReference(AbstractSession.java:337) ~[nuxeo-core-10.10-HF27.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.getDocument(AbstractSession.java:953) ~[nuxeo-core-10.10-HF27.jar:?] at com.nuxeo.aspera.connector.service.AsperaNodeServiceImpl.syncTransfer(AsperaNodeServiceImpl.java:215) ~[nuxeo-aspera-core-3.0.0-SNAPSHOT-PR-141.jar:?] at com.nuxeo.aspera.connector.events.CheckTransferredFilesAvailability.handleEvent(CheckTransferredFilesAvailability.java:66) [nuxeo-aspera-core-3.0.0-SNAPSHOT-PR-141.jar:?] at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242) [nuxeo-core-event-10.10-HF30.jar:?] at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:119) [nuxeo-core-event-10.10-HF30.jar:?] at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:65) [nuxeo-core-event-10.10-HF30.jar:?] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.0.jar:?] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.0.jar:?]
I didn't find a good way to reproduce, but we can try to avoid it by adding check on TX active in the finally block
if (!TransactionHelper.isTransactionActive()) {
TransactionHelper.commitOrRollbackTransaction();
TransactionHelper.startTransaction();
}
- is related to
-
NXP-27573 I want to upload folder and its children (Files and Folders)
- Resolved
- Is referenced in