Under high load, the following log is witnessed
2018-07-26 09:27:09,388 ERROR [catalina-exec-52] [org.nuxeo.runtime.transaction.TransactionHelper] Unable to start transaction javax.transaction.NotSupportedException: Nested Transactions are not supported at org.apache.geronimo.transaction.manager.TransactionManagerImpl.begin(TransactionManagerImpl.java:157) at org.apache.geronimo.transaction.manager.TransactionManagerImpl.begin(TransactionManagerImpl.java:152) at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.begin(NuxeoContainer.java:522) at org.nuxeo.runtime.transaction.TransactionHelper.startTransaction(TransactionHelper.java:241) at org.nuxeo.runtime.transaction.TransactionHelper.startTransaction(TransactionHelper.java:335) at org.nuxeo.ecm.platform.web.common.ServletHelper.startTransaction(ServletHelper.java:57) at org.nuxeo.ecm.webengine.app.WebEngineFilter.initTx(WebEngineFilter.java:161) at org.nuxeo.ecm.webengine.app.WebEngineFilter.initRequest(WebEngineFilter.java:142) at org.nuxeo.ecm.webengine.app.WebEngineFilter.doFilter(WebEngineFilter.java:85) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
followed by
2018-07-26 09:27:09,444 WARN [catalina-exec-52] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] Exception in JAX-RS processing org.nuxeo.ecm.core.api.NuxeoException: Cannot create a CoreSession when transaction is marked rollback-only at org.nuxeo.ecm.core.api.local.LocalSession.<init>(LocalSession.java:72) at org.nuxeo.ecm.core.api.CoreSessionServiceImpl.createCoreSession(CoreSessionServiceImpl.java:43) at org.nuxeo.ecm.core.api.CoreInstance.openCoreSession(CoreInstance.java:171) at org.nuxeo.ecm.core.api.CoreInstance.openCoreSession(CoreInstance.java:71) at org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider.createSession(CoreSessionProvider.java:68) at org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider.getSessionRef(CoreSessionProvider.java:54) at org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider.getSession(CoreSessionProvider.java:61) at org.nuxeo.ecm.webengine.jaxrs.session.SessionFactory.getSession(SessionFactory.java:95) at org.nuxeo.ecm.webengine.jaxrs.session.SessionFactory.getSession(SessionFactory.java:91) at org.nuxeo.ecm.automation.jaxrs.io.operations.JsonRequestReader.getCoreSession(JsonRequestReader.java:62) at org.nuxeo.ecm.automation.jaxrs.io.operations.JsonRequestReader.readFrom(JsonRequestReader.java:106) at org.nuxeo.ecm.automation.jaxrs.io.operations.JsonRequestReader.readFrom(JsonRequestReader.java:51) at com.sun.jersey.spi.container.ContainerRequest.getEntity(ContainerRequest.java:490) at com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$EntityInjectable.getValue(EntityParamDispatchProvider.java:123) at com.sun.jersey.server.impl.inject.InjectableValuesProvider.getInjectableValues(InjectableValuesProvider.java:86) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$EntityParamInInvoker.getParams(AbstractResourceMethodDispatchProvider.java:153) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ObjectOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:256) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.containerService(WebEngineServlet.java:178) at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.service(WebEngineServlet.java:155) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
What is requested is that in org.nuxeo.ecm.webengine.app.WebEngineFilter.initTx , instead of checking isTransactionActive, which checks only the status ACTIVE of the transaction, the call to isTransactionActiveOrMarkedRollback is made, to ckeck the fact that the transaction status can be either ACTIVE or MARKED_ROLLBACK.
Exact code path might depend on Nuxeo version. Above stacks in Nuxeo 8.10
- is related to
-
NXP-24343 Clean up transaction management in servlet filters
- Resolved