Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7596341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:53:44+00:00 2026-05-30T21:53:44+00:00

Scenario 1 The skip listener interface is as below: public interface SkipListener<T,S> extends StepListener

  • 0

Scenario 1

The skip listener interface is as below:

public interface SkipListener<T,S> extends StepListener {
 void onSkipInRead(Throwable t);
 void onSkipInProcess(T item, Throwable t);
 void onSkipInWrite(S item, Throwable t);
}

This interface is best used to log the skipped item and the error.

Is is possible to get the number of the skipped item in the input. For e.g. if the 10th item in the input is getting skipped, I should be able to log “Item number 10 was skipped!” through above listener.

I need this since I have input as a file where the rows are not having any identifying key. So just by logging out the item, it would not be possible to pin point the item itself in the file.

What if instead of file, the input is a database table ? Is it possible to get the position number of the skipped item there as well ?

Scenario 2

My bean has three properties one, two and three (all strings) where the input is read from a file through appropriate row mapper and then a database table gets loaded with the data after some processing.

Below is a code block from processor:

if(two.charAt(4) == '_')
   { // do some processing }

Clearly if field two is coming empty from the file above block will throw “string index out of bound exception” and will get skipped.

So, inside skip listener, what I want is the information about the column which threw error.

Here since field named two gave error, the information I would like to log in skip listener would be like “Property one threw error “string index out of bound exception” in line number 10″ or if possible, even more specific “property one is empty in line number 10” which makes more sense to business who does not know java jargons.

Hope I made my doubts clear.

Thanks for reading!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:53:46+00:00Added an answer on May 30, 2026 at 9:53 pm

    Scenario 1

    to get line number for skipped item from reading a file you can:

    • for onSkipInRead – implement own/wrap the reader to act on exception
    • onSkipInProcess – implement own linemapper which writes line number to item or writes current line number in step context
    • onsKipInWrite – same as for onSkipInProcess

    to get line number for skipped item from reading a table you can:

    • for onSkipInRead – implement own/wrap the reader to act on exception, but i’m not sure if it’s possible to the get the line number here, might only be the current chunk-start-number
    • onSkipInProcess – implement own rowmapper which writes row number to item or writes current row number in step context
    • onsKipInWrite – same as for onSkipInProcess

    Scenario 2

    see scenario 1 and add a try/catch block inside your processor, so you throw your own exception e.g. with information on property position, or alter the step context in a similar way

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Skip to the specific question as needed. Some background: The scenario: I have a
Issue Seems like the condition gets ignored. Here is my scenario: Source class public
HI, I am looking for a scenario where I can skip some of the
Scenario : Default.aspx is as below. <%@ Page MasterPageFile=~/StandardLayout.master Language=C# CodeFile=Default.aspx.cs Inherits=_Default %> <%@
Scenario: A stored procedure receives from code a DateTime with, let's say DateTime.Now value,
Scenario: You have an ASP.Net webpage that should display the next image in a
Scenario: Attempting to import many (>100), large(>1M recs) flat-files (csv). Problem: Many records are
Scenario: I'm currently writing a layer to abstract 3 similar webservices into one useable
Scenario is that we send out thousands of emails through SMTP server. Content is
Scenario: An event is raised in class A that needs to be handled by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.