- GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
You should try different dialects like
org.hibernate.dialect.MySQL5Dialect
ORorg.hibernate.dialect.MySQLMyISAMDialect
ORorg.hibernate.dialect.MySQLInnoDBDialect
to see which one works for you.
Solution 1
You should try different dialects likeorg.hibernate.dialect.MySQL5Dialect
OR org.hibernate.dialect.MySQLMyISAMDialect
OR org.hibernate.dialect.MySQLInnoDBDialect
to see which one works for you.
All in all, your current dialect is generating,type=MyISAM
while it should be, ENGINE=MyISAM
in create table query.
You should read this too, Why do I need to configure the SQL dialect of a data source?
Your logs say that this query was tried to be executed, create table MyTable (id integer not null, name varchar(255), primary key (id)) type=MyISAM
so you should try to execute that query directly on MySQL command prompt to see if that works for your MySQL version.
Also, in question, do specify your MySQL version too.
Solution 2
The reason you are facing this error might be any of the reasons below:-
- The column name in the DB Script and the model/entity class are different.
- There is a spelling mistake in your configuration file while mentioning property value.
- The MySQL version is not getting matched with the dialect that you are mentioning.
I was facing this error because I change the column names in my DATABASE SCRIPT but forgot to change it in the Model/Entity class.
Leave a Reply