]
Gytis Trikleris commented on JBTM-2434:
---------------------------------------
Moved to JBTM because the fix will go into Narayana and then will be added to WildFly once
next Narayana is released.
@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
Fix For: 5.next
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}