• Register
0 votes

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
6 5 3
6,930 points

1 Answer

0 votes

Solution :

It seems your Entity Field names are matching with SQL reserved keywords,

So now you need to try and change the field names otherwise use the name attribute with @Column Annotation which should give alias names to the DATABASE as shown below:

    private String from;

    private String to;

    private BigDecimal conversionMultiple;
    private int port;
If you follow above aproach then your issue will be resolved.
9 7 4
38,600 points

Related questions

0 votes
1 answer 1.6K 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 ... hibernate 4 version all my code runs very well. I looked for many solutions but they are not working for me.
asked Feb 4 jwilliam 3.9k points
1 vote
1 answer 1.9K views
Problem : When I try to compile my spring project, I always face the below error : Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed I have the ... >1.4.1.RELEASE</version> <relativePath /> <!-- lookup parent from repository --> </parent> . . .
asked Dec 12, 2019 alecxe 7.5k points
0 votes
1 answer 2.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
1 vote
1 answer 1.4K views
Problem : I am beginner to spring + hibernate. Recently I have created the application with the use of spring + hibernate but I always face below error. I am trying to work on it for the very first time. Below is the error for your ... ) at coreservlets.StudentDAOImpl.create(StudentDAOImpl.java:19) at coreservlets.MainApp.main(MainApp.java:14) Can somebody help me in overcoming above error?
asked Mar 28 morrisBson 3.2k points
0 votes
2 answers 467 views
Problem : I am new to the Spring and JPA, wasted 10 days and no result with the searching on internet. I want to save the object to SQL SERVER, my connection is correct but when I write .flush() I get below exception &ldquo;nested exception is javax.persistence.TransactionRequiredException: no transaction is in progress&rdquo;
asked Jan 21 jwilliam 3.9k points