• Register
0 votes
2.3k views

Problem :

I am a completely novice in the hibernate world and facing below error,

WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement

The exception while I run the stand-alone program in the hibernate 5.2.9 version. But in the hibernate 4 version all my code runs very well. I looked for many solutions but they are not working for me.

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

You must try the different dialects as follows

org.hibernate.dialect.MySQL5Dialect

or org.hibernate.dialect.MySQLMyISAMDialect or org.hibernate.dialect.MySQLInnoDBDialect 

to see which one exactly works for you.

It seems your current dialect is generating the type=MyISAM while it should be the  ENGINE=MyISAM in your create table query.

The mysql error 'TYPE=MyISAM'

Your logs are showing that following 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 the query directly on the mysql command prompt to see if that properly works for the MySQL version.

OR

You are using the updated version of MySQL but using the very old dialect

You should use either,

<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>

OR below one

<property name="hibernate.dialect">org.hibernate.dialect.MySQL8Dialect</property>

in your hibernate.cfg.xml file.

This will prevent you from getting the dialect issues

9 7 4
38,600 points

Related questions

0 votes
1 answer 13 views
13 views
Problem : I am a completely novice in the hibernate world and facing this error: Generationtarget encountered exception accepting command : error executing ddl via jdbc statement .
asked Mar 13 Wafa Abu Yousef 6.1k points
1 vote
1 answer 37 views
37 views
Problem : HELP! I need help understanding this error: Error creating bean with name 'employeeRepositoryDAOImple': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory. ... failed; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution
asked Mar 12 Shovo210 13.8k points
0 votes
1 answer 1 view
1 view
Problem: Which caused the error? Anyone have any idea &ldquo;Generationtarget encountered exception accepting command : error executing ddl.&rdquo;?
asked Mar 31 zayed1 35.6k points
0 votes
1 answer 41 views
41 views
Problem : After executing spring boot with h2 database and JPA i am facing below error, any help: org.hibernate.tool.schema.spi.commandacceptanceexception: error executing ddl via jdbc statement
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 4.9K views
4.9K views
Problem : After executing spring boot with h2 database and JPA i am facing below error org.hibernate.tool.schema.spi.commandacceptanceexception: error executing ddl via jdbc statement
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 24 views
24 views
Problem: Why I got the error :javax.persistence.transactionrequiredexception: executing an update/delete query.
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 3.5K views
3.5K views
Problem : I am getting bellow error while using hibernate JPA with spring and mongodb and running my application on Glassfish-4.0. javax.persistence.transactionrequiredexception: executing an update/delete query
asked Oct 19, 2019 peterlaw 6.9k points
0 votes
1 answer 50 views
50 views
Problem: why I cant fix this : Unable to create requested service [org.hibernate.engine.jdbc.env.spi.jdbcenvironment] .
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 4.2K views
4.2K views
Problem : I want to configure the hibernate orm mapping tool to my java class and want to use PostgreSQL as my database also I have configured the password as "password". But when I tried to run the application, I am facing following error ... in thread "main" org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
asked Dec 4, 2019 alecxe 7.5k points
0 votes
1 answer 94 views
94 views
Problem : This is the error that is thrown when trying to run my web app: [INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Injection of ... of the Datanucleus is no longer supported by your DataNucleus project I don't know what is missing in my app?
asked Dec 21, 2019 alecxe 7.5k points