cannt read the bad file from java code [message #552430] |
Wed, 25 April 2012 14:09  |
 |
ssurajita
Messages: 1 Registered: April 2012 Location: bhubaneswar
|
Junior Member |
|
|
We are using sqlldr query to load data into a table. This is handled in a java code. We are uploading an xls file which gets converted into csv and then the sqlloader call works, which in turn creates a bad and log file for error messages.
But I am not able to locate the bad file(in filesystem) within java code.
Below piece of used.
File file =new File(destfilePath);
if(file.exists()){
FileReader fr = new FileReader(file);
LineNumberReader lnr = new LineNumberReader(fr);
linenumber=0;
while (lnr.readLine() != null){
linenumber++;
}
logger.info("Total number of lines : " + linenumber);
lnr.close();
}else{
logger.info("File does not exists!");
}
The above code is able to locate CSV ,but not the bad file(whereas both files created in same path).
Can anybody have any idea, please share it with me.
|
|
|
|