jsf+hibernate+spring+oracle
连接的时候出现错误,希望高手解决:org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; 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:
192.168.0.160:1521:orcl1?useUnicode=true&characterEncoding=GBK
); nested exception is 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:
192.168.0.160:1521:orcl1?useUnicode=true&characterEncoding=GBK
)
Caused by: 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:
192.168.0.160:1521:orcl1?useUnicode=true&characterEncoding=GBK
)

解决方案 »

  1.   

    数据源配置对不对??
    192.168.0.160:1521:orcl1?useUnicode=true&characterEncoding=GBK 这是不是对的??
    驱动有没??
    要不要打补丁我不知道 ...
      

  2.   

    jdbc oracle的url应该是
    jdbc:oracle:thin:@192.168.0.160:1521:1521:数据库
    这样的吧 ??
      

  3.   

    数据库的连接字符串是对的,我在myeclipse自带的数据库连接器上可以连接上,但在代码中就会出错