org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:66)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:52)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:449)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.
java:167)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
85)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353
)
at com.shera.tms.database.InitData.execute(InitData.java:90)
at com.shera.tms.database.InitDB.main(InitDB.java:60)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not es
tablish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:190)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
n(DriverManagerConnectionProvider.java:133)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:446)
... 6 more
Exception in thread "main" java.lang.NullPointerException
at com.shera.tms.database.InitData.execute(InitData.java:102)
数据库连接的配置
hibernate.dialect=Oracle9Dialect
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@192.168.8.94:1521:TMS
jdbc.username=tms
jdbc.password=tms
哪位高手知道这个问题怎么解决???