3 Replies Latest reply on Jul 16, 2004 11:21 AM by Bill Burke

    "Unable to figure out calledmethod of a caller pointcut"

    Peter Backx Newbie

      I'm still experimenting with and learning AOP, so this might be one of those errors that's linked to my only partial understanding of the whole AOP thing.

      What I would like to do is intercept calls to remote EJB objects. My first attemp resulted in:

      <bind pointcut="execution(public * $instanceof{javax.ejb.SessionBean}->*(..))" >

      which doesn't work at all. Now, I understand it correct that's because we're dealing with interfaces here and it's not possible to place pointcuts in there.

      So my second attemp is:
      <bind pointcut="call(* $instanceof{javax.ejb.EJBObject}->*(..))" >


      Which works ok if I enter some data as argument. So for instance "int" instead of "..". But if I put ".." I get the following error:
      java.lang.ExceptionInInitializerError
      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to figure out calledmethod of a caller pointcut
       at org.jboss.aop.ClassAdvisor.resolveCallerMethodInfo(ClassAdvisor.java:1262)
       at MyClient.<clinit>(HelloWorldClient.java)
      


      I'm guessing that I either have too many wildcards in my pointcut expression for the system to handle or that there's some calls going on during initialisation that I am intercepting but don't want to. I tried solving that last problem by adding a "withincode" statement but the exception remains the same.

      Can any one shed some light on the reason why things go wrong?

      TIA
      Peter

        • 1. Re:
          Bill Burke Master

          This looks like a bug on my end. I'll take a look next week when I'm finished with my JBoss training.

          • 2. Re:
            solo Newbie

            I too have the similar problem. It won't even accept non argument methods aas well.

            Regards,
            Mario

            • 3. Re:
              Bill Burke Master

              sorry for the late response. With current CVS head I was able to write a unit test that had these pointcuts you described above with no problems. Maybe I have fixed something since Jun, I don't know.

              
              <bind pointcut="execution(public * $instanceof{javax.ejb.SessionBean}->*(..))" >
              
              <bind pointcut="call(* $instanceof{javax.ejb.EJBObject}->*(..))" >