This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes where to copy in tomcat ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "where to copy in tomcat ?" Watch "where to copy in tomcat ?" New topic

where to copy in tomcat ?

Nash Jetts

Joined: Apr 22, 2005
Posts: 4
I copied it to <TOMCAT_HOME>/common/lib, but it gives a runtime error during execution of the servlet.

Pasted below is the error - here is the code I am using,
Connection conn =
DriverManager.getConnection("jdbc racle ci8:@database","scott","tiger");
String strQuery = "select * from scott.EMP" ;
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(strQuery);
String strName = rs.getString("ENAME");
out.println(strName + "<BR>");



javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver

Nash Jetts,<br />SCJP 1.4, SCWCD (on-my-way!)
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Try changing the extension from ".zip" to ".jar"

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Nash Jetts

Joined: Apr 22, 2005
Posts: 4
yes it worked !!! I renamed from zip to jar and placed in <TOMCAT_HOME>/common/lib

Thanks Ben!
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
You should probably be using classes12.jar, which is intended for Java 2 applications. See the Oracle documentation.
Have you checked out Aspose?
subject: where to copy in tomcat ?
It's not a secret anymore!