3 Replies Latest reply on Sep 21, 2004 8:39 AM by marciodel

    Unable to figure out calledmethod of a caller pointcut

    marciodel Newbie

      Hi, I am using jbossaop RC1.

      I am tryimg to define a pointcut using:

      execution(* packageName.*->*(..))

      It works for several classes. But with a specific class the following error is being thrown:

      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:1371)
      at br.com.quality.appmenu.action.SMSAction.(SMSAction.java)
      ... 25 more
      Caused by: java.lang.RuntimeException: Unable to figure out calledmethod of a caller pointcut
      at org.jboss.aop.ClassAdvisor.resolveCallerMethodInfo(ClassAdvisor.java:1350)
      ... 26 more

      Do you know what is the problem?

      Thaks in advance.

      Marcio Alves

        • 1. Re: Unable to figure out calledmethod of a caller pointcut
          Bill Burke Master

          The caller pointcut should not be called. You can use the -report switch with the precompiler (the ant task would be report="true") and it will dump out all matching joinpoints and the bindings that they are attached to.

          a) are you using a "call" pointcut anywhere? It looks like you are. (or that you did).

          b) Are you using the precompiler? Clean all your classfile and recompile everything.

          If you can get a small testcase that reproduces the bug, please post it here.

          Bill

          • 2. Re: Unable to figure out calledmethod of a caller pointcut
            marciodel Newbie

            Hi, you are right. I am using "call(* packageName->*(..))".

            The following is the code that is causing the exception. When I remove conn.close(), the exception is not thown.


            MessageConnection conn = null;
            String url = "sms://" + getAttribute() + ":134";

            try {
            conn = (MessageConnection) Connector.open(url);
            TextMessage msg = (TextMessage) conn
            .newMessage(MessageConnection.TEXT_MESSAGE);
            msg.setPayloadText(text.toString());
            conn.send(msg);

            } catch (Exception e) {
            //e.printStackTrace();
            throw new IllegalStateException("Not allowed to send SMS");
            } finally {
            if (conn != null) {
            try {
            conn.close();
            } catch (Exception e) {
            if (com.xxx.xxxxxx.Debug.getDebugLevel() != com.xxx.xxxxxx.Debug.DBG_NONE)
            e.printStackTrace();

            }
            }
            }

            Thanks.

            • 3. Re: Unable to figure out calledmethod of a caller pointcut
              marciodel Newbie

              Hi. I forgot to say that the intercepted class is Connector. All others are not intercepted.

              I am using the SystemClassLoader. The pointcuts are being defined using the API and not the XML.

              Thanks,

              Marcio Alves