Commit Graph

378 Commits

Author SHA1 Message Date
Robert McNees
e36a44788d Add option to provide a custom JobKeyGenerator in JdbcJobInstanceDao
Resolves #3926
2023-08-31 23:30:59 +02:00
Mahmoud Ben Hassine
018fcf4799 Refactor tests in spring-batch-core
- Remove unused resources
- Fix logging libraries conflicts
- Merge duplicate data source configuration
- Merge scattered DDL scripts
- Replace usage of DataSourceInitializer with Spring JDBC test utilities
2023-06-23 11:30:04 +02:00
Stephan Freund
5fae33185f Fix TARGET_NAME_PREFIX in StepScope
Resolves #3936
2023-02-21 10:47:29 +01:00
Mahmoud Ben Hassine
d66372a0fb Fix timestamp precision in schema-hsqldb-extended.sql
Related to 81728c00ed
2022-10-12 08:06:13 +02:00
Mahmoud Ben Hassine
2b258d1b88 Change the default execution context serializer to DefaultExecutionContextSerializer
This commit changes the default execution context serializer to
DefaultExecutionContextSerializer, which makes Jackson an optional
dependency.

Resolves #4140
2022-10-10 10:39:50 +02:00
Mahmoud Ben Hassine
40b4be3c14 Add transaction support in JobExplorerFactoryBean
This commit adds support to create a transactional
proxy around the JobExplorer created by the
JobExplorerFactoryBean.

Resolves #1307
2022-09-21 03:28:59 +02:00
Henning Poettker
2fdb68d28e Migrate Spring Batch Core to JUnit Jupiter 2022-08-02 21:25:54 +02:00
Marvin Deng
c0791039dc Rename SimpleJobLauncher to TaskExecutorJobLauncher
Resolves #4123
2022-07-19 13:34:23 +02:00
Mahmoud Ben Hassine
565ddcdf96 Change transaction manager type in default batch configuration
This commits changes the type of the transaction manager
from `DataSourceTransactionManager` to `JdbcTransactionManager`
in the default configuration of `@EnableBatchProcessing`.

The `JdbcTransactionManager` adds common JDBC exception translation
which is beneficial for Spring Batch to improve exception handling
and error reporting.

Resolves #4126
2022-07-16 17:52:43 +02:00
Marvin Deng
464985bf0a Distinguish CreateTime and StartTime in StepExecution
- Add field createTime for StepExecution.
- Add column create_time for batch_step_execution and make start_time default null.
- Make getLastStepExecution order by createTime instead of startTime.
- Add migration scripts for 5.0

Resolves #4049
2022-04-27 14:56:18 +02:00
Mahmoud Ben Hassine
e5c752b4b8 Remove JSR-352 implementation
Resolves #3894
2021-12-13 09:57:48 +01:00
Mahmoud Ben Hassine
ddbd0d8ebc Fix suffix of test classes names
As per Spring Framework code style [1], the suffix of
test classes should be "Tests". This commit fixes that
for some classes that do not conform to the code style.

[1]: https://github.com/spring-projects/spring-framework/wiki/Code-Style#tests
2021-09-13 11:22:47 +02:00
Mahmoud Ben Hassine
22c84588b9 Remove unused incrementer in data-source-context.xml
This commit removes an incrementer for a table
named BATCH_STEP_SEQ which does not exist (anymore).
2021-09-10 22:05:02 +02:00
Mahmoud Ben Hassine
f85a662ebf Refine contribution #3934
* Add default methods in all listener interfaces
* Remove usage of newly deprecated support classes

Issue #3924
2021-09-10 22:05:02 +02:00
Mahmoud Ben Hassine
ba0900127d Refine contribution #3933
* Remove usage of the newly deprecated method
* Rename fields/variables/parameters to be more explicit
2021-09-10 10:45:36 +02:00
Mahmoud Ben Hassine
d206de1cd0 Clean up schema versions in XML files of tests/samples
The schema version in JobParserWrongSchemaInRootTests-context.xml
has not been removed as it is used on purpose for
JobParserExceptionTests#testWrongSchemaInRoot.

Resolves #913
2021-08-24 11:51:37 +02:00
Mahmoud Ben Hassine
4b3bcac082 Update datasource configuration in samples/tests 2021-08-17 22:52:45 +02:00
Mahmoud Ben Hassine
36b63ed283 Remove usage of master/slave terminology 2021-08-17 21:59:30 +02:00
Mahmoud Ben Hassine
bb3809cf55 Remove deprecated APIs
Resolves #3836
2021-08-17 21:14:53 +02:00
Mahmoud Ben Hassine
f8bdf5521e Remove the Map based job repository/explorer and their DAOs
This commit removes the deprecated Map-based job repository
and job explorer implementations with their respective DAOs.
Using the `EnableBatchProcessing` annotation now requires a
datasource bean to be defined in the application context.
This will be reviewed as part of #3942.

