Error content:
17:21:59,843 INFO org.hibernate.tool.hbm2ddl.schemaexport:226-running HBM2DDL schema Export
17:21:59,859 DEBUG org.hibernate.tool.hbm2ddl.schemaexport:242-import File not found:/import.sql
17:21:59,859 INFO org.hibernate.tool.hbm2ddl.schemaexport:251-exporting generated schema to database
17:21:59,859 DEBUG org.hibernate.tool.hbm2ddl.schemaexport:377-drop table Longmao if exists
17:21:59,859 DEBUG org.hibernate.tool.hbm2ddl.schemaexport:362-unsuccessful:drop table Longmao if exists
17:21:59,859 DEBUG Org.hibernate.tool.hbm2ddl.schemaexport:363-you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' if exists ' at line 1
17:21:59,859 DEBUG org.hibernate.tool.hbm2ddl.schemaexport:377-create table Longmao (ID integer generated by default as Identity (start with 1), name varchar (255), primary key (ID))
17:21:59,859 ERROR org.hibernate.tool.hbm2ddl.schemaexport:348-unsuccessful:create table LongMao (ID integer Generated by default as identity (start with 1), name varchar (255), primary key (ID))
17:21:59,859 Error Org.hibernate.tool.hbm2ddl.schemaexport:349-you has an error in your SQL syntax; Check the manual that corresponds to your MySQL server version for the right syntax to use near ' generated by default as I Dentity (start with 1), name varchar (255), primary key ' @ Line 1
17:21:59,859 INFO Org.hibernate.tool.hbm2ddl.schemaexport:268-schema Export Complete
Hibernate:insert into Longmao (ID, name) VALUES (NULL,?)
17:21:59,953 WARN org.hibernate.util.jdbcexceptionreporter:100-sql error:1048, sqlstate:23000
17:21:59,953 ERROR org.hibernate.util.jdbcexceptionreporter:101-column ' id ' cannot be null
----------------------------
Modified to:
<!--SQL dialect--
<property name= "dialect" >org.hibernate.dialect.MySQLDialect</property>
Note: MySQL is spelled like this, the second letter is lowercase
It is recommended to go directly to the document copy, don't knock Yourself
Hibernate error: Column ' ID ' cannot be null