Spring Boot 2 + HikariCP - BŁĄD: schemat tworzenia obiektu nie jest wskazany

0

Zaktualizowałem Spring Boot z wersji 1.5.6 do wersji 2.0.0. Nie mogę dodać tablicy do bazy danych z pliku schema i klasa z adnotacją @Entity również nie tworzy tablicy automatycznie. Mój plik appliaction.properties

spring:
  datasource:
    driver-class-name: org.postgresql.Driver
    jdbcUrl: jdbc:postgresql:database
    username: root
    password: root
    schema: classpath:/db/init/schema.sql
    type: com.zaxxer.hikari.HikariDataSource
    # Hikari Properties
    poolName: SpringBootHikariCP
    maximumPoolSize: 5
    minimumIdle: 3
    maxLifetime: 2000000
    connectionTimeout: 30000
    idleTimeout: 30000
    pool-prepared-statements: true
    max-open-prepared-statements: 250
    connection-test-query: SELECT 1

Przed aktualizacją Spring Boot wszystko działało. Teraz jest problem. Większość tabel była dodawana automatycznie za pomocą adnotacji @Entity, a tylko jedna tabela była utworzona przy użyciu pliku schema.sql. Jednak teraz podczas kompilacji pojawia się błąd

[EL Info]: 2018-03-19 14:48:42.003--ServerSession(1586259225)--EclipseLink, version: Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f
[EL Info]: connection: 2018-03-19 14:48:42.117--ServerSession(1586259225)--/file:/C:/Users/Jonatan/Documents/GitHub/REST-Web-Services/web/out/production/classes/_unit login successful
[EL Warning]: ddl: 2018-03-19 14:48:42.182--ServerSession(1586259225)--Removing UNIQUE constraint definition from [contributions.ID] because it is also a primary key.
[EL Fine]: sql: 2018-03-19 14:48:42.183--ServerSession(1586259225)--Connection(650147402)--CREATE TABLE contributions (ID BIGINT NOT NULL, created TIMESTAMP NOT NULL, entity_version INTEGER NOT NULL, field VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, user_comment VARCHAR(255), verification_comment VARCHAR(255), verification_date TIMESTAMP, movie_id BIGINT NOT NULL, user_id BIGINT NOT NULL, verification_user BIGINT, PRIMARY KEY (ID))
[EL Fine]: sql: 2018-03-19 14:48:42.185--ServerSession(1586259225)--SELECT 1
[EL Warning]: 2018-03-19 14:48:42.186--ServerSession(1586259225)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: BŁĄD: schemat tworzenia obiektu nie jest wskazany
  Position: 14
Error Code: 0
Call: CREATE TABLE contributions (ID BIGINT NOT NULL, created TIMESTAMP NOT NULL, entity_version INTEGER NOT NULL, field VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, user_comment VARCHAR(255), verification_comment VARCHAR(255), verification_date TIMESTAMP, movie_id BIGINT NOT NULL, user_id BIGINT NOT NULL, verification_user BIGINT, PRIMARY KEY (ID))
Query: DataModifyQuery(sql="CREATE TABLE contributions (ID BIGINT NOT NULL, created TIMESTAMP NOT NULL, entity_version INTEGER NOT NULL, field VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, user_comment VARCHAR(255), verification_comment VARCHAR(255), verification_date TIMESTAMP, movie_id BIGINT NOT NULL, user_id BIGINT NOT NULL, verification_user BIGINT, PRIMARY KEY (ID))")
[EL Warning]: ddl: 2018-03-19 14:48:42.191--ServerSession(1586259225)--Removing UNIQUE constraint definition from [messages.id] because it is also a primary key.
[EL Fine]: sql: 2018-03-19 14:48:42.191--ServerSession(1586259225)--Connection(733780656)--CREATE TABLE messages (id  SERIAL NOT NULL, created TIMESTAMP NOT NULL, date_of_read TIMESTAMP, entity_version INTEGER NOT NULL, visible_for_recipient BOOLEAN NOT NULL, visible_for_sender BOOLEAN NOT NULL, subject VARCHAR(255) NOT NULL, text VARCHAR(4000) NOT NULL, unique_id VARCHAR(255) NOT NULL UNIQUE, recipient_id BIGINT NOT NULL, sender_id BIGINT NOT NULL, PRIMARY KEY (id))
[EL Fine]: sql: 2018-03-19 14:48:42.192--ServerSession(1586259225)--SELECT 1
[EL Warning]: 2018-03-19 14:48:42.193--ServerSession(1586259225)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: BŁĄD: schemat tworzenia obiektu nie jest wskazany
  Position: 14
