Announcement Announcement Module
No announcement yet.
job execution context is not saved properly Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • job execution context is not saved properly

    The problem I have is that the job execution context is not saved properly: I
    have a class that has a String attribute; in my particular scenario the value
    of that field is actually a number, but with a leading zero (021038831); when
    saved to the batch_job_execution_context table the leading zero is lost;
    that means that in case I need to restart the job it will be restarted with an
    invalid context;

    Here is the code for my class

    public class Obligation implements Serializable{
    	private static final long serialVersionUID = 3044514607425389560L;
    	private long obligationId;
    	private String funderABA;
    	private Date recordDate;
    	private Date paymentDate;
    	private Date balanceDate;
    	private Notification notification;
    	private BigDecimal totalFundingAmount;
    	private Collection<PayoutPattern> payoutPatterns = new ArrayList<PayoutPattern>();
    	.... snip ....
    	public String getFunderABA() {
    		return funderABA;
    	public void setFunderABA(String funderABA) {
    		this.funderABA = funderABA;
          .... snip ....
    The field with the problem is funderABA.

    And this is the value persisted in the short_context column of batch_job_execution_context.
    (you will see the within the code below: "funderABA":21038831 )

    You will notice that the value of the funderABA field does not have the leading zero.
    I'm using spring batch 2.0.4.
    Last edited by RobertGloverJr; Feb 2nd, 2010, 03:23 PM. Reason: add version number of spring batch being used

  • #2
    That's a bug in Jettison. I think it might be fixed, so can you upgrade to 1.1 and see if it works?