JDBC-ODBC-Bridge



Hello!

I have an ODBC-Driver under Linux running. Now I need a connection from java to the Database.
I will use the java-odbc-bridge to connect to the server. But 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)

Under Openoffice2 I can connect with the ODBC-Driver to the database, but under java it doesn't work. Also in the console the connection works fine.

Can anyone help me to solve the problem. I don't want to bye a jdbc driver, because it is very expensive and i need only a simple query from the database.
I use ubuntu 5.10 and an openlink odbc-driver.


Best regards
Christian
.



Relevant Pages

  • Re: connecting to a database
    ... so I'm attempting to code it up in java. ... I have no idea how to set up a connection. ... connection to an Access Database that they would be willing to post. ... sql. ...
    (comp.lang.java.programmer)
  • Re: connecting to a database
    ... I have no idea how to set up a connection. ... connection to an Access Database that they would be willing to post. ... throws java. ... sql. ...
    (comp.lang.java.programmer)
  • help in jdbc/jndi/java class
    ... i've created some simple java beans, when i do log in, i forward it to ... servlet where i create LoginDTO object from username and password. ... Database class is meant for database operations like connection, ...
    (comp.lang.java.help)
  • Re: Java and MySql program example ?
    ... > I am trying to learn Java and need an example program with MySql ... > MySql database. ... Database connection established ...
    (comp.lang.java.programmer)
  • java hangs in cron
    ... I have a java program which makes connection to Oracle database to ... If I run this shell script from command line the ...
    (RedHat)