Cannot create JDBC driver of class ” for connect URL ‘null’ Oracle Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Cannot create JDBC driver of class ” for connect URL ‘null’ Oracle without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I know this questions has been asked before but the answers does not addressing the problem in my case.

The answer selected by the user talks about the different approach, With the help of the suggested approach my application is working fine but I am want to do it in below manner.

Wanted to put my JNDI xml file containing db connection details in


and when I am running the tomcat from command prompt It should make a connection with the database. In this case my xml file name is application.xml. Running application from command prompt giving me error as

Cannot create JDBC driver of class '' for connect URL 'null' Oracle

Steps I have tried:

  1. below is the XML file created JNDI resource:


 <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/application" reloadable="false">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="application." suffix=".log" timestamp="true"/>
    <Resource name="jdbc/application" 
    maxActive="20" maxWait ="10000" maxIdle="10"/>             

` with the information

  1. web.xml have a entry for the above resource as

    <description>Connection Pool</description>


  1. Put ojdbc6.jar file in tomcat/lib folder.

I am making sure that I have not put ojdbc6.jar in both tomcat and my project and I am using oracle 12c as a database.


The issue was with the filename. My application WAR name was “TomcatExample.war” and xml name was “tomcatexample.xml” It is case sensitive in tomcat 7 and that is the reason it was not picking up the file. Changes to “TomcatExample.xml” works for me. Thank you so much all for your help. Cheers!!!

We are here to answer your question about Cannot create JDBC driver of class ” for connect URL ‘null’ Oracle - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji