Home » RDBMS Server » Server Utilities » cannt read the bad file from java code (MAC OS)
cannt read the bad file from java code [message #552430] Wed, 25 April 2012 14:09 Go to next message
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.
Re: cannt read the bad file from java code [message #552446 is a reply to message #552430] Wed, 25 April 2012 21:56 Go to previous message
Barbara Boehmer
Messages: 9077
Registered: November 2002
Location: California, USA
Senior Member
Are you sure there is a bad file? If all rows are loaded successfully, then no bad file is created. Does the log file show that any rows were not loaded?

Previous Topic: sql loader error for direct path(3 Merged)
Next Topic: ORA-39002,ORA-39070,ORA-29283,ORA-06512
Goto Forum:
  


Current Time: Thu Mar 28 14:06:06 CDT 2024