Results 1 to 8 of 8

Thread: Usage of SimpleLimitExceptionHandler

  1. #1
    Join Date
    Jan 2008
    Posts
    14

    Default Usage of SimpleLimitExceptionHandler

    Hi,

    I have some doubts regarding the usage of SimpleLimitExceptionHandler. When i configured one as follows:

    Code:
                    
    <bean id="txload" class="org.springframework.batch.execution.step.SimpleStepConfiguration">
                        <property name="commitInterval" value="10"></property>
                        <property name="startLimit" value="100"/>
                        <property name="saveRestartData" value="true" />
                        <property name="allowStartIfComplete" value="false" />
                        <property name="tasklet">
                            <bean class="org.springframework.batch.execution.tasklet.RestartableItemProviderTasklet">
                                <property name="itemProvider">
                                    <bean class="org.springframework.batch.item.provider.InputSourceItemProvider">
                                        <property name="inputSource" ref="txInputSource" /><!--This is a JdbcCursorInputSource-->
                                    </bean>
                                </property>
                                <property name="itemProcessor">
                                    <bean class="com.iflexsolutions.wm.infra.test.item.processor.TxProcessor">
    <!--A class which implements ItemProcessor-->
                                    </bean>
                                </property>
                            </bean>
                        </property>
                        <property name="exceptionHandler">
                            <bean class="org.springframework.batch.repeat.exception.handler.SimpleLimitExceptionHandler">
                                <property name="limit" value="5"/>
                                <property name="type" value="java.lang.Exception"/>
                                <property name="useParent" value="true"/>
                            </bean>
                        </property>
                    </bean>
    I have coded the TxProcessor to just output a log regarding processing. And to selectively throw new Exception() for certain ids(for 5 ids : 15,16,17,18,19)of the data obtained.

    What has been observed is:
    The first time i run the job, in which the above config is a step, when it encounters id 15, it tries to reexecute that chunk(commitInterval being 10) 5 times, throws the exception and the step fails.

    The second time i execute the same job, the processing picks up 15,16,17,18,19 (the same is logged) and it successfully completes the step and eventually the job execution.

    Is it because of the the tasklet being a RestartableItemProviderTasklet used together with SimpleLimitExceptionHandler.

    Please throw more light on this behaviour.

    Regards,
    Bhramara

  2. #2
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    Your code is starting over from 15 because it is restartable, but I'm not sure I understand the rest. When 15 is hit, the exception should be thrown, discarded because of the exception handler, then 16 processed, and on down the line until the limit is hit. Is this what is happening? Also, I don't understand how it could start at 15, but then keep processing, is the processor still throwing exceptions?

  3. #3
    Join Date
    Jan 2008
    Posts
    14

    Default

    hi, below is the log of the behaviour i explained:

    First time execution:

    Code:
    INFO - AbstractSingleSpringContextTests.loadContextLocations(177) | Loading context for locations: /pbs_batch_config.xml
    DEBUG - SimpleJobLauncher.afterPropertiesSet(185) | Using SimpleJobExecutorFacade
    jobConfiguration org.springframework.batch.core.configuration.JobConfiguration@1a28362
    launcher org.springframework.batch.execution.launch.SimpleJobLauncher@16dadf9
    Job txProcessingJob
    INFO - SimpleJobLauncher.runInternal(247) | Launching: DefaultJobIdentifier: name=txProcessingJob,key=TEST4
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - AbstractPlatformTransactionManager.getTransaction(319) | Using transaction object [java.lang.Object@6779e6]
    DEBUG - AbstractPlatformTransactionManager.getTransaction(347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad181201714caa4011714e23ea90003
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad181201714caa4011714e8694c0004
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120168aae9e01168ab37c690001
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120170c2fac01170c3cd02a0004
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120170c2fac01170c4d8a7e000a
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120168a381f01168a3eb0db0002
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120168a381f01168a3eb1480003
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120168aae9e01168abeb49b0002
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120170c02f001170c0416cc0001
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=9
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120170c02f001170c103ec10002
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=10
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad18120170c02f001170c103f5d0003
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=11
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad181201714caa4011714d35dd60001
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=12
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad181201714caa4011714da381c0002
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=13
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8ad181201714caa4011714f58eb20007
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=14
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 2
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=15
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 3
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=16
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 1
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=17
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 4
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=18
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 5
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=19
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 6
    DEBUG - RepeatTemplate.isComplete(400) | Batch is complete according to policy and result value.
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCommit(833) | Triggering beforeCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCompletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processCommit(660) | Initiating transaction commit
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCommit(859) | Triggering afterCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCompletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - AbstractPlatformTransactionManager.getTransaction(319) | Using transaction object [java.lang.Object@88df60]
    DEBUG - AbstractPlatformTransactionManager.getTransaction(347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT

  4. #4
    Join Date
    Jan 2008
    Posts
    14

    Default

    Code:
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 7
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 9
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 10
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 11
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 12
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 13
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 14
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 15
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCompletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback(751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCompletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - AbstractPlatformTransactionManager.getTransaction(319) | Using transaction object [java.lang.Object@5d391d]
    DEBUG - AbstractPlatformTransactionManager.getTransaction(347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 7
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 9
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 10
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 11
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 12
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 13
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 14
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 15
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCompletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback(751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCompletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - AbstractPlatformTransactionManager.getTransaction(319) | Using transaction object [java.lang.Object@1f4e571]
    DEBUG - AbstractPlatformTransactionManager.getTransaction(347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 7
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 9
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 10
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 11
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 12
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 13
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 14
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 15

  5. #5
    Join Date
    Jan 2008
    Posts
    14

    Default

    Code:
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCompletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback(751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCompletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - AbstractPlatformTransactionManager.getTransaction(319) | Using transaction object [java.lang.Object@165c7f6]
    DEBUG - AbstractPlatformTransactionManager.getTransaction(347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 7
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 9
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 10
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 11
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 12
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 13
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 14
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 15
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCompletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback(751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCompletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - AbstractPlatformTransactionManager.getTransaction(319) | Using transaction object [java.lang.Object@3a1ec6]
    DEBUG - AbstractPlatformTransactionManager.getTransaction(347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 7
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 9
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 10
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 11
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 12
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 13
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 14
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 15
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCompletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback(751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCompletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - AbstractPlatformTransactionManager.getTransaction(319) | Using transaction object [java.lang.Object@12c3327]
    DEBUG - AbstractPlatformTransactionManager.getTransaction(347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 7
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 9
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 10
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 11
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 12
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 13
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 14
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 15
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCompletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback(751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCompletion(875) | Triggering afterCompletion synchronization

  6. #6
    Join Date
    Jan 2008
    Posts
    14

    Default

    Exception being:

    Code:
    -------------------------------------------------------------------------------
    Test set: com.iflexsolutions.wm.infra.test.TxJobTest
    -------------------------------------------------------------------------------
    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.687 sec <<< FAILURE!
    testLaunchJob(com.iflexsolutions.wm.infra.test.TxJobTest)  Time elapsed: 2.641 sec  <<< ERROR!
    org.springframework.batch.repeat.exception.RepeatException: Exception in batch process; nested exception is java.lang.Exception
            at org.springframework.batch.repeat.exception.handler.DefaultExceptionHandler.rethrow(DefaultExceptionHandler.java:59)
            at org.springframework.batch.repeat.exception.handler.DefaultExceptionHandler.handleException(DefaultExceptionHandler.java:42)
            at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:220)
            at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:131)
            at org.springframework.batch.execution.step.simple.SimpleStepExecutor.processChunk(SimpleStepExecutor.java:334)
            at org.springframework.batch.execution.step.simple.SimpleStepExecutor$1$2.doInTransaction(SimpleStepExecutor.java:220)
            at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
            at org.springframework.batch.execution.step.simple.SimpleStepExecutor$1.doInIteration(SimpleStepExecutor.java:208)
            at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:324)
            at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:201)
            at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:131)
            at org.springframework.batch.execution.step.simple.SimpleStepExecutor.process(SimpleStepExecutor.java:185)
            at org.springframework.batch.execution.job.DefaultJobExecutor.run(DefaultJobExecutor.java:97)
            at org.springframework.batch.execution.launch.SimpleJobExecutorFacade.start(SimpleJobExecutorFacade.java:199)
            at org.springframework.batch.execution.launch.SimpleJobLauncher.runInternal(SimpleJobLauncher.java:248)
            at org.springframework.batch.execution.launch.SimpleJobLauncher$1.run(SimpleJobLauncher.java:292)
            at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
            at org.springframework.batch.execution.launch.SimpleJobLauncher.run(SimpleJobLauncher.java:280)
            at com.iflexsolutions.wm.infra.test.AbstractBatchLauncherTests.testLaunchJob(AbstractBatchLauncherTests.java:85)
            at com.iflexsolutions.wm.infra.test.AbstractValidatingBatchLauncherTests.testLaunchJob(AbstractValidatingBatchLauncherTests.java:34)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at junit.framework.TestCase.runTest(TestCase.java:164)
            at junit.framework.TestCase.runBare(TestCase.java:130)
            at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
            at junit.framework.TestResult$1.protect(TestResult.java:106)
            at junit.framework.TestResult.runProtected(TestResult.java:124)
            at junit.framework.TestResult.run(TestResult.java:109)
            at junit.framework.TestCase.run(TestCase.java:120)
            at junit.framework.TestSuite.runTest(TestSuite.java:230)
            at junit.framework.TestSuite.run(TestSuite.java:225)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
            at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
            at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
            at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
    Caused by: java.lang.Exception
            at com.iflexsolutions.wm.infra.test.item.processor.TxProcessor.process(TxProcessor.java:37)
            at org.springframework.batch.execution.tasklet.ItemProviderProcessTasklet.execute(ItemProviderProcessTasklet.java:149)
            at org.springframework.batch.execution.step.simple.SimpleStepExecutor.doTaskletProcessing(SimpleStepExecutor.java:372)
            at org.springframework.batch.execution.step.simple.SimpleStepExecutor$2.doInIteration(SimpleStepExecutor.java:347)
            at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:324)
            at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:201)
            ... 44 more

  7. #7
    Join Date
    Jan 2008
    Posts
    14

    Default

    second successful execution:

    INFO - SimpleJobLauncher.runInternal(247) | Launching: DefaultJobIdentifier: name=txProcessingJob,key=TEST4
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 319) | Using transaction object [java.lang.Object@15718f2]
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 7
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 8
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 9
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 10
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 11
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=5
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 12
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=6
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 13
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=7
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 14
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=8
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 15
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mpletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback (751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom pletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 319) | Using transaction object [java.lang.Object@b30913]
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 16
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mpletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback (751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom pletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=2
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 319) | Using transaction object [java.lang.Object@1e2befa]
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 17
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mpletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback (751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom pletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=3
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 319) | Using transaction object [java.lang.Object@e53220]
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(36) | The tx data is being processed with exception thrown for tx id 18
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mpletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processRollback (751) | Initiating transaction rollback
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom pletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=4
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 319) | Using transaction object [java.lang.Object@15c62bc]
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TxProcessor.process(39) | The tx data is being processed for 20
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=1
    DEBUG - RepeatTemplate.isComplete(400) | Batch is complete according to policy and result value.
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mmit(833) | Triggering beforeCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mpletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processCommit(6 60) | Initiating transaction commit
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom mit(859) | Triggering afterCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom pletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.isComplete(400) | Batch is complete according to policy and result value.
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 319) | Using transaction object [java.lang.Object@b1cc87]
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - RepeatTemplate.isComplete(400) | Batch is complete according to policy and result value.
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mmit(833) | Triggering beforeCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mpletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processCommit(6 60) | Initiating transaction commit
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom mit(859) | Triggering afterCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom pletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.isComplete(400) | Batch is complete according to policy and result value.
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 319) | Using transaction object [java.lang.Object@1fa6d18]
    DEBUG - AbstractPlatformTransactionManager.getTransaction( 347) | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG - RepeatTemplate.start(429) | Starting batch step.
    DEBUG - RepeatTemplate.executeInternal(196) | Batch operation about to start at count=0
    DEBUG - TestTasklet.execute(30) | executed the simple tasklet
    DEBUG - RepeatTemplate.isComplete(400) | Batch is complete according to policy and result value.
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mmit(833) | Triggering beforeCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerBeforeCo mpletion(846) | Triggering beforeCompletion synchronization
    DEBUG - AbstractPlatformTransactionManager.processCommit(6 60) | Initiating transaction commit
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom mit(859) | Triggering afterCommit synchronization
    DEBUG - AbstractPlatformTransactionManager.triggerAfterCom pletion(875) | Triggering afterCompletion synchronization
    DEBUG - RepeatTemplate.isComplete(400) | Batch is complete according to policy and result value.
    INFO - SimpleJobLauncher.runInternal(249) | Completed successfully: DefaultJobIdentifier: name=txProcessingJob,key=TEST4

  8. #8
    Join Date
    Jan 2008
    Posts
    14

    Default

    please forgive the verbose logs:

    dint want to miss anything out..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •