• Post Reply Bookmark Topic Watch Topic
  • New Topic

ERROR : oracle.jdbc.driver.OracleDriver  RSS feed

 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to make jdbc connection through servlets but i am getting this error ERROR : oracle.jdbc.driver.OracleDriver....
please help
 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Oracle connector is not in the class path check that
 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oracle connector is there in the class path...please help
 
omkar patkar
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kindly post complete stack trace !
 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am trying to connect to database using servlet
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
dbConnection = DriverManager.getConnection("jdbcracle:thin:@localhost:1521:vikasp","scott","tiger");
Statement stmt = dbConnection.createStatement();

ResultSet rset = stmt.executeQuery ("SELECT password FROM usernames");

while (rset.next()) {
System.out.println("usernames = " + rset.getString(1));

}

but i am getting error
ERROR : oracle.jdbc.driver.OracleDriver....
this is the only error
please help


 
Jhakda Velu
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Please post the complete error message instead of
ERROR : oracle.jdbc.driver.OracleDriver....


Have you added it as part of your web app or to system path?
As you said that you are having DB connection code as part of your servlet, the driver should part of your web app or your container's lib(it will be accessible to all apps then). Having it as part of system path won't help.
Also, DB connection part should not be part of your servlet code.

Jhakda
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66152
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vikas Patil wrote:oracle connector is there in the class path...please help

It is not. If it were, you would not be getting the message.
 
James Byars
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please remember that Tomcat does not use the CLASSPATH of your system, it has it's own CLASSPATH.

I was getting this exact error until someone pointed it out to me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!