Java org.springframework.boot 2.1.8.RELEASE Redshift Cluster V1.0.10393的Pom.xml和属性
我遇到的第一个错误 无效操作:SQL命令 “删除序列(如果存在)休眠_序列” 不支持 在下面的例外情况中,我看到了以下内容。我假设我必须改变在hibernate_序列中增加索引的方式Java org.springframework.boot 2.1.8.RELEASE Redshift Cluster V1.0.10393的Pom.xml和属性,java,hibernate,spring-boot,amazon-redshift,Java,Hibernate,Spring Boot,Amazon Redshift,我遇到的第一个错误 无效操作:SQL命令 “删除序列(如果存在)休眠_序列” 不支持 在下面的例外情况中,我看到了以下内容。我假设我必须改变在hibernate_序列中增加索引的方式 Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: SQL command "create sequence hibernate_sequence start 1 increment
Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: SQL command "create sequence hibernate_sequence start 1 increment 1" not supported.;
... 49 common frames omitted
2019-10-07 14:02:30,237 WARN [main] org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl: GenerationTarget encountered exception accepting command : Error executing DDL "create sequence hibernate_sequence start 1 increment 1" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create sequence hibernate_sequence start 1 increment 1" via JDBC Statement
在构建JavaSpring启动应用程序时,试图连接并创建一个新的redshift DB集群V1.0.10393
POM和属性文件应该是什么样子的?我正在从一个工作的PostgreSQL数据库过渡到一个红移数据库
当前属性
spring.datasource.driver-class-name=com.amazon.redshift.jdbc42.Driver
spring.datasource.url=jdbc:redshift://redshift-cluster-1.cwirererbv4xb.us-east-2.redshift.amazonaws.com:5439/db
spring.datasource.username=awsuser
spring.datasource.password=werwerwerew
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL9Dialect
spring.datasource.hikari.connectionTimeout=20000
spring.datasource.hikari.maximumPoolSize=5
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.open-in-view=false
spring.jpa.hibernate.ddl-auto=create
当前POM
<?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.lifograph</groupId>
<artifactId>formD</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</dependency>
<dependency>
<groupId>com.amazon.redshift</groupId>
<artifactId>redshift-jdbc42-no-awssdk</artifactId>
<version>1.2.10.1009</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.6</version>
</dependency>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>1.2.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>redshift</id>
<url>http://redshift-maven-repository.s3-website-us-east-1.amazonaws.com/release</url>
</repository>
<repository>
<id>in-project</id>
<name>custom jars</name>
<url>file://${project.basedir}/lib</url>
</repository>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
4.0.0
com.lifograph
形成
1
罐子
UTF-8
1.8
1.8
org.springframework.boot
spring启动程序父级
2.1.8.1发布
org.springframework.boot
弹簧启动启动器数据rest
org.springframework.boot
spring-boot-starter-log4j2
org.springframework.boot
spring引导启动器数据jpa
org.springframework
春季甲虫
com.amazon.redshift
红移-jdbc42-no-awssdk
1.2.10.1009
com.opencsv
opencsv
4.6
javax.interceptor
javax.interceptor-api
1.2.2
org.springframework.boot
springbootmaven插件
org.apache.maven.plugins
maven javadoc插件
-Xdoclint:无
红移
http://redshift-maven-repository.s3-website-us-east-1.amazonaws.com/release
项目中
定制罐
文件://${project.basedir}/lib
春假
https://repo.spring.io/libs-release
春假
https://repo.spring.io/libs-release
问候
Conteh由于我使用生成的ID,所以发生了我收到的错误
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@javax.persistence.Id
private long id;
我已经用@EmbeddedId替换了这些。
以及命名索引被删除