This commit is a first pass that updates related tests to use
the JDBC-based job repository/explorer with an embedded database.
A second pass should be done to improve tests by caching/reusing
embedded databases if possible.

Issue #3836
2021-08-17 16:23:46 +02:00
Mahmoud Ben Hassine
27e11b52f9 Remove usage of deprecated APIs
Resolves #3838
2021-08-12 15:51:02 +02:00
Mahmoud Ben Hassine
d0493906a8 Replace usage of "build" directory with "target" 2021-01-29 11:45:34 +01:00
Mahmoud Ben Hassine
236ee88dcf Merge spring-batch-core-tests in spring-batch-core 2020-12-04 16:03:58 +01:00
Mahmoud Ben Hassine
1090731302 Fix flaky tests
JsrSplitParsingTests#test and DecisionStepTests#testDecisionAfterSplit
were failing intermittently with:

```
org.springframework.batch.core.JobExecutionException: Flow execution ended unexpectedly
    at org.springframework.batch.core.jsr.job.flow.JsrFlowJob.doExecute(JsrFlowJob.java:88) ~[main/:?]
    at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320) [main/:?]
    at org.springframework.batch.core.jsr.launch.JsrJobOperator$2.run(JsrJobOperator.java:674) [main/:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: org.springframework.batch.core.job.flow.FlowExecutionException: Ended flow=flow1.step1 at state=flow1.step1.flow1.step1 with exception
    at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:178) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:94) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:91) ~[main/:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_232]
    ... 1 more
Caused by: org.springframework.dao.ConcurrencyFailureException: PreparedStatementCallback; SQL [INSERT INTO BATCH_STEP_EXECUTION_CONTEXT (SHORT_CONTEXT, SERIALIZED_CONTEXT, STEP_EXECUTION_ID) VALUES(?, ?, ?)]; transaction rollback: serialization failure; nested exception is java.sql.SQLTransactionRollbackException: transaction rollback: serialization failure
    at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:73) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1015) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.persistSerializedContext(JdbcExecutionContextDao.java:236) ~[main/:?]
    at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.saveExecutionContext(JdbcExecutionContextDao.java:189) ~[main/:?]
    at org.springframework.batch.core.repository.support.SimpleJobRepository.add(SimpleJobRepository.java:177) ~[main/:?]
    at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:371) ~[spring-tx-5.3.0.jar:5.3.0]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:134) ~[spring-tx-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.0.jar:5.3.0]
    at com.sun.proxy.$Proxy41.add(Unknown Source) ~[?:?]
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:144) ~[main/:?]
    at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68) ~[main/:?]
    at org.springframework.batch.core.jsr.job.flow.support.state.JsrStepState.handle(JsrStepState.java:53) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:94) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:91) ~[main/:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_232]
    ... 1 more
Caused by: java.sql.SQLTransactionRollbackException: transaction rollback: serialization failure
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136) ~[commons-dbcp2-2.8.0.jar:2.8.0]
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136) ~[commons-dbcp2-2.8.0.jar:2.8.0]
    at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1015) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.persistSerializedContext(JdbcExecutionContextDao.java:236) ~[main/:?]
    at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.saveExecutionContext(JdbcExecutionContextDao.java:189) ~[main/:?]
    at org.springframework.batch.core.repository.support.SimpleJobRepository.add(SimpleJobRepository.java:177) ~[main/:?]
    at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:371) ~[spring-tx-5.3.0.jar:5.3.0]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:134) ~[spring-tx-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.0.jar:5.3.0]
    at com.sun.proxy.$Proxy41.add(Unknown Source) ~[?:?]
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:144) ~[main/:?]
    at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68) ~[main/:?]
    at org.springframework.batch.core.jsr.job.flow.support.state.JsrStepState.handle(JsrStepState.java:53) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:94) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:91) ~[main/:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_232]
    ... 1 more
Caused by: org.hsqldb.HsqlException: transaction rollback: serialization failure
    at org.hsqldb.error.Error.error(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.error.Error.error(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.Session.handleAbortTransaction(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.Session.executeCompiledStatement(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.Session.execute(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source) ~[hsqldb-2.5.1.jar:2.5.1]
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136) ~[commons-dbcp2-2.8.0.jar:2.8.0]
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136) ~[commons-dbcp2-2.8.0.jar:2.8.0]
    at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1015) ~[spring-jdbc-5.3.0.jar:5.3.0]
    at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.persistSerializedContext(JdbcExecutionContextDao.java:236) ~[main/:?]
    at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.saveExecutionContext(JdbcExecutionContextDao.java:189) ~[main/:?]
    at org.springframework.batch.core.repository.support.SimpleJobRepository.add(SimpleJobRepository.java:177) ~[main/:?]
    at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:371) ~[spring-tx-5.3.0.jar:5.3.0]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:134) ~[spring-tx-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.0.jar:5.3.0]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.0.jar:5.3.0]
    at com.sun.proxy.$Proxy41.add(Unknown Source) ~[?:?]
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:144) ~[main/:?]
    at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68) ~[main/:?]
    at org.springframework.batch.core.jsr.job.flow.support.state.JsrStepState.handle(JsrStepState.java:53) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:94) ~[main/:?]
    at org.springframework.batch.core.job.flow.support.state.SplitState$1.call(SplitState.java:91) ~[main/:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_232]
    ... 1 more
```

