在后台可以连接到数据,但是开启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
。。。。
展开
 我来答
匿名用户
2013-06-26
展开全部
oracle端口写对没?数据库实塌侍例有问题吧!看看端口是团李吵多少,该端口下的sid是哪个,你连接的sid又是哪个!扰氏
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式