TSAIP] [ERROR] 2012-03-28 12:58:31,328  org.hibernate.util.JDBCExceptionReporter(JDBCExceptionReporter.java:78) -5860 [main]  - 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:orcl [TSAIP] [ERROR] 2012-03-28 12:58:33,468  org.hibernate.util.JDBCExceptionReporter(JDBCExceptionReporter.java:78) -8000 [main]  - 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:orcl [TSAIP] [ERROR] 2012-03-28 12:58:33,468  org.hibernate.util.JDBCExceptionReporter(JDBCExceptionReporter.java:78) -8000 [main]  - 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:orcl [TSAIP] [ERROR] 2012-03-28 12:58:33,609  org.springframework.web.context.ContextLoader(ContextLoader.java:215) -8141 [main]  - Context initialization failed
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'menuInit' defined in file [C:\Tomcat 6.0\webapps\AWMonitor\WEB-INF\classes\com\rx\security\servlet\menuInit.xml]: Invocation of init method failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; 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:orcl
; nested exception is 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
The Connection descriptor used by the client was:
localhost:1521:orcl

解决方案 »

  1.   

    数据连接连不上啊
    确定地址或端口或SID没错?
      

  2.   

    找到报错信息+Google一下,多查查
      

  3.   

    localhost:1521:orcl
    这就很明显了!!自己去找找原因。。什么都帖出来问 有意思?
      

  4.   

    检查一下你的oracl包有没有导入,再查一查你的url和driver有没有写正确;
      

  5.   

    这是我的数据库连接配置:
    driverClass=oracle.jdbc.driver.OracleDriver
    maxIdleTime=30000
    maxPoolSize=10
    minPoolSize=1
    jdbcUrl=jdbc\:oracle\:thin\:@192.168.1.20\:1521\:orcl
    user=awmonitor
    password=000000
    dialect=org.hibernate.dialect.Oracle9Dialect
      

  6.   

    C:\Tomcat 6.0\webapps\AWMonitor\WEB-INF\classes\com\rx\security\servlet\menuInit.xml
    jdbcUrl=jdbc\:oracle\:thin\:@192.168.1.20\:1521\:orcl
    这个貌似不对吧
    jdbc:oracle:thin:@192.168.1.20:1521:orcl
      

  7.   

    我看着怎么感觉数据库的listener 服务没起来一样哦