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)
NoSuchMethodError
Tobin
2008-10-22 13:11:22.0
I'm evaluating the CSV driver, and am getting a NoSuchMethodException. Here's my code:

Class.forName("com.hxtt.sql.text.TextDriver");
String sql = "select * from test";
String url = "jdbc:csv:///" + "/Users/tobin/Desktop/contact list.csv";
Properties props = new Properties();
props.put("_CSV_Header", "true");
Connection conn = DriverManager.getConnection(url, props);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);

while (rs.next()) {
System.out.println(rs.getObject("First Name") + " " + rs.getObject("Last Name") + " - " + rs.getObject("Email sddress"));
}

rs.close();
stmt.close();
conn.close();

And here are the contents of /Users/tobin/Desktop/contact list.csv:

"First Name","Last Name","Email Address"
"Steve","Jobs","steve@apple.com"
"Bill","Gates","bill@microsoft.com"

Finally, here's is the stack trace that I'm getting:

Exception in thread "main" java.lang.NoSuchMethodError: com.hxtt.sql.de.a(ILjava/lang/String;Ljava/util/Properties;)Lcom/hxtt/concurrent/aa;
at com.hxtt.sql.text.EmbeddedDriver.connect(Unknown Source)
at com.hxtt.global.SQLState.getConnection(Unknown Source)
at com.hxtt.sql.HxttDriver.if(Unknown Source)
at com.hxtt.sql.HxttDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at Test.readCSV(Test.java:118)
at Test.main(Test.java:55)

Line 118 of my Text class is the "Connection conn = DriverManager.getConnection(url, props);" line.

What am I doing wrong? Thanks.

Tobin
Re:NoSuchMethodError
HXTT Support
2008-10-22 18:04:52.0
Please check whether you're using more than one kind HXTT package in your classpath. It should be resulted by mixed one old HXTT package with one new HXTT package. You should download those packages on the same day.
Re:Re:NoSuchMethodError
Tobin Juday
2008-10-22 19:40:37.0
Great, that worked. We are also using the Excel driver. Thanks.

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