| Author |
where to copy classes111.zip in tomcat ?
|
Nash Jetts
Greenhorn
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, " DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); 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); while(rs.next()) { String strName = rs.getString("ENAME"); out.println(strName + "<BR>"); } " ERROR - exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver DBTestServlet.doGet(DBTestServlet.java:38) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
|
Nash Jetts,<br />SCJP 1.4, SCWCD (on-my-way!)
|
 |
Ben Souther
Sheriff
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
Greenhorn
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.
|
 |
 |
|
|
subject: where to copy classes111.zip in tomcat ?
|
|
|