"Wrong target" exception when calling an EJB Local interface

Solution Verified - Updated -


  • When invoking a Local EJB3 Interface (Remote works fine) and we pass a complex object like Foo into fooManagerEJB.saveAction(Foo foo), we get the exception
  • After setting the org.jboss.ejb3.remoting.IsLocalInterceptor.passByRef flag we see the following error

    Caused by: java.lang.IllegalArgumentException: Wrong target. class com.company.ejb.FooManagerEJB for public java.lang.Long com.company.ejb.FooManagerEJB.saveFoo(com.company.domain.entity.Foo)
        at org.jboss.aop.joinpoint.MethodInvocation.handleErrors(MethodInvocation.java:141)


  • JBoss Enterprise Application Platform (EAP)
    • 4.3
    • 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In