|
Hi
Pranas
1. The
execption comes because the Loader delivered no data as reply, which indicates a
serious problem. I will correct the code in the driver
so that in this case a better message
than that nasty StringIndexOutOfBoundsException is
thrown.
2. To
see what really happens, you should take a look at the protocol file created by
the Loader,
a file called loader.prt that is located in the
RUNDIRECTORY of your database. If you see there
something that looks unusual, you should post that to the
list.
Regards
Alexander Schr�der
SAP
Labs Berlin
I tryed to import ~10 000 000 records from ~2000
files via Java DB Loder API:
Demo:
loader = new Loader(prop);
String command = "USE USER TEST
TEST";
loader.cmd(command);
loader.cmd("AUTOCOMMIT OFF");
File
directory = new
File(inputDirectory);
File[] files =
directory.listFiles();
for (int i = 0; i < files.length; i++)
{
String fileName =
files[i].getAbsolutePath();
command = "DATALOAD TABLE test INFILE
'"+fileName+"'";
loader.cmd(command);
loader.cmd("COMMIT");
} // for ...
Result:
java.lang.StringIndexOutOfBoundsException: String
index out of range: -4 at
java.lang.String.checkBounds(String.java:292)
at
java.lang.String.<init>(String.java:330)
at
com.sap.dbtech.util.StructuredBytes.getString(StructuredBytes.java:225)
at
com.sap.dbtech.powertoys.LoaderException.create(LoaderException.java:72)
at
com.sap.dbtech.powertoys.Loader.cmd(Loader.java:126)
at Import.main(Import.java:103)
Has somebody tried to use SAP DB with such amount
of data? How to handle "large" amount? At least how to load....
/Pranas
P.S. There are enought space for
data.
|