jdbc-odbc-bridge
Hello!
I try to connect to a database with jdbc-odbc-bridge under linux. The odbc-connection are built on in the console, but i can't connect with my java application. The following code i will use to connect to the database:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String URL = "jdbc:odbc:hyplog";
Connection c = DriverManager.getConnection(URL);
return c;
I get the following error:
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:525)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at ProConnection.getConnection(ProConnection.java:14)
at testmain.main(testmain.java:12)
I have no other possibility to connect to the server. Under windows the connection works fine, but under linux it doesn't. The connection under the linux console works, also the odbc-connection under openoffice2.
Can anyone help me to connect to the database.
Best regards