This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes java/sql/Savepoint problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java/sql/Savepoint problem " Watch "java/sql/Savepoint problem " New topic
Author

java/sql/Savepoint problem

Jane Dunne
Greenhorn

Joined: Feb 14, 2005
Posts: 15
Hi,
I'm trying to run an application that connects to an Oracle server. It runs fine from within JDeveloper. However I need to be able to run it from the command line but when I try to do this I get an error:
java.lang.NoClassDefFoundError: java/sql/Savepoint

I'm using jdk1.4.1 and I have all the Oracle classes/jars I need in my classpath. Any help on this would be greatly appreciated as I have no experience with Oracle or SQL.

Thanks!
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
It sounds like your all the libraries are not on your classpath. Just check it out.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

I had faced same problem some days ago when i changed
my classes12.zip(Oracle JDBC drivers for 8.1.7) to ojdbc14.jar (Oracle JDBC drivers v9.2.0.1)
then I switched back to classes12.zip

hope this add something

Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Jane Dunne
Greenhorn

Joined: Feb 14, 2005
Posts: 15
I actually had both classes12.zip and ojdbc14.jar in my classpath originally. I played around with them a bit, and changed the order of them in the classpath, putting classes12.zip first, followed by ojdbc14.jar. I wasn't aware that the order of classes in a classpath made any difference, but this seemed to work and I no longer have the error. So thanks!
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Are you sure you're running with 1.4 from the command line? Check using java -version.

What's up with ojdbc14.jar and classes12.zip from Oracle 9.2 driver readme:

New classes file name for JDK 1.4 and beyond
Beginning with this release the classes files for JDK 1.4 and
beyond will be named ojdbc<jdk ver>.jar. So, the classes file for
JDK 1.4 is named ojdbc14.jar. The names for the JDK 1.1
and 1.2 classes files will not be changed. We will not provide
.zip versions of the classes files beyond JDK 1.2.


classes12.zip support the concept of savepoints using an oracle extension so it doesn't require java.sql.Savepoint. ojdbc14.jar uses java.sql.Savepoint:

Savepoints--Savepoints are supported in ojdbc14.jar. They are also
supported in classes12 and classes11 via Oracle extensions. The
extensions are forward compatible with ojdbc14.jar. See the
JavaDoc for more details.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

Originally posted by Jane Dunne:
but this seemed to work and I no longer have the error. So thanks!


good to know that this worked !


shailesh
[ April 01, 2005: Message edited by: Shailesh Chandra ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java/sql/Savepoint problem
 
Similar Threads
Save point in Java Transactions
Is it hard to use SQL Server with Java?
I have name of a savepoint, can i rollback to that savepoint?
DatabaseConnection
PB using Jenny with Oracle DB