Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver]

在用spring框架连接JDBC数据库时
发生如下错误:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]:
Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException;
nested PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException:
Property 'driverClassName' threw exception; nested exception
is java.lang.IllegalStateException: Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver]

错误原因:
未导入数据库ojdbc6.jar包或ojdbc14.jar包

你可能感兴趣的:(spring)