2011-07-13 10:28:00,027 ERROR [com.ying.discount.dao.SMSReceiveDao] - <根据短信状态查看短信集合时异常,operror=org.springframework.jdbc.CannotGetJdbcConnectionException: **Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory** (Io 异常: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169870336)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=rac2)(PORT=1521))'))(ERROR=(CODE=305)(EMFI=1)))))>
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io 异常: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169870336)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=rac2)(PORT=1521))'))(ERROR=(CODE=305)(EMFI=1)))))
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io 异常: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169870336)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=rac2)(PORT=1521))'))(ERROR=(CODE=305)(EMFI=1)))))
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:296)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:372)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:380)
at com.ying.discount.dao.SMSSendDaoImpl.findSMSByState(SMSSendDaoImpl.java:98)
at com.ying.discount.service.SmsTaskServiceImpl.execute(SmsTaskServiceImpl.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:270)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:212)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:79)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
Caused by: java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169870336)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=rac2)(PORT=1521))'))(ERROR=(CODE=305)(EMFI=1))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
----------------------------------------------------------------------------------------------------------------------------------------------
异常信息2:
2011-07-13 10:29:00,402 ERROR [com.ying.discount.dao.SMSReceiveDao] - <根据短信状态查看短信集合时异常,operror=org.springframework.jdbc.CannotGetJdbcConnectionException: **Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Error preloading the connection poo**l>
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Error preloading the connection pool
Caused by: org.apache.commons.dbcp.SQLNestedException: Error preloading the connection pool
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1238)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:296)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:372)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:380)
at com.ying.discount.dao.SMSSendDaoImpl.findSMSByState(SMSSendDaoImpl.java:98)
at com.ying.discount.service.SmsTaskServiceImpl.execute(SmsTaskServiceImpl.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:270)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:212)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:79)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
Caused by: java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169870336)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=rac2)(PORT=1521))'))(ERROR=(CODE=305)(EMFI=1))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
坑爹的异常啊:自己疏忽了
oracle 服务器连接拒绝:当服务初始启动的时候钱几分钟一直报这两类异常。原因是服务器中 oracle 版本驱动问题
把 class12.jar 更换成 ojdbc14.jar 即可
Cannot create PoolableConnectionFactory Error preloading the connection pool
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于