在后台可以连接到数据,但是开启Tomcat时出现数据库连接报错,弄了好久不知道什么原因。 10
下面是开启Tomcat报的错:14:56:03,624WARNorg.hibernate.util.JDBCExceptionReporter:100-SQLError:...
下面是开启Tomcat报的错:
14:56:03,624 WARN org.hibernate.util.JDBCExceptionReporter:100 - SQL Error: 0, SQLState: null
14:56:03,634 ERROR org.hibernate.util.JDBCExceptionReporter:101 - Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
)
14:56:03,634 WARN org.hibernate.cfg.SettingsFactory:144 - Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
。。。。 展开
14:56:03,624 WARN org.hibernate.util.JDBCExceptionReporter:100 - SQL Error: 0, SQLState: null
14:56:03,634 ERROR org.hibernate.util.JDBCExceptionReporter:101 - Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
)
14:56:03,634 WARN org.hibernate.cfg.SettingsFactory:144 - Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
。。。。 展开
1个回答
2013-06-26
展开全部
oracle端口写对没?数据库实塌侍例有问题吧!看看端口是团李吵多少,该端口下的sid是哪个,你连接的sid又是哪个!扰氏
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询