Javassist Enhancement failed

Source: Internet
Author: User
April 16, 2015 10:48:07 am Org.hibernate.event.internal.DefaultLoadEventListener onLoad

INFO:HHH000327:Error performing load command:org.hibernate.HibernateException:Javassist enhancement failed:com.spri . Entity. User

The reason for the error is that it is shown in user to write a construction method that overrides the original default construction method. The persistence of hibernate is used here, so why does it need a non-parametric construction method because the persistence mechanism of hibernate is reflection, it needs to call newinstance () when it is reflected, The method is to create an instance object by invoking the default constructor method. In this example, I wrote a method of constructing a parameter, the original default method of construction is overwritten, and the original default is no parameter, so we need to show the construction of a parameterless method.

Workaround: Add a non-parametric constructor to user.

Javassist Enhancement failed

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.