views:

50

answers:

1

Hi.

I'm getting crazy over an error I'm currently experiencing. nde Argumente der invocation

14:45:08,492 ERROR [BusinessControllerInterceptor] object is not an instance of declaring class [ERRID: 0845] org.springframework.aop.AopInvocationException: AOP configuration seems to be invalid: tried calling method [public abstract at.mypckg.stp.zpv.ibs.dto.par.List at.mypckg.stp.zpv.ibs.i.par.Search.search(at.mypckg.stp.zpv.ibs.dto.par.Employee)] on target [searchTarget]; nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class

The searchTarget is an EJB bean and implements the interface with which it is called, so the method exists.

I don't know where else to look for mistakes. Maybe you have some hints.

A: 

I've found the problem. In my application context I've written

    <property name="target">
        <value>searchTarget</value>
    </property>

instead of

    <property name="targetName">
        <value>searchTarget</value>
    </property>

Since the property target is expecting an object, it thought of my target as a string.

Bernhard V