This failure is due to a concurrency issue when executing
the split flow with the default SimpleAsyncTaskExecutor.

Several attempts have been made to fix this issue with no success:

* use `@DirtiesContext` annotation
* use a separate db for each test
* use `READ_COMMITTED` isolation level in the job repository
* downgrade hsqldb from v2.5.1 to v2.4.1 (since v2.5.1 has
introduced several changes in the MVCC mode)

The issue seems to be related to how the in-memory database
is shared between tests *and* how the test context is cached
(ie the combination of both).

This commit moves these tests to a separate test class which
seem to fix the issue.
2020-11-18 16:50:10 +01:00
Mahmoud Ben Hassine
a9fc6be6be Fix schema location of jsr 352 namespace 2019-03-26 21:53:14 +01:00
Spring Operator
8762e34115 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd (301) with 29 occurrences migrated to:
  https://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/jobXML_1_0.xsd ([https](https://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd) result InvalidMediaTypeException).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd (301) with 1 occurrences migrated to:
  https://hibernate.org/dtd/hibernate-mapping-3.0.dtd ([https](https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd) result 200).
* http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd (301) with 2 occurrences migrated to:
  https://hibernate.org/dtd/hibernate-mapping-3.0.dtd ([https](https://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd) result 200).
* http://www.springframework.org/schema/aop/spring-aop-2.5.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop-2.5.xsd ([https](https://www.springframework.org/schema/aop/spring-aop-2.5.xsd) result 200).
* http://www.springframework.org/schema/aop/spring-aop-3.1.xsd with 21 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop-3.1.xsd ([https](https://www.springframework.org/schema/aop/spring-aop-3.1.xsd) result 200).
* http://www.springframework.org/schema/aop/spring-aop.xsd with 27 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop.xsd ([https](https://www.springframework.org/schema/aop/spring-aop.xsd) result 200).
* http://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd with 16 occurrences migrated to:
  https://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd ([https](https://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-2.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-2.0.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-2.0.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-2.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-2.1.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-2.1.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-2.2.xsd with 99 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-2.2.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-2.2.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-3.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-3.0.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-3.0.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch.xsd with 51 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch.xsd ([https](https://www.springframework.org/schema/batch/spring-batch.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans-2.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.0.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans-2.5.xsd with 14 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.5.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.5.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans-3.1.xsd with 145 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.1.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.1.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans.xsd with 166 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context-2.5.xsd with 8 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-2.5.xsd ([https](https://www.springframework.org/schema/context/spring-context-2.5.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context-3.1.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.1.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.1.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context-3.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.2.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.2.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context.xsd with 15 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).
