Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  Buy Now
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
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
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

Problem using schemafile
Remco Schoen
2010-05-27 07:14:04

I get an java.lang.NegativeArraySizeException when I use the csv file below. I think it is because the _CSV_Separator isn't used. Am I doing something wrong?

I have this in file test.csv:

I use this as a schema in the file test.csv.schema:
create table test.csv ("column1" longvarchar, "column2" longvarchar)

And I use this as the url:

When I iterate over the results of the table with this construction, I get an exception when I call rs.getNext().

ResultSet rs = stmt.executeQuery("select * from test.csv");
while( {

The stacktrace:
Exception in thread "main" java.lang.NegativeArraySizeException
at Source)
at Source)
at com.hxtt.sql.text.l.else(Unknown Source)
at com.hxtt.sql.text.l.a(Unknown Source)
at com.hxtt.sql.text.l.a(Unknown Source)
at com.hxtt.sql.ct.a(Unknown Source)
at com.hxtt.sql.ep.a(Unknown Source)
at com.hxtt.sql.dp.a(Unknown Source)
at com.hxtt.d.k.a(Unknown Source)
at com.hxtt.sql.di.a(Unknown Source)
at Source)
at Source)
at Main.main(

With kind regards,

Remco Schoen
Re:Problem using schemafile
HXTT Support
2010-05-27 08:01:13
Failed to recur you issue. Please download the latest package to see whether your issue can recur. BTW, your csv is simple, and you can omit schema file, and use the following jdbc url:
Re:Re:Problem using schemafile
Remco Schoen
2010-05-28 05:16:33
I downloaded the latest version and it now works as expected.

This was just a simple test-case to test it with the schema-file, because we want to be able to overrule when the type-quessing guesses the wrong-type.

Search Key   Search by Last 50 Questions


Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap