title: cannot create jdbc driver of class '' for connect url 'null' postgresql
body: <p>I'm getting this error when I try to deploy my WAR application.</p>
  
  <pre><code>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of cla
  ss '' for connect URL 'null'
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
  asicDataSource.java:1452)
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
  aSource.java:1371)
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSo
  urce.java:1044)
          at kimet.ConexionSQL.getConexion(ConexionSQL.java:20)
          at kimet.Global.cargarHashtablesAux(Global.java:2360)
          at kimet.Inicio.init(Inicio.java:33)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
  java:1206)
          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:10
  26)
          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
  t.java:4421)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
  734)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
  .java:799)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
  9)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
  
          at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
  
          at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778
  )
          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504
  )
          at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
  :324)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
  eSupport.java:142)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
  
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
  
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463
  )
          at org.apache.catalina.core.StandardService.start(StandardService.java:5
  25)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:754
  )
          at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
  Caused by: java.lang.NullPointerException
          at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
          at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
          at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
          at java.sql.DriverManager.getDriver(DriverManager.java:253)
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
  asicDataSource.java:1437)
          ... 31 more
  org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of cla
  ss '' for connect URL 'null'
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
  asicDataSource.java:1452)
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
  aSource.java:1371)
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSo
  urce.java:1044)
          at kimet.ConexionSQL.getConexion(ConexionSQL.java:20)
          at kimet.Global.cargarHashtablesAux(Global.java:2360)
          at kimet.Inicio.init(Inicio.java:33)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
  java:1206)
          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:10
  26)
          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
  t.java:4421)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
  734)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
  .java:799)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
  9)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
  
          at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
  
          at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778
  )
          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504
  )
          at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
  :324)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
  eSupport.java:142)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
  
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
  
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463
  )
          at org.apache.catalina.core.StandardService.start(StandardService.java:5
  25)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:754
  )
          at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
  Caused by: java.lang.NullPointerException
          at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
          at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
          at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
          at java.sql.DriverManager.getDriver(DriverManager.java:253)
          at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
  asicDataSource.java:1437)
          ... 31 more
  --- Inicializado KimetSport  --- Thu Apr 25 11:16:13 CEST 2013
  25-abr-2013 11:16:13 org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Despliegue del directorio docs de la aplicaci¾n web
  25-abr-2013 11:16:13 org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Despliegue del directorio examples de la aplicaci¾n web
  25-abr-2013 11:16:14 org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Despliegue del directorio ROOT de la aplicaci¾n web
  25-abr-2013 11:16:14 org.apache.coyote.http11.Http11AprProtocol start
  INFO: Arrancando Coyote HTTP/1.1 en puerto http-8080
  25-abr-2013 11:16:14 org.apache.coyote.ajp.AjpAprProtocol start
  INFO: Arrancando Coyote AJP/1.3 en ajp-8009
  25-abr-2013 11:16:14 org.apache.catalina.startup.Catalina start
  INFO: Server startup in 4540 ms
  </code></pre>
  
  <p>I show you the files I've modified:</p>
  
  <p>At the beginning, in the Tomcat's context.xml file:</p>
  
  <pre><code>&lt;Context reloadable="true" privileged="true"&gt;
      &lt;!-- Default set of monitored resources --&gt;
      &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>In the web.xml file:</p>
  
  <pre><code>&lt;resource-ref&gt;
      &lt;!-- &lt;description&gt;DB Kimet&lt;/description&gt; --&gt;
      &lt;res-ref-name&gt;modulo/KIMET&lt;/res-ref-name&gt;
      &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
      &lt;res-auth&gt;Container&lt;/res-auth&gt;
      &lt;!-- &lt;res-sharing-scope&gt;Shareable&lt;/res-sharing-scope&gt; --&gt;
  &lt;/resource-ref&gt;
  </code></pre>
  
  <p>Finally, I've created my own xml file "aKS.xml" in the directory "conf\Catalina\localhost"</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
      &lt;Context crossContext="true" displayName="Kimet Sport" docBase="C:/Workarea/kimetsportweb/WebContent" path="/aKS" reloadable="true"&gt;
      &lt;Resource name="modulo/KIMET"
      auth="Container"
      type="javax.sql.DataSource"
      factory="org.apache.commons.dbcp.BasicDataSourceFactory"
      defaultAutoCommit="false"
      removeAbandoned="false"
      removeAbandonedTimeout="30"
      maxActive="50"
      maxIdle="20"
      maxWait="10000"
      username="usukimet"
      password="usukimet"
      driverClassName="org.postgresql.Driver"
      url="jdbc:postgresql://192.168.1.169:5432/kimet_desarrollo"/&gt;       
  &lt;/Context&gt;
  </code></pre>
  
  <p>Anybody has some idea why is not working?
  Any suggestion will be welcomed!
  Thanks in advance!</p>