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
  Support
  Download
  Document
  FAQ
  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)

HXTT Text(CSV)
Problem using schemafile
Remco Schoen
2010-05-27 07:14:04
Hello,

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:
"column1";"column2"
"waarde1";"waarde2"
"waarde21";"waarde22"

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:
jdbc:text:/./test.csv?schemaFile=test.csv.schema&_CSV_Separator=\\x3b

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(rs.next()) {

The stacktrace:
Exception in thread "main" java.lang.NegativeArraySizeException
at com.hxtt.global.as.for(Unknown Source)
at com.hxtt.concurrent.k.do(Unknown 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 com.hxtt.sql.c0.new(Unknown Source)
at com.hxtt.sql.c0.next(Unknown Source)
at Main.main(Main.java:57)

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:
jdbc:text:/./test.csv?_CSV_Header=true&_CSV_Separator=\\x3b
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




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap