[JBoss JIRA] (JBTM-2434) @Transactional annotation on stereotype leads to error "ARJUNA016107: Expected an @Transactional annotation at class and/or method level"
by Gytis Trikleris (JIRA)
[ https://issues.jboss.org/browse/JBTM-2434?page=com.atlassian.jira.plugin.... ]
Gytis Trikleris moved WFLY-4784 to JBTM-2434:
---------------------------------------------
Project: JBoss Transaction Manager (was: WildFly)
Key: JBTM-2434 (was: WFLY-4784)
Affects Version/s: (was: 8.2.0.Final)
(was: 9.0.0.CR1)
Component/s: JTA
(was: CDI / Weld)
(was: Transactions)
> @Transactional annotation on stereotype leads to error "ARJUNA016107: Expected an @Transactional annotation at class and/or method level"
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBTM-2434
> URL: https://issues.jboss.org/browse/JBTM-2434
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Components: JTA
> Environment: JDK 1.7u72 x64, Windows 8.1 Professional
> Reporter: Alexander Morozov
> Assignee: Gytis Trikleris
> Priority: Critical
> Attachments: wildfly-jta-cdi.zip
>
>
> It is seems that CDI Transactional extesion doesn't support well @Transactional annotation on CDI stereotypes. JTA transaction is created by library interceptor, but in case of exception on component's side, _com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.getTransactional(...)_ method failed to locate @Transactional annotation on target component. It leads to exception like that
> {code}
> java.lang.RuntimeException: ARJUNA016107: Expected an @Transactional annotation at class and/or method level
> at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.getTransactional(TransactionalInterceptorBase.java:83)
> at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.handleException(TransactionalInterceptorBase.java:118)
> at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.invokeInCallerTx(TransactionalInterceptorBase.java:106)
> at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorMandatory.intercept(TransactionalInterceptorMandatory.java:58)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)
> at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
> at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
> at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
> at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
> at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
> at com.mycompany.wildfly.jta.cdi.UserEventDispatcher$Proxy$_$$_WeldSubclass.dispatch(Unknown Source)
> at com.mycompany.wildfly.jta.cdi.UserEventDispatcher$Proxy$_$$_WeldClientProxy.dispatch(Unknown Source)
> at com.mycompany.wildfly.jta.cdi.UserApplicationService.addUser(UserApplicationService.java:18)
> at com.mycompany.wildfly.jta.cdi.UserApplicationService$Proxy$_$$_WeldSubclass.addUser$$super(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:49)
> at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77)
> at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:92)
> at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:52)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)
> at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
> at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
> at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
> at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
> at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
> at com.mycompany.wildfly.jta.cdi.UserApplicationService$Proxy$_$$_WeldSubclass.addUser(Unknown Source)
> at com.mycompany.wildfly.jta.cdi.UserApplicationService$Proxy$_$$_WeldClientProxy.addUser(Unknown Source)
> at com.mycompany.wildfly.jta.cdi.BootstrapExtension.start(BootstrapExtension.java:20)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> .........
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)