为了账号安全,请及时绑定邮箱和手机立即绑定

org.springframework.boot 2.1.8.RELEASE Redshift

org.springframework.boot 2.1.8.RELEASE Redshift

HUX布斯 2023-09-27 15:14:56
我遇到的第一个错误无效操作:不支持 SQL 命令“如果存在 hibernate_sequence,则删除序列”在例外情况的更下方,我看到以下内容。我假设我必须更改 hibernate_sequence 中索引递增的方式。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 omitted2019-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 Statementorg.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create sequence hibernate_sequence start 1 increment 1" via JDBC Statement在构建 java Spring Boot 应用程序时,寻求连接并创建新的 redshift DB Cluster V1.0.10393。POM 和属性文件应该是什么样子?我正在从工作 PostgreSQL 数据库过渡到 redshift。当前属性spring.datasource.driver-class-name=com.amazon.redshift.jdbc42.Driverspring.datasource.url=jdbc:redshift://redshift-cluster-1.cwirererbv4xb.us-east-2.redshift.amazonaws.com:5439/dbspring.datasource.username=awsuserspring.datasource.password=werwerwerewspring.jpa.hibernate.ddl-auto=createspring.jpa.show-sql=truespring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=falsespring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL9Dialectspring.datasource.hikari.connectionTimeout=20000spring.datasource.hikari.maximumPoolSize=5spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=truespring.jpa.open-in-view=falsespring.jpa.hibernate.ddl-auto=create
查看完整描述

2 回答

?
侃侃尔雅

TA贡献1801条经验 获得超15个赞

我遇到的错误是因为我使用了生成的 ID


@Id

@GeneratedValue(strategy = GenerationType.AUTO)

@javax.persistence.Id

private long id;

我已将其替换为@EmbeddedId。命名索引也被删除。


查看完整回答
反对 回复 2023-09-27
?
哔哔one

TA贡献1854条经验 获得超8个赞

就我而言,因为我输入了错误的驱动程序类名称,所以我输入了 PostGresSQL 而不是 mySQL。



查看完整回答
反对 回复 2023-09-27
  • 2 回答
  • 0 关注
  • 62 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信