hibernate Connections could not be acquired from the underlying database!

今天Hibernate连接oracle出现了错误 

java.sql.SQLException: Connections could not be acquired from the underlying database!

 

因为数据库在本机我的url是这样写的:

jdbc:oracle:thin:@127.0.0.1:1521:XE

后来我查看了

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = debian-server)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

我把连接数据库的url改为了:jdbc:oracle:thin:@debian-server:1521:XE,这样问题解决了。

 

你可能感兴趣的:(hibernate Connections could not be acquired from the underlying database!)