[SQL*LOADER/JAVA] Impossible d'exécuter le programme "SQLLDR".
deltawi
Posted messages
14
Status
Member
-
deltawi Posted messages 14 Status Member -
deltawi Posted messages 14 Status Member -
Hello,
I am starting with JAVA and I am developing a program that is supposed to import information from a .txt file into my table. I tried using SQL*LOADER, but it returns an error. I'm stuck and don't know how to resolve it! Here is the code I used:
try
{
String sqlldrCmd = "SQLLDR CONTROL=C:/Users/HP/Desktop/test.ctl "+
"LOG=C:/Users/HP/Desktop/test.log"+
"DATA=C:/Users/HP/Desktop/test.txt USERID=login/password"+
"BAD=C:/Users/HP/Desktop/test.bad ERRORS=999 "+
"LOAD=2000 SKIP=0";
System.out.println("SQLLDR Started");
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(sqlldrCmd);
System.out.println("SQLLDR Ended");
}
catch (Exception e)
{
e.printStackTrace();
}
This gives me the following error:
java.io.IOException: Cannot run program "SQLLDR": CreateProcess error=2, The specified file cannot be found
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.rgagnon.howto.Exec.main(Exec.java:43)
Caused by: java.io.IOException: CreateProcess error=2, The specified file cannot be found
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
... 5 more
--> I hope you can help me. Thank you!
Configuration: Windows 7 / Firefox 14.0.1
I am starting with JAVA and I am developing a program that is supposed to import information from a .txt file into my table. I tried using SQL*LOADER, but it returns an error. I'm stuck and don't know how to resolve it! Here is the code I used:
try
{
String sqlldrCmd = "SQLLDR CONTROL=C:/Users/HP/Desktop/test.ctl "+
"LOG=C:/Users/HP/Desktop/test.log"+
"DATA=C:/Users/HP/Desktop/test.txt USERID=login/password"+
"BAD=C:/Users/HP/Desktop/test.bad ERRORS=999 "+
"LOAD=2000 SKIP=0";
System.out.println("SQLLDR Started");
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(sqlldrCmd);
System.out.println("SQLLDR Ended");
}
catch (Exception e)
{
e.printStackTrace();
}
This gives me the following error:
java.io.IOException: Cannot run program "SQLLDR": CreateProcess error=2, The specified file cannot be found
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.rgagnon.howto.Exec.main(Exec.java:43)
Caused by: java.io.IOException: CreateProcess error=2, The specified file cannot be found
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
... 5 more
--> I hope you can help me. Thank you!
Configuration: Windows 7 / Firefox 14.0.1