Sunday, 29 September 2013

even with ojdbc14.jar in Build Path, Class.forName("oracle.jdbc.driver.OracleDriver") gets ClassNotFoundException

even with ojdbc14.jar in Build Path,
Class.forName("oracle.jdbc.driver.OracleDriver") gets
ClassNotFoundException

I'm trying to make an servlets application with java and oracle10g and
I've had it well so far until I need some specific values from some the
database, for wich I have a DAO class that handles the connection for
retrieving data. I have the following issue.
First off, I excecute a main() method in this class that is suposed to
retrieve all entries in some table an print the name of each one in
console. I works perfectly.
then I want to return an ArrayList of all those names in order to use them
in the servlet. So I make a method just like the one in the main() with
the only difference that instead of printing the names, I add each one to
an ArrayList which is returned after closing the conection. Well, It gets
ClassNotFoundException in the line
Class.forName("oracle.jdbc.driver.OracleDriver")
If it helps, I'm guided with this tutorial to connect java applications to
oracle databases.
Any help would be appreciated

No comments:

Post a Comment