• Post Reply Bookmark Topic Watch Topic
  • New Topic

tomcat error "oracle driver not found"

 
Mahesh Pinnamaneni
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai buddies,
i have an jsp page which just gets details of employee from oracle 9i's emp table.i have used Bean to get the connection.i called the getcon() method in bean from jsp page.i think i am getting an error here by looking at the tomcat's error report page.it is giving :-
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
conn.Conn.getCon(Conn.java:36)

what i have to do now?

plz help me.
thanks and regards,
Mahesh
 
Sheldon Fernandes
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like your JDBC driver classes are not in the classpath. You need to add this to $CATALINA_HOME/common/lib.

Extract from JNDI Datasource HOW-TO
These jar files along with your the jar file for your JDBC driver should be installed in $CATALINA_HOME/common/lib.
NOTE:Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds $CATALINA_HOME/common/lib/*.jar to the classpath.
NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib.


Also note the following (also from the site)
Tomcat will only use *.jar files installed in $CATALINA_HOME/common/lib therefore classes111.zip or classes12.zip will need to be renamed with a .jar extension. Since jarfiles are zipfiles, there is no need to unzip and jar these files - a simple rename will suffice. Also, you should be aware that some (early) versions of Tomcat 4.0 when used with JDK 1.4 will not load classes12.zip unless you unzip the file, remove the javax.sql.* class heirarchy and rejar


Sheldon Fernandes
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!