Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Critical
-
Resolution: Invalid
-
Affects Version/s: 1.1.Maintenance
-
Fix Version/s: None
-
Component/s: Core, Integration
-
Labels:None
Description
The batch application I am working on reads and processes lines from a delimited text file. Application to use a `FlatFileReader` to read the delimited text file,
`test.txt`
( aa|bb|cc|vv|nn|mm|ff|gg|ee|"rr|gg|jj||||ii| )
But the issue is that some of the data in the file has double quote, I need to process the data with double quote.
Unfortunately `FieldSet` method in spring batch is reading string after double quote has single string. Even if there are two or three double quote its throwing an exception my program throwing an exception.
exception:
ArrayIndexOutOfBoundsException: Array index out of range,
|
mapping.DefaultFieldSet.readAndTrim(DefaultFieldSet.java).
|
Anyone come across this issue, if so, what would be the proper resolution?
Manipulating the data itself is not an option unfortunately. I have tried adding an escape character before every double quote, but an exception is still thrown regardless.
Any help would be greatly appreciated.
—
I have added below property tag to my DelimiterLineTokenizer then issues has been resolved but some time I'm getting an error "item.DefaultItemFailureHandler - Error encountered while reading",
"*Caused by:
org.springframework.batch.core.JobInterruptedException: JobExecution interrupted.*"
<Property name="lineTokenizer"> |
<beanclass="org.springframework.batch.item.file.transform.DelimitedLineTokenizer"> |
<property name="quoteCharacter" value="@" /> |
</bean> |
</property> |
|
Any help can Be greatly appreciated.
I'm currently using spring batch version 1.1.2, I'm unable to process the data with single double quote (I mean only with one double quote). I'm getting the exception as:
"***quartz.SimpleThreadPoolTaskExecutor - Error while executing the Runnable:
org.springframework.batch.core.UnexpectedJobExecutionException: Unexpected checked exception in job execution***"
"***org.springframework.batch.core.JobInterruptedException: JobExecution interrupted.
at org.springframework.batch.core.job.SimpleJob.execute***"
Again manipulating the data is not an option. I have seen many other post but no one is using spring batch 1.1.2 at this time. version upgrade is not option too.
Any help greatly appreciated.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
A couple things: