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
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.
- mysql> use INFORMATION_SCHEMA;
- 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