Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC Error

2 views
Skip to first unread message

andre

unread,
Oct 15, 2003, 2:21:12 PM10/15/03
to
I'm am trying to connect to an oracle database. I have dowloaded the
classes12.zip file for oracle 8.1.7 (the version which I am presently
using).

The following code is creating the problem (note that the service,
username and password that are being set in the properties are
correct):

Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin@" +
System.getProperty("db0.service"),
System.getProperty("db0.username"),
System.getProperty("db0.password")

The following is the stack trace of an error I am getting

java.lang.NullPointerException
at oracle.jdbc.ttc7.O3log.marshal(O3log.java:592)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:246)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at cb.bims.db.utils.DBConnection.connect(DBConnection.java:25)
at TestDB.main(TestDB.java:21)

Any help would be greatly appreciated. Thank you.

Chris Smith

unread,
Oct 15, 2003, 2:39:42 PM10/15/03
to
andre wrote:
> I'm am trying to connect to an oracle database. I have dowloaded the
> classes12.zip file for oracle 8.1.7 (the version which I am presently
> using).
>
> The following code is creating the problem (note that the service,
> username and password that are being set in the properties are
> correct):

Hmm... I just did a Google search on some sections from your exception,
and here's a page that discusses what appears to be this same problem,
and the page describes a solution (though the author isn't very good at
explaining what happened). It looks like it might be related to either
applet security preventing a network connection to the server, or
something in the listener configuration for the Oracle install.

> http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20635891.html

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

0 new messages