* http://www.springframework.org/schema/data/jpa/spring-jpa.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/data/jpa/spring-jpa.xsd ([https](https://www.springframework.org/schema/data/jpa/spring-jpa.xsd) result 200).
* http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd ([https](https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd) result 200).
* http://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd ([https](https://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd) result 200).
* http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd ([https](https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd) result 200).
* http://www.springframework.org/schema/integration/spring-integration.xsd with 27 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration.xsd ([https](https://www.springframework.org/schema/integration/spring-integration.xsd) result 200).
* http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd) result 200).
* http://www.springframework.org/schema/jdbc/spring-jdbc.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc.xsd) result 200).
* http://www.springframework.org/schema/jms/spring-jms.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/jms/spring-jms.xsd ([https](https://www.springframework.org/schema/jms/spring-jms.xsd) result 200).
* http://www.springframework.org/schema/lang/spring-lang.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang.xsd ([https](https://www.springframework.org/schema/lang/spring-lang.xsd) result 200).
* http://www.springframework.org/schema/rabbit/spring-rabbit.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/rabbit/spring-rabbit.xsd ([https](https://www.springframework.org/schema/rabbit/spring-rabbit.xsd) result 200).
* http://www.springframework.org/schema/task/spring-task-3.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/task/spring-task-3.0.xsd ([https](https://www.springframework.org/schema/task/spring-task-3.0.xsd) result 200).
* http://www.springframework.org/schema/task/spring-task.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/task/spring-task.xsd ([https](https://www.springframework.org/schema/task/spring-task.xsd) result 200).
* http://www.springframework.org/schema/tx/spring-tx-2.5.xsd with 8 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx-2.5.xsd ([https](https://www.springframework.org/schema/tx/spring-tx-2.5.xsd) result 200).
* http://www.springframework.org/schema/tx/spring-tx-3.1.xsd with 16 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx-3.1.xsd ([https](https://www.springframework.org/schema/tx/spring-tx-3.1.xsd) result 200).
* http://www.springframework.org/schema/tx/spring-tx.xsd with 21 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx.xsd ([https](https://www.springframework.org/schema/tx/spring-tx.xsd) result 200).
* http://www.springframework.org/schema/util/spring-util-3.1.xsd with 9 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-3.1.xsd ([https](https://www.springframework.org/schema/util/spring-util-3.1.xsd) result 200).
* http://www.springframework.org/schema/util/spring-util.xsd with 15 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util.xsd ([https](https://www.springframework.org/schema/util/spring-util.xsd) result 200).
* http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd with 3 occurrences migrated to:
  https://java.sun.com/xml/ns/persistence/persistence_1_0.xsd ([https](https://java.sun.com/xml/ns/persistence/persistence_1_0.xsd) result 302).

# Ignored
These URLs were intentionally ignored.

* http://java.sun.com/xml/ns/persistence with 6 occurrences
* http://www.springframework.org/schema/aop with 104 occurrences
* http://www.springframework.org/schema/batch with 343 occurrences
* http://www.springframework.org/schema/batch-integration with 32 occurrences
* http://www.springframework.org/schema/batch/test with 1 occurrences
* http://www.springframework.org/schema/beans with 673 occurrences
* http://www.springframework.org/schema/context with 52 occurrences
* http://www.springframework.org/schema/data/jpa with 2 occurrences
* http://www.springframework.org/schema/integration with 65 occurrences
* http://www.springframework.org/schema/integration/jdbc with 2 occurrences
* http://www.springframework.org/schema/integration/jms with 6 occurrences
* http://www.springframework.org/schema/jdbc with 8 occurrences
* http://www.springframework.org/schema/jms with 3 occurrences
* http://www.springframework.org/schema/lang with 2 occurrences
* http://www.springframework.org/schema/p with 60 occurrences
* http://www.springframework.org/schema/rabbit with 2 occurrences
* http://www.springframework.org/schema/task with 6 occurrences
* http://www.springframework.org/schema/tx with 89 occurrences
* http://www.springframework.org/schema/util with 48 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 330 occurrences
* http://xmlns.jcp.org/xml/ns/javaee with 82 occurrences
2019-03-21 10:59:44 +01:00
Mahmoud Ben Hassine
249fa2673e Fix typos 2018-10-02 22:40:56 +02:00
Michael Minella
f61679b55f Added updates for properties files as well 2017-11-27 12:06:29 -06:00
Michael Minella
52d2c257c5 Version updates 2017-10-23 15:52:55 -05:00
Michael Minella
a75b067ebc Added builder for JdbcCursorItemReader
This provides a builder for the JdbcCursorItemReader to simplify java
configuration.

Resolves BATCH-2555
2016-11-18 09:18:26 -06:00
thebignet
c662914896 Added unit test to verify JobScope works when using both @EnableBatchProcessing and XML namespace 2015-01-02 12:39:31 -06:00
Michael Minella
92e551e05d Add ability to override JSR-352 baseContext.xml
While existing functionality provided the ability to override the
components provided in the baseContext.xml (as required for JSR-352
functionality) at a job by job level, this commit allows a user to
specify a base context for all of the JSR-352 based jobs within a JVM.
To set the location of the custom base context, a JVM property
JSR-352-BASE-CONTEXT should be set.

BATCH-2290
2014-12-30 16:16:02 -06:00
Michael Minella
c10469367f Fixed manual wiring of JsrJobOperator
While the JSR-352 provides only one way to access the JobOperator
(BatchRuntime.getJobOperator()), it is useful for testing and embedding
to be able to wire your own JsrJobOperator instance.  This commit
addresses previous issues with using the constructor that provided that
functionality.

