• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

database connection in jsp of type 4 driver

 
joseph prabhu
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
 
Gayathri Chowduru
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
 
wang jiajian
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic