You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2016/04/26 22:50:13 UTC

[jira] [Closed] (OLINGO-882) Olingo closes EntityManager which is managed by the application server

     [ https://issues.apache.org/jira/browse/OLINGO-882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Bolz closed OLINGO-882.
-------------------------------

> Olingo closes EntityManager which is managed by the application server
> ----------------------------------------------------------------------
>
>                 Key: OLINGO-882
>                 URL: https://issues.apache.org/jira/browse/OLINGO-882
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.6
>         Environment: Java 1.8, wildfly 8
>            Reporter: Manuel Blechschmidt
>            Assignee: Michael Bolz
>             Fix For: V2 2.0.7
>
>
> Like I already mentioned in ONLINGO-754 the EntityManager is closed by Olingo. This creates a problem if the EntityManager is managed by an application server.
> We now decomposed our application and are consuming olingo through a transitive dependency. Therefore our dirty hack by "overwritten" classes by putting them in our own codebase does not work anymore.
> The problem is here:
> {code:title=https://github.com/apache/olingo-odata2/blob/2.0.6/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAProcessor.java}
> https://github.com/apache/olingo-odata2/blob/2.0.6/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAProcessor.java
> {code}
> I will implement my own ODataJPAProcessor to workaround
> {code}
> JBAS011424: Container managed entity manager can only be closed by the container (auto-cleared at tx/invocation end and closed when owning component is closed.)"},"innererror":"Stacktrace : java.lang.IllegalStateException: JBAS011424: Container managed entity manager can only be closed by the container (auto-cleared at tx/invocation end and closed when owning component is closed.)\n\tat org.jboss.as.jpa.container.TransactionScopedEntityManager.close(TransactionScopedEntityManager.java:105)\n\tat org.apache.olingo.odata2.jpa.processor.api.ODataJPAProcessor.close(ODataJPAProcessor.java:88)\n\tat de.pcagrar.cloud.rest.odata.filter.FilteringJpaProcessor.executeBatch(FilteringJpaProcessor.java:376)\n\tat org.apache.olingo.odata2.core.Dispatcher.dispatch(Dispatcher.java:190)\n\tat org.apache.olingo.odata2.core.ODataRequestHandler.handle(ODataRequestHandler.java:130)\n\tat org.apache.olingo.odata2.core.rest.ODataSubLocator.handle(ODataSubLocator.java:164)\n\tat org.apache.olingo.odata2.core.rest.ODataSubLocator.handlePost(ODataSubLocator.java:100)\n\tat de.pcagrar.cloud.rest.odata.ODataRootLocator.handleRequest(ODataRootLocator.java:93)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)\n\tat org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)\n\tat org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)\n\tat org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)\n\tat org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)\n\tat org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\n\tat org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.component.interceptors.NonPooledEJBComponentInstanceAssociatingInterceptor.processInvocation(NonPooledEJBComponentInstanceAssociatingInterceptor.java:59)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273)\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:340)\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)\n\tat org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)\n\tat org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)\n\tat org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\n\tat org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)\n\tat org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\n\tat org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)\n\tat de.pcagrar.cloud.rest.odata.ODataRootLocator$$$view284.handleRequest(Unknown Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:414)\n\tat org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)\n\tat org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)\n\tat org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:65)\n\tat org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)\n\tat de.pcagrar.cloud.rest.odata.ODataRootLocator$Proxy$_$$_Weld$EnterpriseProxy$.handleRequest(Unknown Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.jboss.resteasy.core.ResourceLocatorInvoker.createResource(ResourceLocatorInvoker.java:81)\n\tat org.jboss.resteasy.core.ResourceLocatorInvoker.createResource(ResourceLocatorInvoker.java:60)\n\tat org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:102)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)\n\tat org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)\n\tat org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)\n\tat org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)\n\tat de.pcagrar.cloud.rest.odata.CachingFilter.doFilter(CachingFilter.java:61)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)\n\tat de.pcagrar.cloud.security.AgrarAuthenticationFilter.doFilter(AgrarAuthenticationFilter.java:297)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)\n\tat io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)\n\tat io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)\n\tat io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)\n\tat org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)\n\tat io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)\n\tat io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)\n\tat io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)\n\tat io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)\n\tat io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)\n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)\n\tat io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)\n\tat io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)\n\tat io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)\n\tat io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat java.lang.Thread.run(Thread.java:745)\n
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)