Announcement Announcement Module
Collapse
No announcement yet.
AopConfigException - Superclass has no null constructors but no arguments were given Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AopConfigException - Superclass has no null constructors but no arguments were given

    After upgrading to the 3.1.3, I run into the following error during the start up.

    Code:
    org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class com.abc.myapp.mypackage.service.aop.BeforeDoingIt]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
    This problem is solved after adding a non-argument constructor.

    Any document on this change?

    Is the following the reason? If so, why it didn't occur before?
    Since Spring AOP uses either J2SE dynamic proxies basing on an interface or aspectj CGLIB proxies, every class will either need an interface (for simple proxy based aspect weaving) or a constructor without any parameters (for cglib weaving). The constructor can be private.
    Thanks.
    Last edited by vw729; Nov 21st, 2012, 06:39 PM.

  • #2
    There can be a lot of reasons why it wasn't happening before, but as mentioned youself, for class-based proxying, you gotto have a zero-arg constructor. Did you change the pointcut expressions after upgrade or enabled class based proxying just after this upgrade? Can you confirm?

    Comment

    Working...
    X