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
  HXTT Text(CSV) v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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 Text(CSV)
Getting ArrayIndexOutOfException while using "DISTINCT" Keyword
Harry
2015-03-11 22:57:55.0
Hi Team - I am getting ArrayIndexOutOfException while using "DISTINCT" keyword . However getting correct result if I don't use DISTINCT keyword . Can you please let me know if I am doing anything wrong .

Connection String used is :

jdbc:Text:///C://MyData//Files/?_CSV_Header=true;maxScanRows=-1
Re:Getting ArrayIndexOutOfException while using
Harry
2015-03-12 05:21:37.0
Also to mention that I have tried using both Text_JDBC30.jar and Text_JDBC40.jar as I am trying this with JDK 1.6
Re:Re:Getting ArrayIndexOutOfException while using
HXTT Support
2015-03-13 05:43:20.0
What's your DISTINCT sql and exception message?
Re:Re:Re:Getting ArrayIndexOutOfException while using
Harry
2015-03-13 06:15:48.0
Hi Team,

I am using below query :

select distinct id from employee

Note : employee.csv is the filename of the csv file used and id is a column in employee.csv .

The exception which I am getting is :

java.lang.ArrayIndexOutOfBoundsException


Below is the StackTrace of the code :

Mar 13, 2015 7:38:20 PM myproject.data.ExecuteSQLQueries executeFlatFileQueries
INFO: Unable to execute the SQL Statement : java.lang.ArrayIndexOutOfBoundsException: 1
java.lang.ArrayIndexOutOfBoundsException: 1
at com.hxtt.c.d.a(Unknown Source)
at com.hxtt.sql.text.h.a(Unknown Source)
at com.hxtt.sql.at.a(Unknown Source)
at com.hxtt.sql.c7.a(Unknown Source)
at com.hxtt.sql.ff.try(Unknown Source)
at com.hxtt.sql.ff.new(Unknown Source)
at com.hxtt.sql.d1.a(Unknown Source)
at com.hxtt.sql.de.try(Unknown Source)
at com.hxtt.sql.de.next(Unknown Source)
at myproject.data.ExecuteSQLQueries.executeFlatFileQueries(ExecuteSQLQueries.java:31)
at myproject.data.TestData.main(TestData.java:13)


TestData.java is the code where main() method is there and ExecuteSQLQueries.java contains the logic to retreive the data from ResultSet which is exactly same as shown as JDBC 3 Demo in this website .

Note : The issue is happening only with distinct keyword . If I don't use distinct it's working fine . However I have to fetch distinct records for my work .

Thanks
Harry
Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
HXTT Support
2015-03-13 15:27:58.0
Fixed. Please redownload it.
Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
Harry
2015-03-14 00:05:56.0
Thanks for fixing the issue . But still queries to fetch large amount of records are not working ( Table has close to 1 mn records ) . The query is not failing , but it's taking indefinite period of time . I waited for almost 2 hrs for the result , but there were no outcome .

jdbc:Text:///C://MyData//Files/?_CSV_Header=true;_CSV_Quoter=\";maxScanRows=-1;readOnlyMode=true

select * from employee;

Also I am using DISTINCT and LEFT JOIN to join 2 other tables who also have clode to half million records .

Please suggest .
Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
Harry
2015-03-14 00:12:00.0
Also to mention that , in earlier verison those complex queries and queries like "select * from employee" where large data were present were working fine without distinct keyword > I was geeting results by 2-3 minuits . Can you please look into this.
Re:Re:Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
HXTT Support
2015-03-14 00:23:23.0
Whether "select * from employee" in the latest package is slower too much than the earlier verison?
Re:Re:Re:Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
Harry
2015-03-14 01:04:46.0
Yes . In latest version it's too slow to get any result .
Re:Re:Re:Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
Harry
2015-03-14 01:10:15.0
Also along with select I am using trim , left join internally . Can you please simulate at your end .
Re:Re:Re:Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
HXTT Support
2015-03-15 09:13:29.0
Please download the latest package.
Re:Re:Re:Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
Harry
2015-03-15 09:48:50.0
The result is almost same . I have executed the long running query . ALready 10 mins over and there are no results.
Re:Re:Re:Re:Re:Re:Re:Re:Getting ArrayIndexOutOfException while using
HXTT Support
2015-03-16 03:30:56.0
Try
jdbc:Text:///C://MyData//Files/?_CSV_Header=true;_CSV_Quoter=\";maxScanRows=100;readOnlyMode=true;delayedClose=100
If failed, please show us your join sql.

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