Environment: tomcat6, jdk1.6, Oracle10g, and myeclipse8.6
When a JNDI project is run, an exception occurs: org. Apache. tomcat. DBCP. DBCP. sqlnestedexception: cannot create JDBC driver of class ''for connect URL 'null '.
Solution:
1. Add Oracle driver package ojdbc14_g-10.2.0.1.0.jar under Tomcat 6.0 \ Lib
2. Add the following content to the context. xml file under Tomcat 6.0 \ conf:
<Resource Name = "JDBC/aaa_db" type = "javax. SQL. datasource "username =" test "Password =" 123456 "driverclassname =" oracle. JDBC. driver. oracledriver "maxidle =" 3 "maxwait =" 5000 "url =" JDBC: oracle: thin: @ 192.168.30.99: 1521: orcl "maxactive =" 10 "/>
3. Check whether the configuration in Web. XML in the project is the same as that in context. xml.
<Resource-ref> <description> dB connect </description> <res-ref-Name> JDBC/aaa_db </RES-ref-Name> <res-type> javax. SQL. datasource </RES-type> <res-auth> container </RES-auth> </resource-ref>