tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: JAX-RS + Bean Validation
Date Fri, 07 Feb 2014 06:56:52 GMT
the interceptor is not designed for mdbs. Just configure the
interceptor in ejb-jar instead of using the system property

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-02-07 hwaastad <helge@waastad.org>:
> Nice reading and thanks for sharing :-)
>
> I tried adding system.properties entry, however I discovered a challenge:
>
> ---
>
> SEVERE: EjbTransactionUtil.handleSystemException:
> org.apache.openejb.core.mdb.MdbContext cannot be cast to
> javax.ejb.SessionContext
> java.lang.ClassCastException: org.apache.openejb.core.mdb.MdbContext cannot
> be cast to javax.ejb.SessionContext
>         at
> org.apache.openejb.bval.BeanValidationAppendixInterceptor.aroundInvoke(BeanValidationAppendixInterceptor.java:53)
>         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.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>         at
> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>         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.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>         at org.apache.openejb.core.mdb.MdbContainer._invoke(MdbContainer.java:401)
>         at org.apache.openejb.core.mdb.MdbContainer.invoke(MdbContainer.java:372)
>         at
> org.apache.openejb.core.mdb.EndpointHandler.deliverMessage(EndpointHandler.java:227)
>         at
> org.apache.openejb.core.mdb.EndpointHandler.invoke(EndpointHandler.java:168)
>         at
> org.waastad.activemq.jms.SmartProbeMessageBean$$LocalBeanProxy.onMessage(org/waastad/activemq/jms/SmartProbeMessageBean.java)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:916)
>         at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:366)
>         at
> org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
>
> ----
>
> @Romain: what might cause this issue?
>
> TomEE 1.6.0
>
> br hw
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-Bean-Validation-tp4667501p4667523.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message