Thrown when running Jndi project: Org.apache.tomcat.dbcp.dbcp.SQLNestedException:Cannot Create JDBC driver of class ' for connect URL ' null ' Abnormal
Workaround:
1. Join the Oracle driver package under Tomcat 6.0\lib Ojdbc14_g-10.2.0.1.0.jar
2. In the context.xml file under Tomcat 6.0\conf, add
[JavaScript]View Plaincopy
- <resource
- Name="jdbc/aaa_db"
- Type="Javax.sql.DataSource"
- Username="Test"
- password="123456"
- Driverclassname="Oracle.jdbc.driver.OracleDriver"
- maxidle="3"
- maxwait="The "
- Url="JDBC:ORACLE:THIN:@192.168.30.99:1521:ORCL"
- Maxactive="Ten"/>
3. Check whether the configuration in Web. XML in the project is the same as the Context.xml instance name
[JavaScript]View Plaincopy
- <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>
Sqlnestedexception:cannot Create JDBC driver of class ' for connect URL ' null ' workaround