0 Replies Latest reply on Aug 6, 2014 12:44 PM by Filipe Ferraz

    Bug with groovy classes and weld 2.2.4.Final

    Filipe Ferraz Newbie

      I'm getting a strange behavior in application using CDI and EJB (tested to replace all to CDI but error persist).

      It's a @Transactional class being injected in a @Stateless EJB (LocalBean).

      Redeploying the application sometimes fix the problem. Anyone have some idea of what is causing this error or some workaround?

      I see that in 2.2.4.Final has a filter for the groovy objects. I have debbuged and is entering in the groovy enabled verification.

       

      This error I got using a @Typed to a interface:

       

      Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]

          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]

          at org.jboss.weld.injection.MethodInjectionPoint.invokeWithSpecialValue(MethodInjectionPoint.java:69) [weld-core-impl-2.2.4.Final.jar:2014-07-18 16:55]

          at org.jboss.weld.injection.MethodInjectionPoint.invoke(MethodInjectionPoint.java:63) [weld-core-impl-2.2.4.Final.jar:2014-07-18 16:55]

          at org.jboss.weld.util.Beans.callInitializers(Beans.java:394) [weld-core-impl-2.2.4.Final.jar:2014-07-18 16:55]

       

      The another was the initially error, using only @Transactional annotation:

      weld error proxy

       

      I'm using wildfly 8.1.0.Final with weld 2.2.4.Final patch.