• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java/sql/Savepoint problem

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like your all the libraries are not on your classpath. Just check it out.
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Friends help you move. Good friends help you move bodies. This tiny ad will help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic