1、报错 :Caused by: java.sql.SQLException: 调用中无效的参数

自己创建工程连接数据库时,一直报错

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (调用中无效的参数)

	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225) ~[commons-dbcp-1.2.2.jar:1.2.2]
	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) ~[commons-dbcp-1.2.2.jar:1.2.2]
	at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113) ~[spring-2.5.6.jar:2.5.6]
	at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:210) ~[spring-2.5.6.jar:2.5.6]
	... 47 common frames omitted
Caused by: java.sql.SQLException: 调用中无效的参数

	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) ~[ojdbc14-10.2.0.1.0.jar:Oracle JDBC Driver version - "10.2.0.3.0"]
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) ~[ojdbc14-10.2.0.1.0.jar:Oracle JDBC Driver version - "10.2.0.3.0"]

各种排查,查看参数配置propeties没有问题,datasource.xml类加载也没有问题,最后才发现xml中没有配


		
		
		
		
		
		
	

username和password没有写,这个文件直接拷贝之前的,没有检查,给自己挖了坑,记下来以后注意哈!

你可能感兴趣的:(Bug集合)