java - Spring 批处理管理。元表保持为空

标签 java spring spring-batch spring-batch-admin

我正在关注spring batch admin 。 我想使用数据库来保存元数据值。 我的元数据表已创建,但数据不会进入这些表。它仍然在内存中用于存储元数据。

我知道spring使用MapJobRepositoryFactoryBean作为jobRepository bean的实现类来在内存中存储数据,我们必须将其更改为 JobRepositoryFactoryBean 如果我们想在数据库中存储元数据。

但是,即使更改后,我也没有看到任何效果。 (我已经清理并重新编译,没有问题)

我花了一些时间搜索它,但没有成功。有人可以帮忙吗?

我的batch-oracle.properties 文件是-

batch.jdbc.driver=oracle.jdbc.driver.OracleDriver
batch.jdbc.url=jdbc:oracle:thin:@192.168.2.45:1521:devdb
batch.jdbc.user=hsdndad
batch.jdbc.password=isjdsn

batch.jdbc.testWhileIdle=false
batch.jdbc.validationQuery=
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-oracle10g.sql
batch.schema.script=classpath:/org/springframework/batch/core/schema-oracle10g.sql
batch.business.schema.script=classpath:oracle/initial-query.sql
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer
batch.database.incrementer.parent=sequenceIncrementerParent
batch.lob.handler.class=org.springframework.jdbc.support.lob.OracleLobHandler
batch.grid.size=2
batch.jdbc.pool.size=6
batch.verify.cursor.position=true
batch.isolationlevel=ISOLATION_SERIALIZABLE
batch.table.prefix=BATCH_

最佳答案

After some digging I came to know about the particular convention of properties file(earlier I was giving it name batch-default.properties) . . so now I think it is trying to insert but throwing some SERIALIZABLE exceptions. – Nirbhay Mishra

尝试将 JobRepository 的isolationLevelForCreate 更改为 ISOLATION_READ_COMMITTED

关于java - Spring 批处理管理。元表保持为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36684729/

相关文章:

java - Tomcat无法访问java API创建的文件

spring - 使用Gradle下载Spring 4源

java - 没有 web 服务器(tomcat 或 glassfish)的 spring mvc

javascript - 下载文件

java - Spring Batch 中的 MapReduce/聚合操作

spring-batch - Spring 批量测试

java - 为什么我无法膨胀包含 fragment 的布局?

java - IBM Integration 总线,解析 json

spring - Spring Batch 的 Mongo 存储库?

java - log4j 写入控制台但不写入文件(Liferay + Tomcat)