The method load (Class, Serializable) in the type HibernateTemplate is not applicable for the arguments (Class, int), templatearguments

Source: Internet
Author: User

The method load (Class, Serializable) in the type HibernateTemplate is not applicable for the arguments (Class, int), templatearguments

When someone else's project is introduced, an error is reported using the load method of HibernateTemplate. Error message:

The method load (Class, Serializable) in the type HibernateTemplate is not applicable for the arguments (Class, int)

The second parameter of the load method is the object that implements the Serializable interface. The int type does not match. However, if jdk is automatically packed, int will rotate to Integer, while Integer implements Serializable, so it should be possible. However, myeclipse reports an error because in myeclipse, the compiler compliance level in Windows> preferences> java-Compiler is set to 1.4.

The solution is to set the level of compiler compliance in window> preferences> java-Compiler to 1.6

Or force conversion.

Change

 

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.