Hi,
I'm using the dbf and access drivers together, dbf version 2.2.017 and access version 1.1.0.32. See full manifest.mf files at the end.
If I have both drivers in the class path and run the sample code below, I get
Exception in thread "main" java.lang.VerifyError: (class: com/hxtt/sql/dbf/Embed
dedDriver, method: connect signature: (Ljava/lang/String;Ljava/util/Properties;)
Ljava/sql/Connection;) Incompatible argument to function
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
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:193)
at ConnectToFoxPro.selectTopData(ConnectToFoxPro.java:53)
at ConnectToFoxPro.main(ConnectToFoxPro.java:32)
I I have only the dbf driver, it works.
Sample code:
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("com.hxtt.sql.dbf.DBFDriver");
String tableName = "sample.dbf";
String sqlQuery = "select * from " + tableName;
String url = "jdbc:dbf:/e:\\work\\projects\\foxpro\\FoxproODBC\\";
ResultSet resultSet = DriverManager.getConnection(url).createStatement().executeQuery(sqlQuery);
System.out.println("Column Count : " + resultSet.getMetaData().getColumnCount());
}
The java command is like: java -cp Access_JDBC30.jar;DBF_JDBC30.jar;classes\ Main
Thank you in advance,
Andrei
Manifest MF files:
Manifest-Version: 1.0
Created-By: HXTT Version Robot
Main-Class: com.hxtt.sql.admin.Admin
Name: com/hxtt/sql/dbf/
Specification-Title: HXTT DBF JDBC 3.0 Package For Evaluation Purpose
Implementation-Title: com.hxtt.sql.dbf
Specification-Version: 2.2.017 on April 07, 2006
Specification-Vendor: Hongxin Technology & Trade Ltd.
Comment: JDBC 3.0 Package for Xbase database
Implementation-Version: 2.2.017 on April 07, 2006
Implementation-Vendor: Hongxin Technology & Trade Ltd.
Implementation-URL: http://www.hxtt.com/dbf.html
Name: com/hxtt/sql/admin/
Specification-Title: HXTT Database Admin
Implementation-Title: com.hxtt.sql.admin
Specification-Vendor: Hongxin Technology & Trade Ltd.
Specification-Version: 0.5 on April 07, 2006
Comment: HXTT Database Admin
Implementation-Version: 0.5 on April 07, 2006
Implementation-Vendor: Hongxin Technology & Trade Ltd.
Implementation-URL: http://www.hxtt.com/dbf/dbadmin.html
---------------------------------
Manifest-Version: 1.0
Created-By: HXTT Version Robot
Main-Class: com.hxtt.sql.admin.Admin
Name: com/hxtt/sql/admin/
Specification-Title: HXTT Database Admin
Implementation-Title: com.hxtt.sql.admin
Specification-Vendor: Hongxin Technology & Trade Ltd.
Specification-Version: 0.5 on May 08, 2006
Comment: HXTT Database Admin
Implementation-Version: 0.5 on May 08, 2006
Implementation-Vendor: Hongxin Technology & Trade Ltd.
Implementation-URL: http://www.hxtt.com/dbf/dbadmin.html
Name: com/hxtt/sql/access/
Specification-Title: HXTT Access JDBC 3.0 Package
Implementation-Title: com.hxtt.sql.access
Specification-Version: 1.1.032 on May 08, 2006
Specification-Vendor: Hongxin Technology & Trade Ltd.
Comment: JDBC 3.0 Package for Microsoft Access
Implementation-Version: 1.1.032 on May 08, 2006
Implementation-Vendor: Hongxin Technology & Trade Ltd.
Implementation-URL: http://www.hxtt.com/access.html
|
Forgot to mention, java version is
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
|
>Specification-Version: 2.2.017 on April 07, 2006
>Specification-Version: 1.1.032 on May 08, 2006
You should use DBF 2.2.031 on May 08, 2006 too.
You can visit hxtt site, and download the latest packages: DBF 2.2.032 on May 10, 2006 an Access 1.1.033 on May 10, 2006.
|
Thx a lot, that did it. It works now.
Andrei
|