我使用 spring spring-boot-starter-batch 2.7.9 并以 mysql DB 作为数据源。我有一个奇怪的问题,批处理作业在我的本地运行,但无法在开发环境(kubernetes)中启动,异常如下:
Exception while starting job
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT into BATCH_JOB_EXECUTION_PARAMS(JOB_EXECUTION_ID, KEY_NAME, TYPE_CD, STRING_VAL, DATE_VAL, LONG_VAL, DOUBLE_VAL, IDENTIFYING) values (?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [HY000]; error code [3098]; The table does not comply with the requirements by an external plugin.; nested exception is java.sql.SQLException: The table does not comply with the requirements by an external plugin.
作业通过休息端 API 触发,该 API 提供两个作业参数:字符串和日期时间。
示例参数:
{
"idType" : "ALL",
"triggerTime": "2023-03-16T19:54:18.262Z"
}
我的本地数据库和开发数据库之间的一个区别可能是复制因子。开发数据库配置了 3 个副本,而在本地我只有一个。这可能是这个异常的原因吗?我该如何解决这个问题? TIA。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号