Note: This is a breaking change in that there is a new parameter on the
non-default constructor (adding a PlatformTransactionManager reference).
Users using the JsrJobOperator through the BatchRuntime as previously
mentioned should not be impacted.  Since this is the *only* method
perscribed by the JSR to consume that class, it is not expected to have
a large impact.

This fix partially addresses BATCH-2290.
2014-12-22 16:57:16 -06:00
Michael Minella
5b056e8126 Handle scenario where scanned item is filtered out
BATCH-2302 documents a scenario where an item throws an exception in a
fault tollerant step in the write, then in the process, throws an
exception as well.  This leads to an infinite loop.  To address this,
prior to attempting to write items during scanning we need to validate
that the there are items to be written (we were not which was causing a
NoSuchElementException when we did inputs.next().

This commit also removes an eronous System.out left in the
CoreNamespaceUtils.
2014-09-23 14:12:48 -05:00
Michael Minella
a2f2df0b17 Conditionally add custom scopes when using XML configuration
When using a combination of Java configuration and the XML namespace
configuration, prior to this commit, we would add the batch custom
scopes twice which lead to issues.  This commit gives priority to the
custom scopes provided by the java configuration.  If you've used
@EnableBatchProcessing and have configured batch components using the
batch namespace, the custom scopes that come with the java config will
take precidence.

This commit addresses Jira BATCH-2266
2014-09-22 13:48:28 -05:00
Michael Minella
04b339b8f4 Add BeanCreationException to list of standard failure exceptions
Without this change, when passing an invalid job parameter to a bean
that is created internally by Spring Batch will cause a
BeanCreationException that is essentially ignored.  Due to it being
ignored, an infinite loop occurs in processing.
2014-09-16 11:01:30 -05:00
Chris Schaefer
47eba434d8 BATCH-1863: The batch namespace can not be used with allowBeanDefinitionOverriding=false 2014-09-15 15:05:26 -05:00
Chris Schaefer
587680ba56 XD-1027: Create script-based batch ItemProcessor 2014-07-18 11:55:17 -05:00
Michael Minella
8f8600c14d BATCH-2253: Added automatic registraiton of Job Scope to java config and
added support for a @JobScope annotation.
2014-07-18 11:55:17 -05:00
Chris Schaefer
0f5a7af1a3 Final attempt at fixing test failure on build machine. Works as expected in a cloned plan 2014-07-18 11:55:17 -05:00
Chris Schaefer
3b36c132d5 Remove @Ignore from test, fix build system issue 2014-07-18 11:55:17 -05:00
Chris Schaefer
1ff1e6c7d0 BATCH-2242: Stopping a job in STARTING state throws OptimisticLockingFailureException 2014-07-18 11:55:17 -05:00
Thomas Bosch
cc6be985ad Allow multiple configs (xmls, java-files, packages) to be loaded in
ApplicationContextFactory
2014-05-22 11:30:15 -05:00
Chris Schaefer
57f409e0f1 update copyright dates, fix test method typo, xml cleanup, add varg - for BATCH-2227 2014-05-07 12:29:49 -04:00
Thomas Bosch
90aca9c98b BATCH-2227: Allow multiple configs (xmls, java-files, packages) to be
loaded in ApplicationContextFactory
2014-05-07 12:29:08 -04:00
Michael Minella
6d94ae9031 Updated hsqldb urls to use MVCC mode 2014-05-05 15:08:05 -05:00
Gunnar Hillert
11a8ec1dc4 BATCH-2144 - Merged Michael's changes
* Merge PR https://github.com/ghillert/spring-batch/pull/1
* Update Spring Integration dependency to 4.0.0.RC1
* Update docbook-reference-plugin to 0.2.8
2014-04-24 12:16:17 -05:00
Gunnar Hillert
f1d71a06f4 BATCH-2144 Convert Spring Batch to use Gradle
* Use Gradle 1.11
* Remove SpringSource references
* Update JavaDoc overview
* Update Jacoco conf + Add license/manifest files
* Addresses also BATCH-2187
* Update a number of unit tests to not be ignored

Jira: https://jira.springsource.org/browse/BATCH-2144
2014-04-24 12:16:17 -05:00
Michael Minella
3dc2ea3cb0 BATCH-2016: Added new flag to indicate if the step is being executed on
a restart.  If it is, the transition will be followed.  If not, we'll
look to see if we should be looking for somewhere else to restart.
2014-04-21 17:48:45 -05:00
jpraet
b26d272d43 cleanup 2014-04-02 14:35:53 -04:00