Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT Paradox
Eception: java.lang.NegativeArraySizeException
Bjarne Pedersen
2006-09-27 00:50:59.0
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
Re:Eception: java.lang.NegativeArraySizeException
HXTT Support
2006-09-27 02:56:21.0
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 .
Re:Re:Eception: java.lang.NegativeArraySizeException
Bjarne Pedersen
2006-09-27 03:30:44.0
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
Re:Re:Re:Eception: java.lang.NegativeArraySizeException
HXTT Support
2006-09-27 03:46:35.0
That uploaded file have removed by HXTT at once. Now we have begun to test. Thanks for your patience.
Re:Re:Re:Re:Eception: java.lang.NegativeArraySizeException
HXTT Support
2006-09-27 04:49:13.0
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.



Re:Re:Re:Re:Re:Eception: java.lang.NegativeArraySizeException
Bjarne Pedersen
2006-09-27 05:18:35.0
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.
Re:Re:Re:Re:Re:Re:Eception: java.lang.NegativeArraySizeException
HXTT Support
2006-09-27 05:28:07.0
>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.

Re:Re:Re:Re:Re:Re:Re:Eception: java.lang.NegativeArraySizeException
Bjarne Pedersen
2006-09-27 05:55:19.0
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

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap