Announcement Announcement Module
Collapse
No announcement yet.
AOP error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AOP error

    A developer has handed me an application that he built with Spring which I have been using. but on my Jboss 4.2.2 server I get an AOP error when calling a method in a class. I've changed the method to return void, it takes a String (which I've verified is being passed). But debugging does even go into the method.

    The object is gotten by a method I see shouldn't be done according to some, but I am trying to understand the code not change it:

    XXXSession x = (XXXSession)SpringContext.getInstance().getBean("x xxSession");



    And that does return a not null value.

    But Calling x.getXXX("s") then fails with the below error.

    It works for him and on our staging server. He says I don't have the right spring classes, and debugging shows it going into common-chains and dying, but I have the same version as on stage. We are pretty much stuck as to why this error happens for me but not him.



    org.springframework.aop.AopInvocationException: AOP configuration seems to be invalid: tried calling method [public abstract java.util.List gov.fws.xxx.ejb.XXXSession.getXXX(java.lang.String )] on target [XXXSessionEJBBean]; nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class
    at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:198)
    at $Proxy73.getAuthorizedAgencies(Unknown Source)
    at gov.fws.xxx.app.action.FindEstimateAction.execute( FindEstimateAction.java:27)
    at org.apache.struts.chain.commands.servlet.ExecuteAc tion.execute(ExecuteAction.java:58)
    at org.apache.struts.chain.commands.AbstractExecuteAc tion.execute(AbstractExecuteAction.java:67)
    at org.apache.struts.chain.commands.ActionCommandBase .execute(ActionCommandBase.java:51)
    at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
    at org.apache.commons.chain.generic.LookupCommand.exe cute(LookupCommand.java:304)
    at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
    at org.apache.struts.chain.ComposableRequestProcessor .process(ComposableRequestProcessor.java:283)
    at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1913)
    at org.apache.struts.action.ActionServlet.doGet(Actio nServlet.java:449)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at gov.fws.common.app.servlet.CrossScriptingFilter.do Filter(CrossScriptingFilter.java:49)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
Working...
X