Tomcat启动时,加载applicationContext.xml文件,我
实现ServletContextListener String dbType = props.getProperty("db.type");

String dbIP = props.getProperty("db.ip");
String dbName = props.getProperty("db.name");
String dbPort = props.getProperty("db.port");

String dbUser = props.getProperty("db.username");
String dbPwd = props.getProperty("db.password");

System.setProperty("jdbc.username", dbUser);
System.setProperty("jdbc.password", dbPwd);

if (dbType.equalsIgnoreCase("ORACLE")){
System.setProperty("jdbc.driverClassName",
"oracle.jdbc.OracleDriver");
System.setProperty("jdbc.url", "jdbc:oracle:thin:@" + dbIP + ":"
+ dbPort + ":" + dbName);
System.setProperty("hibernate.dialect",
"org.hibernate.dialect.Oracle9Dialect");
}<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.driverClassName}"/>
<property name="jdbcUrl" value="${jdbc.url}"/>
<property name="user" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
启动Tomcat时报以下错误,org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txAdvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/conf/applicationContext-hibernate.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClass' threw exception; nested exception is java.beans.PropertyVetoException: Could not locate driver class with name '${jdbc.driverClassName}'.
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/conf/applicationContext-hibernate.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClass' threw exception; nested exception is java.beans.PropertyVetoException: Could not locate driver class with name '${jdbc.driverClassName}'.
Caused by: 
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'driverClass' threw exception; nested exception is java.beans.PropertyVetoException: Could not locate driver class with name '${jdbc.driverClassName}'.
Caused by: 
java.beans.PropertyVetoException: Could not locate driver class with name '${jdbc.driverClassName}'.