Hello
I get this exception:
java.lang.NegativeArraySizeException
at com.hxtt.global.v.int(Unknown Source)
at com.hxtt.sql.paradox.l.a(Unknown Source)
at com.hxtt.sql.paradox.l.a(Unknown Source)
at com.hxtt.sql.paradox.l.a(Unknown Source)
at com.hxtt.sql.paradox.l.a(Unknown Source)
at com.hxtt.sql.s.a(Unknown Source)
at com.hxtt.sql.bq.a(Unknown Source)
at com.hxtt.sql.c1.a(Unknown Source)
at com.hxtt.d.l.a(Unknown Source)
at com.hxtt.sql.cv.a(Unknown Source)
at com.hxtt.sql.cg.a(Unknown Source)
at com.hxtt.sql.cg.next(Unknown Source)
at paradox.ProductsParadox.findAll(ProductsParadox.java:36)
at transfer.ToMySQL.checkProduct(ToMySQL.java:25)
at Run.start(Run.java:23)
at Run.main(Run.java:17)
When i execute following code:
public ArrayList findAll() {
boolean rc = false;
ArrayList allArray = new ArrayList();
ProductsParadox curSale;
try {
Statement stmt = DBAccessParadox.getInstance().getStmt();
String qry =
"SELECT * FROM Varedata";
ResultSet rs = stmt.executeQuery(qry);
ProductsParadox curProduct;
while (rs.next()) {
curProduct = new ProductsParadox();
rc = true;
curProduct.setAmountOnStock(rs.getDouble("P? Lager"));
curProduct.setProductNumber(rs.getString("Nummer"));
curProduct.setUnitPrice(rs.getDouble("Salgspris detail"));
curProduct.setDealerPrice(rs.getDouble("Salgspris forhandler"));
curProduct.setWeight(rs.getDouble("NettoKg"));
curProduct.setReserved(rs.getDouble("Reserveret"));
allArray.add(curProduct);
System.out.println(allArray.size());
if(allArray.size() == 4470)
System.out.println("Stop");
}
stmt.close();
rs.close();
} catch (Exception e) {
e.printStackTrace();
}
return allArray;
}
Its thrown at this specific line:
"while (rs.next())" when i reach product 4470 and there is over 20K+ product
If you need it i can give you the source code and the database so you can try it for yourself. I dont know why it have stopped working, becouse it have been no problem for less than a week ago.
Greetings from Denmark
Bjarne Pedersen
|
It seems that Varedata table has some unexpected data.
ftp site: ftp.hxtt.com
ftp user: anonymous@hxtt.com
ftp password: (empty)
login mode: normal (not anonymous)
ftp port:21
upload directory: incoming
After upload, you can't see that upload file, but it has been upload.
then notify us through webmaster@hxtt.com .
|
Im uploading it now
I have uploaded the entire source incl. the Varedata tables.
You have to change in following classes:
transfer.ToMySql - comment following:
// 1.0 Henter alle varer fra MySQL
Products allMySQLPro = new Products();
log.info("Finder varer fra mysql");
ArrayList mysqlArray = allMySQLPro.findAll();
paradox.DBAccessParadox - change this path:
dbUrl = "jdbc:Paradox:/E:/cdfinans";
I think that is the change what is needed.
I preciate your help very much :)
Bjarne
|
That uploaded file have removed by HXTT at once. Now we have begun to test. Thanks for your patience.
|
That issue is resulted by some invalid lengthes information for a graphics column on null value in your db sample. Supported. BTW, it seems that your sample has more than 20,000 rows, and you're loading all data into ArrayList allArray.
From
>at paradox.ProductsParadox.findAll(ProductsParadox.java:36)
>at transfer.ToMySQL.checkProduct(ToMySQL.java:25)
I guess that you're seeking some rows. You can use "where ...." to limit it since you have built 17 index expressions on that table.
We will delete your data sample from our machine after 24 hour, if we haven't received more report.
Please download the latest JDBC30 package.
|
Cant you tell me excatly where it go wrong so i can dispatch the error to our supplier og the database ??
I have downloaded the last JDBC30 package this morning, but it did not help me.
|
>Cant you tell me excatly where it go wrong so i can dispatch the error to our
> supplier og the database ??
Because about 4 null values in your db samples has invalid lobLength, but that has been supported in the latest package. You needn' to to do special things.
>I have downloaded the last JDBC30 package this morning, but it did not help me.
Yeah. It's updated after received your sample. Please download the latest package.
|
I have now DL the newest package and its working like a charm!!
Thats very fast response on a bug, im very impressed!
Thank you for a extrem good service!
Regards
Bjarne Pedersen
|