Announcement Announcement Module
Collapse
No announcement yet.
Parallel job triggered by MDB Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Parallel job triggered by MDB

    Hi there, I have following test case and got a strange exception....

    I am using S.B 1.0.0.FINAL

    I have a MDB as a trigger of Spring Batch. The MDB just kicks off Spring Batch parallel run. But an exception was thrown from JdbcStepExecutionDao line 327, it shows that the dao could not find any step execution record it needs.

    the exception is as follows

    Code:
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R org.springframework.batch.core.UnexpectedJobExecutionException: Encountered an error saving batch meta data.
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.batch.core.step.item.ItemOrientedStep.execute(ItemOrientedStep.java:415)
    .......
    .......
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:96)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:132)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:481)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R Caused by: org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
    	at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
    	at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:668)
    	at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:678)
    	at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:705)
    	at org.springframework.batch.core.repository.dao.JdbcStepExecutionDao.updateStepExecution(JdbcStepExecutionDao.java:327)
    	at org.springframework.batch.core.repository.support.SimpleJobRepository.saveOrUpdate(SimpleJobRepository.java:238)
    	at org.springframework.batch.core.repository.support.SimpleJobRepository.saveOrUpdateExecutionContext(SimpleJobRepository.java:247)
    	at org.springframework.batch.core.step.item.ItemOrientedStep$1.doInIteration(ItemOrientedStep.java:315)
    	at org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ExecutingRunnable.run(TaskExecutorRepeatTemplate.java:215)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
    	at java.lang.Thread.run(Thread.java:801)
    
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:668)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:678)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:705)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.batch.core.repository.dao.JdbcStepExecutionDao.updateStepExecution(JdbcStepExecutionDao.java:327)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.batch.core.repository.support.SimpleJobRepository.saveOrUpdate(SimpleJobRepository.java:238)
    [4/15/08 10:42:59:712 CST] 00000025 SystemErr     R 	at org.springframework.batch.core.repository.support.SimpleJobRepository.saveOrUpdateExecutionContext(SimpleJobRepository.java:247)
    [4/15/08 10:42:59:728 CST] 00000025 SystemErr     R 	at org.springframework.batch.core.step.item.ItemOrientedStep$1.doInIteration(ItemOrientedStep.java:315)
    [4/15/08 10:42:59:728 CST] 00000025 SystemErr     R 	at org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ExecutingRunnable.run(TaskExecutorRepeatTemplate.java:215)
    [4/15/08 10:42:59:728 CST] 00000025 SystemErr     R 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
    [4/15/08 10:42:59:728 CST] 00000025 SystemErr     R 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
    [4/15/08 10:42:59:728 CST] 00000025 SystemErr     R 	at java.lang.Thread.run(Thread.java:801)
    Can anybody give me a clue on it?

  • #2
    It shouldn't make any difference how the job is triggered, so you could save yourself some trouble and try launching it from a command line or integration test. I'm not sure where to start looking for the problem yet, but if you do that we might be able to narrow it down. If you could post the job configuration it might also help.

    Comment

    Working...
    X