hibernate4.3.8 problems encountered with spring MVC

Source: Internet
Author: User
Tags sql error mysql command line

2703 [2015-01-21 16:47:42]-[ip=, ref=, ua=, sid=]
WARN O.h.e.jdbc.spi.sqlexceptionhelper-sql error:1109, SQLSTATE:42S02

2703 [2015-01-21 16:47:42]-[ip=, ref=, ua=, sid=]
ERROR O.h.e.jdbc.spi.sqlexceptionhelper- Unknown table ' referential_constraints ' in Information_schema

2719 [2015-01-21 16:47:42]-[ip=, ref=, ua=, sid=]
ERROR o.h.tool.hbm2ddl.schemaupdate-hhh000299:could not complete schema update
Java.lang.NullPointerException:null

hibernate4.3.8 and Spring 4.1.4.RELEASE, the database is the MySQL version is the 5.0.45 results above error.

Reason Analysis One:

Started to think it was hibernate dialect problem, Mysql5dialect mysqldialect mysql5innodialect not work

Reason Analysis Two:

Later on the Internet query MySQL discovery is the version of MySQL problem, referential_constraints in 5.0.45 not, so always error, see the following reference

    • The REFERENTIAL_CONSTRAINTS table is added in MySQL 5.1.10.

Http://dev.mysql.com/doc/refman/5.1/en/referential-constraints-table.html

After upgrading the version of MySQL to 5.6.21, finally no error.

By querying the table in INFORMATION_SCHEMA with the following SQL command, you can see that there are referential_constraints tables in 5.6.21.

    1. mysql> use INFORMATION_SCHEMA;
    2. Mysql> Show tables;

----------------------------------------------------------------------------------------------

MySQL can install multiple versions of a single machine, but the ports are different. If the ports are the same, only one MySQL service can be served in the service.

MySQL Command line Client flashed through the solution :

1, select only under the menu; MySQL---mysql server 5.6-->mysql command line Client---Right click, select Properties

2. View the target position under the attribute;

"C:\Program files\mysql\mysql server 5.6\bin\mysql.exe" "--defaults-file=c:\program files\mysql\mysql server 5.6\ My.ini ""-uroot ""-P "

Find out if there is a My.ini file in the corresponding directory.

3. Rename the My-default.ini under the installation directory to My.ini.

4. Start MySQL command line Client again.

Workaround:

C:\Program files\mysql\mysql Server 5.6 Only My-default.ini, no My.ini,

So stop the MySQL service in the Control Panel, copy a my-default.ini, then rename My.ini, then restart the MySQL service,

If you open MySQL Command line Client again, it will not flash.

hibernate4.3.8 problems encountered with spring MVC

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.