• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java/sql/Savepoint problem

 
Jane Dunne
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like your all the libraries are not on your classpath. Just check it out.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jane Dunne
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic