Announcement Announcement Module
Collapse
No announcement yet.
Parameter names cannot be determined unless compiled by AspectJ compiler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Parameter names cannot be determined unless compiled by AspectJ compiler

    I've implemented an aspect and I'm getting this exception when trying to get invoked method parameter names:

    java.lang.UnsupportedOperationException: Parameter names cannot be determined unless compiled by AspectJ compiler

    Here is the code that causes the exception:

    Code:
    if(CodeSignature.class.isAssignableFrom(pjp.getSignature().getClass())){
    CodeSignature signature = (CodeSignature)pjp.getSignature();
    return signature.getParameterNames();
    } else {
    return null; 
    }
    Is there any way to obtain parameter names with a Spring AOP Aspect or do I have to force using AspectJ weaving?

    Thank you in advance.

  • #2
    Please, could anyone help me with this? Would I be able to get operation parameter names if I enable Load time weaving with AspectJ instead of using standard Spring AOP proxies?

    Comment


    • #3
      Originally posted by dancantong View Post
      Please, could anyone help me with this? Would I be able to get operation parameter names if I enable Load time weaving with AspectJ instead of using standard Spring AOP proxies?
      Yes, you will be able to get parameter names with LTW, provided that you compile your classes with either -g or -g:var option.

      -Ramnivas

      Comment


      • #4
        Hi Ramnivas,
        I ran into this problem and I have been trying to find a solution for some time now.
        Can you tell me if LTW did indeed solve the problem for you? I've tried it and it doesn't seem to work for me.
        If you were able to resolve this issue could you please detail the steps for me so I can implement it?
        Thanks

        Comment

        Working...
        X