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

38,888

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.

Share:
38,888
Dejell
Author by

Dejell

I like traveling around the world. So far I have been to: USA England Italy Slovania Croatia Jordan South Africa Zimbabwe Botswana France Canada Israel Thailand Switzerland Holland Bulgaria I am going to Vietnam soon

Updated on April 27, 2020

Comments

  • Dejell
    Dejell about 4 years

    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"/>