title: Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
body: <p>Using Pointcut for Spring AOP is not working otherwise it works well.
  Please help me to solve this issue.</p>
  
  <p>Without Pointcut working code :</p>
  
  <pre><code>@Before("execution(public * spring.beans.Triangle.set*(*))")    
  public void beforeonlySetTriangle_FirstAspect()
  {
      System.out.println("beforeonlySetTriangle_FirstAspect only for Triangle is called");
  }
  @Before("execution(public * spring.beans.Triangle.set*(*))")    
  public void beforeonlySetTriangle_SecondAspect()
  {
      System.out.println("beforeonlySetTriangle_SecondAspect only for Triangle is called");
  }
  </code></pre>
  
  <p>With Pointcut  code  gives error:</p>
  
  <pre><code>@Before("setTrianglePointCutter()") 
  public void beforeonlySetTriangle_FirstAspect()
  {
      System.out.println("beforeonlySetTriangle_FirstAspect only for Triangle is called");
  }
  @Before("setTrianglePointCutter()") 
  public void beforeonlySetTriangle_SecondAspect()
  {
      System.out.println("beforeonlySetTriangle_SecondAspect only for Triangle is called");
  }
  
  @Pointcut("execution(public * spring.beans.Triangle.set*(*))")
  public void setTrianglePointCutter()
  {
  
  }
  </code></pre>
  
  <p>Exception :</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut setTrianglePointCutter
      at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:317)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:207)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:193)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(AspectJExpressionPointcut.java:182)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:163)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:209)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:263)
      at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:295)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1461)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      ... 11 more
  </code></pre>
  
  <p>spring.xml config file :</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
      http://www.springframework.org/schema/aop 
      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd "&gt;
  
   &lt;aop:aspectj-autoproxy /&gt;
  
  &lt;bean id="triangle" class="spring.beans.Triangle"&gt;
  &lt;property name="name" value="TriangleName"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="circle" class="spring.beans.Circle"&gt;
  &lt;property name="name" value="CircleName"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="shapeService" class="spring.service.ShapeService" autowire="byName"/&gt;
  &lt;bean id="loggingAspect" class="spring.aspect.LoggingAspect" /&gt;
  
  
  &lt;/beans&gt;
  </code></pre>