Forums Register Login

problem occurs when connecting to thin driver...

+Pie Number of slices to send: Send
Hi friends,
I am trying to load and connect to oracle driver like below... DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");

It works fine in Netbeans IDE but Its not working in Eclipse, the same code.
In Eclipse it throws Exception like this:
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver FirstJdbc.doGet(FirstJdbc.java:23)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I added ojdbc jar file for the library. and it has that OracleDriver class.
I must need to work on Eclipse IDE..Please let me know why?

Thanks,
Chaitanya.
+Pie Number of slices to send: Send
 


java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver FirstJdbc.doGet(FirstJdbc.java:23)



where did you put ojdbc14.jar, you are getting a ServletException so I am assuming that you are loading driver from servlet. place the ojdbc14.jar in web-inf/lib folder.

Thanks,
Shailesh
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1452 times.
Similar Threads
Configuring Tomcat 3.3 with Oracle
where to copy classes111.zip in tomcat ?
Cannot register driver
JSP-database problem
help me deploy my webapp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:09:33.