Link to home
Start Free TrialLog in
Avatar of piou
piouFlag for Greece

asked on

JDBC & JDeveloper

After the failure of a test application, connecting to a remote Oracle database, I am trying to locate the portion of the Java source (generated by JDeveloper 9) that loads the driver and connects to the database. I can find nothing. Is there such code, or does JDev do a lot of hidden work?

I am asking because I also try to connect "manually", and the following line of code throws a NoClassDef... exception.

DriverManager.getConnection("jdbc:oracle:thin:@xxx.xxx.xxx.xxx1521:EKKE8", user, pass);

I am using 1.4.0 and I use ojdbc14_g.jar from Oracle.

Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

>>and the following line of code throws a NoClassDef... exception.

Meaning which class?

If you put the driver jar in all lib\ext directories you should be OK if it's the driver class that's the problem.
Avatar of piou

ASKER

Apologies... the actual error is an error, not an exception:

Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/Savepoint


ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Post the full stack trace.
Avatar of piou

ASKER

This is very strange. I had installed 1.4.0, but now I see that the default jre is 1.3.1! I suspect JDev messed it up. I will reinstall 1.4 and get back.

Avatar of piou

ASKER

indeed CEHJ... Thanks!!
:-)