Error executing DDL via JDBC Statement with Spring Boot default configuration
Error executing DDL via JDBC Statement with Spring Boot default configuration
This is error which I get when I try to run the Spring Boot app as java app:org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
Caused by: java.sql.SQLSyntaxErrorException: Schema 'SA' does not exist
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
Caused by: java.sql.SQLSyntaxErrorException: Schema 'SA' does not exist
I have tride to change hibernate dialect in propereties in pom.xml (like written in other simillar topics about this problem) but it didn't help. I have also tried to change names of Topic class and fields.
This is the pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.julian.boot3</groupId>
<artifactId>boot3</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>boot3</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Main class:
package com.julian.spring;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class App
public static void main(String args)
SpringApplication.run(App.class, args);
POJO:
package com.julian.spring.pojo;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="topics")
public class Topic
@Id
private Integer id;
private String name;
private String description;
public Topic()
public Topic(int id, String name, String description)
this.id = id;
this.name = name;
this.description = description;
public int getId()
return id;
public void setId(int id)
this.id = id;
public String getName()
return name;
public void setName(String name)
this.name = name;
public String getDescription()
return description;
public void setDescription(String description)
this.description = description;
How to provide my app config? I didn't changeany configuration, this is default.
– stakowerflol
Aug 25 at 18:05
where is your connection to database ?
– lord_hokage
Aug 25 at 18:10
I don't know. This is spring boot app with apache.derby
– stakowerflol
Aug 25 at 18:10
You have to create app config in resources folder.
– lord_hokage
Aug 25 at 18:14
2 Answers
2
Please read https://spring.io/guides/gs/accessing-data-mysql/ this, is so regular question, how to arrange connection to database.
If you are not using MySQL, there are article for other databases, but for relational databases, all are the same.
so why the man in the tutorial didn't need to connect to any database? and it works for him.
– stakowerflol
Aug 25 at 18:31
Have you seen all him videos?
– lord_hokage
Aug 25 at 18:37
till this problem, yes.
– stakowerflol
Aug 25 at 19:17
You can create db in memory, but it is needed for repo tests, please, click link, that I've attached to post, read about this, and it will help your in the future.
– lord_hokage
Aug 25 at 19:32
I solved it by downgrading version of spring-boot-starter-parent fomr 2.0.4.REALESE to 1.5.1.RELEASE
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Caused by: java.sql.SQLSyntaxErrorException: Schema 'SA' does not exist, what don't you understand ? It's better to provide your app config too.
– lord_hokage
Aug 25 at 17:59