title: Spring AOP Poincut expression
body: <p>I want to create a pointcut expression to intercept all method calls to all classes within the package com.xmy.package and its sub packages. My xml, code looks like below</p>
  
  <pre><code>&lt;aop:config&gt;
      &lt;aop:pointcut id="allCalls" expression="within(com.xmy.package..*)" /&gt;
      &lt;aop:aspect ref="loggingService"&gt;
          &lt;aop:around method="logMethodFlow" pointcut-ref="allCalls" /&gt;
      &lt;/aop:aspect&gt;
  &lt;/aop:config&gt;
  </code></pre>
  
  <blockquote>
    <p>Caused by: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class......
    ..
    .
    .
    .
    .
    .Caused by: java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
            at net.sf.cglib.proxy.Enhancer.emitConstructors(Enhancer.java:721)
            at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:499)
            at net.sf.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33)
            at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
            at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
            at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
            at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
            at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:201)</p>
  </blockquote>
  
  <p>But when I use a pointcut expression for a particular class(as  below) it works fine.</p>
  
  <pre><code>&lt;aop:config&gt;
      &lt;aop:pointcut id="classCalls" expression="execution(* com.xmy.package.MyClass.*(..))" /&gt;
      &lt;aop:aspect ref="loggingService"&gt;
          &lt;aop:around method="logMethodFlow" pointcut-ref="classCalls" /&gt;
      &lt;/aop:aspect&gt;
  &lt;/aop:config&gt;
  </code></pre>
  
  <p>Please let me know how to log all method calls to a specific packages and its sub packages.</p>