Myeclipse开发:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor.开发环境:Myeclipse 6.5,Tomcat 5.5,oracle 10g,数据库服务器在IP为192.168.10.10的机子上,用户为:username.密码是:password,数

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/28 00:01:11
Myeclipse开发:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor.开发环境:Myeclipse 6.5,Tomcat 5.5,oracle 10g,数据库服务器在IP为192.168.10.10的机子上,用户为:username.密码是:password,数
xU[OG+#%ܵj- JT)$&R&;17'$r$mU5M0vgwNsUEJ=s\9goDyT Ύ >utf;7Ft G#.@zsb ZEm6(@%sȴlչ59ɭI4, KƱN eK`y/ݔr}w8}ѡ>rYxߘM7v}PpރƝB8F佻3Iq]zLqE 'gwɛ`j'On(¦=R( 򌗴Y UIo2G.qAJm؎)5(.Rү(VūIY84 $$и)ʱlQMczc7 ;a@R\q*,阖+Ύ\ުX~)B{ ؽWB"PH@+P#Ό~A"X8\;X/[fYP(6r b>,U0BMXoJ8 5ԯW\B#rh3 fp)̌h:iVhPEFY%#'Z9,4Eٴ_fh 2UXo,Ð < g"_5𔦷c[s!xY.ދ6g/I(\ؖ {q `#2>;QO.m߁߰6F3ި#q

Myeclipse开发:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor.开发环境:Myeclipse 6.5,Tomcat 5.5,oracle 10g,数据库服务器在IP为192.168.10.10的机子上,用户为:username.密码是:password,数
Myeclipse开发:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor.
开发环境:Myeclipse 6.5,Tomcat 5.5,oracle 10g,数据库服务器在IP为192.168.10.10的机子上,用户为:username.密码是:password,数据库实例为:test.
启动Tomcat时报错,错误信息如下:
[main] ERROR:org.hibernate.util.JDBCExceptionReporter#logExceptions :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
The Connection descriptor used by the client was:
localhost:1521:mydb
)
(16 ms) [main] WARN :org.hibernate.cfg.SettingsFactory#buildSettings :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
The Connection descriptor used by the client was:
localhost:1521:mydb
)
我在content.xml中的配置如下:
name="orcl"
type="javax.sql.DataSource"
maxActive="20"
maxIdle="2"
username="username"
maxWait="500000"
validationQuery="select 1 from dual"
driverClassName="oracle.jdbc.driver.OracleDriver"
password="password"
url="jdbc:oracle:thin:@192.168.10.10:1521:test"/>
而且本机上也没有mydb的用户
请问是什么原因引起的?应该怎么解决?
而在另外一台机子上一样的项目文件,却没有报出这个错误……

Myeclipse开发:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor.开发环境:Myeclipse 6.5,Tomcat 5.5,oracle 10g,数据库服务器在IP为192.168.10.10的机子上,用户为:username.密码是:password,数
碰到过这种问题,改listener.ora 试试是否能解决.
解决方法:
打开Oracle的 listener.ora 文件:
(我的目录 oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora)
可参照参考资料: