Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class Not Found exception connecting to Oracle

 
selvi family
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is my JSP code to connet oracle DB.

Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbcracle:thin:@testdb:1521:mkmlr10",
"users","install");

I have renamed the classes.zip file as classes.jar and placed it under C:\tomcat\common\lib. - is it correct?
Or do I place it under WEB_INF\classes ?

I got the ClassNotFound exception...

please update me ....

selvi

[edited to disable smilies]
[ December 04, 2004: Message edited by: Jeanne Boyarsky ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35266
383
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Selvi,
Welcome to JavaRanch!

Your jar is in the right place. Things that are part of the application go in WEB-INF. Things used by the server go in the tomcat directory.

I think the jar might be misnamed. Oracle traditionally calls its driver classes12.jar. Another thing is to try unzipping the jar into a temporary directory and making sure it has the file you are loading.
 
parvesh sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Selvi,

Try, placing the classes12.zip in WEB-INF/lib directory.

Hope this resolves the problem

Parvesh.
 
selvi family
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Will try both the instructions...Get back to u....

Thanks !!


selvi
 
selvi family
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes...

I have placed classes12.jar underWEB-INF\lib

My problem is solved....

thanks...


selvi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic