title: implementing aop..java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
body: <p>I am fairly new to Spring AOP. trying to implement AOP in my project. when i run the following code, I get this error. response really appreciated.</p>
  
  <pre class="lang-none prettyprint-override"><code>Caused by: java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
      at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:301)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:203)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(AspectJExpressionPointcut.java:189)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:167)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:208)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:262)
      at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:294)
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Target(ElementType.METHOD)
  @Retention(RetentionPolicy.RUNTIME)
  @Documented
  public @interface Authenticator {
      boolean byPassAuthentication() default false;
  }
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Aspect
  public class PointcutDefinition {   
      @Pointcut("within(com.test.services..*)")
      public void authenticator() {}
  }
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Aspect
  public class AccountLoggingAspect {
      @Before(value = "com.test.aop.PointcutDefinition.authenticator() &amp;&amp; @annotation(auth)")
      public void authenticatorlogging(Authenticator auth) {
          System.out("test");
      }
  }
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Transactional(propagation=Propagation.REQUIRES_NEW)
  @Aspect
  public class AspectAuditor {
      @Pointcut("within(com.test..*)")
      public void auditPtCut() {}
  
      @Before(value = "auditPtCut() &amp;&amp; @annotation(log)")
      public void beforeMethod(JoinPoint jp, AuditLog log) {
          if (log.enable())
              Audit.startTask(jp.getSignature().getName());
      }
  }
  </code></pre>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;aop:aspectj-autoproxy /&gt;
  &lt;bean id="loggingAspect" 
      class="com.test.aop.AccountLoggingAspect"&gt;
  &lt;/bean&gt;
      &lt;bean id="loggingAspectAuditor" 
      class="com.test.aop.AspectAuditor"&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>now added this code to the xml..and now getting different error                            </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;aop:aspectj-autoproxy /&gt;
  
  &lt;bean id="loggingAspect" 
      class="com.test.aop.AccountLoggingAspect"&gt;
  &lt;/bean&gt;
      &lt;bean id="loggingAspectAuditor" 
      class="com.test.aop.AspectAuditor"&gt;
  &lt;/bean&gt;
  
  &lt;aop:config&gt;
      &lt;aop:advisor pointcut="com.test.aop.PointcutDefinition()" advice-ref="tx-advice"/&gt;
  &lt;/aop:config&gt;
  
  &lt;tx:advice id="tx-advice" transaction-manager="transactionManager"&gt;
    &lt;tx:attributes&gt;
      &lt;tx:method name="*" propagation="REQUIRED"/&gt;
    &lt;/tx:attributes&gt;
  &lt;/tx:advice&gt;
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.annotation.AnnotationCacheOperationSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error can't bind type name 'com.test.aop'
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
  </code></pre>