Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot 2 migration results in "Error executing DDL via JDBC Statement" #13375

Closed
DmytroRybka opened this issue Jun 5, 2018 · 7 comments
Closed
Labels
status: invalid An issue that we don't feel is valid

Comments

@DmytroRybka
Copy link

DmytroRybka commented Jun 5, 2018

After migration to spring-boot-gradle-plugin 2.0.2 from 1.4.6 I start getting :

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67) ~[hibernate-core-5.2.17.Final.jar:5.2.17.Final]
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: PUBLIC.USER
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) ~[hsqldb-2.4.0.jar:2.4.0]

With the 1.4.6 everything runs smooth.
Exception comes during db initialization with import.sql

spring:
  jpa:
    hibernate:
      ddl-auto: create
@snicoll snicoll changed the title spring-boot-gradle-plugin 2.0.2 migration results in "Error executing DDL via JDBC Statement" Spring Boot 2 migration results in "Error executing DDL via JDBC Statement" Jun 5, 2018
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 5, 2018
@snicoll
Copy link
Member

snicoll commented Jun 5, 2018

Upgrading from 1.4 to 2.0 also upgrades the Hibernate version you are using (as confirmed by the snippet you've shared).

It is impossible for us to say if this is a problem in Spring Boot, Hibernate or your application. If you want us to investigate, please take the time to share a sample that we can clone and run ourselves.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Jun 5, 2018
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Jun 12, 2018
@carlosag0712
Copy link

carlosag0712 commented Jun 15, 2018

Hello, here's a repo sample of the problem described, it is only happening with spring boot 2+
https://github.com/carlosag0712/DEVCONNECTOR

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue labels Jun 15, 2018
@snicoll
Copy link
Member

snicoll commented Jun 15, 2018

@carlosag0712 thanks for the feedback but that sample doesn't look minimal and I can't build it

[ERROR]   The project io.agileintelligence:demo:0.0.1-SNAPSHOT (/Users/snicoll/Downloads/DEVCONNECTOR-master/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for gravatar:gravatar:jar is missing. @ line 66, column 21

Then your sample uses the MySQL dialect with H2 (which is not going to work very well). What are the instructions to reproduce the problem?

@snicoll snicoll added status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Jun 15, 2018
@snicoll
Copy link
Member

snicoll commented Jun 15, 2018

from is a reserved keywords in many databases. I've renamed that field in both Experience and Education and the app starts fine.

@snicoll snicoll closed this as completed Jun 15, 2018
@snicoll snicoll added status: invalid An issue that we don't feel is valid and removed status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Jun 15, 2018
@rajkumar-cp

This comment has been minimized.

@snicoll

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

5 participants