Error Code: 0
Call: CREATE TABLE messages (id  SERIAL NOT NULL, created TIMESTAMP NOT NULL, date_of_read TIMESTAMP, entity_version INTEGER NOT NULL, visible_for_recipient BOOLEAN NOT NULL, visible_for_sender BOOLEAN NOT NULL, subject VARCHAR(255) NOT NULL, text VARCHAR(4000) NOT NULL, unique_id VARCHAR(255) NOT NULL UNIQUE, recipient_id BIGINT NOT NULL, sender_id BIGINT NOT NULL, PRIMARY KEY (id))
Query: DataModifyQuery(sql="CREATE TABLE messages (id  SERIAL NOT NULL, created TIMESTAMP NOT NULL, date_of_read TIMESTAMP, entity_version INTEGER NOT NULL, visible_for_recipient BOOLEAN NOT NULL, visible_for_sender BOOLEAN NOT NULL, subject VARCHAR(255) NOT NULL, text VARCHAR(4000) NOT NULL, unique_id VARCHAR(255) NOT NULL UNIQUE, recipient_id BIGINT NOT NULL, sender_id BIGINT NOT NULL, PRIMARY KEY (id))")
[EL Warning]: ddl: 2018-03-19 14:48:42.196--ServerSession(1586259225)--Removing UNIQUE constraint definition from [movies_info.ID] because it is also a primary key.
[EL Fine]: sql: 2018-03-19 14:48:42.196--ServerSession(1586259225)--Connection(1392829997)--CREATE TABLE movies_info (ID BIGINT NOT NULL, dtype VARCHAR(31), entity_version INTEGER NOT NULL, reported_for_delete BOOLEAN NOT NULL, reported_for_update BOOLEAN NOT NULL, status VARCHAR(255) NOT NULL, movie_id BIGINT NOT NULL, box_office VARCHAR(255), box_office_country VARCHAR(255), country VARCHAR(255), genre VARCHAR(255), language VARCHAR(255), other_title_country VARCHAR(255), other_title VARCHAR(255), file_id_in_cloud VARCHAR(255), file_provider VARCHAR(255), release_date_country VARCHAR(255), release_date DATE, review VARCHAR(255), review_title VARCHAR(255), site_official VARCHAR(255), site VARCHAR(255), storyline VARCHAR(255), PRIMARY KEY (ID))
[EL Fine]: sql: 2018-03-19 14:48:42.198--ServerSession(1586259225)--SELECT 1
[EL Warning]: 2018-03-19 14:48:42.198--ServerSession(1586259225)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f): org.eclipse.persistence.exceptions.DatabaseException
...

Na przykład te dwie tabele powinny zostać utworzone automatycznie, ponieważ ich klasy mają adnotację @Entity.

@Entity
public class Contribution{...}
@Entity
public class Message{...}

Nie wiem, czy muszę jakoś skonfigurować HikariCP, aby klasy z adnotacją @Entity tworzyły tablicę automatycznie lub co? Oczywiście, bez ustalonego schematu, wszystkie tabele encji tworzą się automatycznie, ale tylko wtedy, gdy dodaję schemat, wszystkie osie są zepsute.

1 użytkowników online, w tym zalogowanych: 0, gości: 1