Results 1 to 4 of 4

Thread: Nullpointer in batch job start up

  1. #1
    Join Date
    Jun 2008
    Posts
    21

    Default Nullpointer in batch job start up

    I am migrating from 1.0 to 2.0.

    The following is the configuration:
    Code:
    	<bean id="demoJob" parent="simpleBatchJob">
    		<property name="name" value="demoJob" />
    		<property name="steps">
    			<list>
    				<ref bean="demoStep" />
    			</list>
    		</property>
    	</bean>
    
    	<bean id="demoStep" parent="taskletStep">
    		<property name="tasklet" ref="tasklet" />
    		<property name="jobRepository" ref="jobRepository" />
    		<property name="transactionManager" ref="batchExecTransactionManager"></property>
    	</bean>
    
    	<bean id="tasklet" class="batch.demo.MyTasklet" />
    		<property name="location" value="/tmp/demo/"></property>
    	</bean>
    On executing this piece, I get the following exception.

    java.lang.NullPointerException
    at org.springframework.batch.core.job.AbstractJob.upd ateStatus(AbstractJob.java:423)
    at org.springframework.batch.core.job.AbstractJob.exe cute(AbstractJob.java:245)
    ....
    ....
    ....

    Any takes on what I might be doing wrong?
    Last edited by Dave Syer; Aug 5th, 2009 at 09:00 PM. Reason: added end tag to [code]

  2. #2
    Join Date
    Feb 2008
    Posts
    488

    Default

    Maybe your tasklet is returning null?

  3. #3
    Join Date
    Jun 2008
    Posts
    21

    Default

    My tasklet returns RepeatStatus.FINISHED from its 'doExecute' method.

  4. #4
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    Tasklet doesn't have a doExecute method. You have a base class that wraps this method?

Posting Permissions

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