3 Replies Latest reply on Sep 9, 2013 9:44 AM by totempole

    Migrating from AS 7.1.1 to EAP 6.1 - Possible issue with overloaded EJB method call - InvalidArgumentException - argument type mismatch

    cce

      Hi folks,

       

      I'm in the process of migrating an application from AS 7.1.1 to EAP 6.1 and I came across an interesting issue with local, overloaded method calls (same name, multiple signatures) on stateless EJBs.

       

      I'm getting the following exception (randomly...sometime it works, other times not).

       

       

      07:35:40,897 ERROR [org.jboss.as.ejb3.invocation] (http-/0.0.0.0:8080-3) JBAS014134: EJB Invocation failed on component MaintainBlahService for method public abstract java.lang.Object com.company.blah.services.lim.ReferenceTableServiceLocal.find(java.lang.Object): javax.ejb.EJBException: java.lang.IllegalArgumentException: argument type mismatch

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:250) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:315) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:76) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

                at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at com.company.blah.services.lim.slm.MaintainBlahServiceLocal$$$view778.find(Unknown Source) [blahServicesEJB.jar:]

                at com.company.blah.application.AbstractReferenceTableBackingBean.retrieveExisting(AbstractReferenceTableBackingBean.java:110)

                at com.company.blah.application.AbstractReferenceTableBackingBean.edit(AbstractReferenceTableBackingBean.java:146)

                at com.company.blah.application.slm.MaintainBlah.edit(MaintainBlah.java:137)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_31]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_31]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_31]

                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_31]

                at org.apache.el.parser.AstValue.invoke(AstValue.java:258)

                at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)

                at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)

                at org.apache.el.parser.AstIdentifier.invoke(AstIdentifier.java:117)

      ...

       

       

      The EJB in question (MaintainBlahService) has two methods (also in the local interface) with the same name...

       

       

      public Blah find(Long sysId);

      public MaintainBlahDTO find(MaintainBlahDTO entity);

       

      When find is called, it randomly fails with the above error in EAP 6.1 only (worked in AS 7.1.1). Now, when I change the name of the second method to

       

      public MaintainBlahDTO findEntity(MaintainBlahDTO entity);

       

      ...it works every time.

       

      Has anyone else experienced this issue? Is this a bug in the EJB implementation in EAP or are overloaded EJB methods illegal?

        • 1. Re: Migrating from AS 7.1.1 to EAP 6.1 - Possible issue with overloaded EJB method call - InvalidArgumentException - argument type mismatch
          jaikiran

          Welcome to the forums!

           

          That looks weird, especially since the log seems to indicate that it's looking for a method with takes in a argument of type java.lang.Object. Please attach a reproducible application to this thread. Which version and vendor of Java runtime are you using?

          • 2. Re: Migrating from AS 7.1.1 to EAP 6.1 - Possible issue with overloaded EJB method call - InvalidArgumentException - argument type mismatch
            cce

            Hi Jaikiran,

             

            I'll put together an example application shortly and post it here. In the meantime, re: java versions...I've tried it under a few different versions of Oracle's 64-bit JRE on Windows.

             

            java version "1.6.0_31"

            Java(TM) SE Runtime Environment (build 1.6.0_31-b05)

            Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

             

            ---

             

            java version "1.7.0"

            Java(TM) SE Runtime Environment (build 1.7.0-b147)

            Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

             

            Note: I had tried these JRE versions on RH Linux too. The error still occurs regardless of JRE. Also, I used the same JRE on 7.1.1 without experiencing the error.

            • 3. Re: Migrating from AS 7.1.1 to EAP 6.1 - Possible issue with overloaded EJB method call - InvalidArgumentException - argument type mismatch
              totempole

              Came across the same error on EAP6.1, just wonder if there is any follow up on this issue. Interesting enough, the error is raised on an overloaded EJB method.


              javax.ejb.EJBTransactionRolledbackException: argument type mismatch

                      at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:138)

                      at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:228)

                      at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:317)

                      at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContext

              Interceptor.java:41)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:76)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java

              :64)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:5

              4)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                      at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                      at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)

                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                      at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                      at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)