Error to Read Excel for Unix

Hi,

I develop one class for read the sheet Excel and write one table Oracle.

The Class go perfectly i in Windows XP but in Unix go error :

Exception in thread "main" java.lang.NullPointerException

at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)

at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)

at java.sql.DriverManager.getConnection(DriverManager.java:512)

at java.sql.DriverManager.getConnection(DriverManager.java:171)

at src.GestioneXLS.inserisciFlussi(GestioneXLS.java:108)

at src.GestioneXLS.elaboraFile(GestioneXLS.java:91)

at src.GestioneXLS.esegui(GestioneXLS.java:53)

at src.ContestMain.main(ContestMain.java:29)

The code is :

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

//Connect to Excel DSN

System.out.println(nomeFile.getPath());

//Statement 108

Connection connection = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ="+nomeFile.getPath()+";DriverID=22;READONLY=false","","");

Statement st=connection.createStatement();

You can Help me ?

thank..

[1161 byte] By [lele63a] at [2007-11-27 10:48:36]
# 1

The unix machine doesn't have an odbc driver for excel, therefore the jdbc odbc [bridge] driver can't read the document.

dcmintera at 2007-7-28 22:28:16 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2

Thank,

but I can create ARJ with the jdb odbc driver Windows and place it in the library of my project in Unix ?

lele63a at 2007-7-28 22:28:16 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

No. The JdbcOdbc driver translates between the JDBC library (Java) and the ODBC library (C or C++ most likely). You can't take an ODBC driver from Windows and run it on Unix.

dcmintera at 2007-7-28 22:28:16 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4

Thank,

do jou know something that resolve this problem ?

lele63a at 2007-7-28 22:28:16 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

Use JExcel (which you can Google for)?

masijade.a at 2007-7-28 22:28:16 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...