首页 > 解决方案 > Spring Batch 可以与 Amazon Redshift 一起使用吗?

问题描述

我正在尝试将 Spring Batch (4.0.1.RELEASE) 与 Amazon Redshift 一起使用。我在这里解决了 Redshift 不支持序列的第一个主要问题。

但是,现在我在尝试运行工作时遇到了这个问题:

10:57:07.122 ERROR [http-nio-8080-exec-4 ] [JobLaunchingService] [] Could not start job [demoJob]
org.springframework.dao.InvalidDataAccessApiUsageException: PreparedStatementCallback; SQL [INSERT INTO BATCH_JOB_EXECUTION_CONTEXT (SHORT_CONTEXT, SERIALIZED_CONTEXT, JOB_EXECUTION_ID) VALUES(?, ?, ?)[Amazon][JDBC](10220) Driver does not support this optional feature.; nested exception is java.sql.SQLFeatureNotSupportedException: [Amazon][JDBC](10220) Driver does not support this optional feature.

这与 Redshift 1.2.16.1027 JDBC 驱动程序有关。

甚至可以使用 Redshift 作为批处理数据库吗?关于如何解决这个问题的任何建议?

标签: spring-batchamazon-redshift

解决方案


Amazon Redshift 不是 Spring Batch 支持的数据库。此处列出了支持的数据库:https ://github.com/spring-projects/spring-batch/tree/master/spring-batch-core/src/main/resources/org/springframework/batch/core 。


推荐阅读