• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

database connection in jsp of type 4 driver

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have jtds driver. i have a jar file placed inside the lib folder which is in web-inf folder ,but
Class.forName("net.sourceforge.jtds.jar.jdbc.Driver");
or
Class.forName("net.sourceforge.jtds-1.2.1.jar.jdbc.Driver");
gives ClassNotFoundException

can any help me
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey

what is this Class.forName("net.sourceforge.jtds-1.2.1.jar.jdbc.Driver");
???

That is not correct. Try with

Class.forName("net.sourceforge.jtds.jdbc.Driver");

before this to do, you should add the jtds-1.2.1.jar file to library in your project.

If you don't have where to download the jtds-1.2.1.jar , just go to this link and download the zip, find out the jar file after extraction.

http://sourceforge.net/project/showfiles.php?group_id=33291
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check your system variable and make sure your classpath is right.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!