Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

I created a web application with ojdbc14.jar in lib folder.

However, when I start my tomcat I get an error:

Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

While it exists there!

When I deploy the same application to my local tomcat in Eclipse it works fine.

However when I deploy it out of Eclipse I get this message, although the jar exists!

EDITED

I refer to it also from the context.xml under META-INF folder:

<WatchedResource>WEB-INF/web.xml</WatchedResource>
     <Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" />
     <Resource name="jdbc/testDS1" auth="Container" type="javax.sql.DataSource"
               maxActive="15" maxIdle="2" maxWait="10000"
               logAbandoned="true"
               username="cust" password="cust"
               driverClassName="oracle.jdbc.OracleDriver"
               url="jdbc:oracle:thin:@myserver:id:name"/>
like image 768
Dejell Avatar asked Feb 21 '11 12:02

Dejell


1 Answers

Are you sure it exists inside webapps/yourapp/WEB-INF/lib folder? It is bound to throw that exception if it can't be seen in that specific directory.

How do you deploy out of eclipse? Do you export a WAR file and deploy? Verify that your WAR file contains ojdbc14.jar in the specified location.

like image 98
adarshr Avatar answered Sep 28 '22 10:09

adarshr