Spring AOP-caused by: Java. Lang. illegalargumentexception: superclass has no null Constructor

Source: Internet
Author: User

 

We are integrating perf4j and javasimon Code When I found some problems, that is, I was running good things in my own test code. When I put it in the project code, I always reported the following error :... caused by: Java. lang. illegalargumentexception: superclass has no null constructors but no arguments were given... compared with the code, spring beans with constructor parameters are not found in your own test code in the past half a day. Many classes in the project code are created by using parameter constructor. Spring does not process the parameter constructor when creating the target object subclass with cglib. Instead, it uses the default parameter constructor, which causes the above exceptions. To solve this problem, you can simply add a default constructor, provided that your class is allowed to be modified, however, it is troublesome for classes that do not have Default constructors, such as third-party classes. Here is a very detailed Article A description of this problem, http://netfork.javaeye.com/blog/286215

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.