appfuse连接Oracle Could not open Hibernate Session for transaction

Exception sending context initialized event to listener instance of class com.ciecc.webapp.listener.StartupListener
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection
at org.springframework.orm.hibernate4.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:544)



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


validationQuery 值为 select 1+1
默认为mysql的方式
需要在pom文件中添加如下代码

        <jdbc.validationQuery>select 1 from dual</jdbc.validationQuery>

猜你喜欢

转载自gaoweiss.iteye.com/blog/2197290
今日推荐