Results 1 to 4 of 4

Thread: Possible Error in documentation

  1. #1
    Join Date
    Feb 2009
    Posts
    19

    Default Possible Error in documentation

    Hi All,

    Not sure where to put this, or who to email.

    But in the documentation located here:

    http://static.springsource.org/sprin...params-passing

    It states this:

    Code:
    @Before("com.xyz.lib.Pointcuts.anyPublicMethod() && " + 
            "@annotation(auditable)")
    public void audit(Auditable auditable) {
      AuditCode code = auditable.value();
      // ...
    }
    However when I was running my version of this I was getting Transaction errors as it was having problems setting the error Type..

    Code:
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
    'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 
    'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
    'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error Type referred to is not an annotation type:
    But I found by change the line

    Code:
    @Before("com.xyz.lib.Pointcuts.anyPublicMethod() && @annotation(auditable)")
    to

    Code:
    @Before("com.xyz.lib.Pointcuts.anyPublicMethod() and @annotation(auditable)")
    It all works.

    Am I abusing something I shouldn't be? or is the documentation wrong?
    Last edited by jcook1000; Mar 4th, 2010 at 01:38 PM.

  2. #2
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    Both && and and version should work. Which Spring version are you using? Please file a JIRA issue so that we can take a look.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

  3. #3
    Join Date
    Feb 2009
    Posts
    19

    Default

    Quote Originally Posted by ramnivas View Post
    Both && and and version should work. Which Spring version are you using? Please file a JIRA issue so that we can take a look.

    -Ramnivas
    2.5.6

    Silly question, where is the JIRA?

  4. #4

    Default

    Quote Originally Posted by jcook1000 View Post
    2.5.6

    Silly question, where is the JIRA?
    http://jira.springframework.org/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •