ORA-12518, TNS:listener could not hand off client connection

来源:互联网 发布:汽车试驾软件 编辑:程序博客网 时间:2024/05/16 11:23

spring中用jdbc去连接oracle的时候,出现错误:

ORA-12518, TNS:listener could not hand off client connection

org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by:
org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)

 

原因一般为:客户连接到监听器后,监听器把客户重定向到调度程序端口,由于操作系统问题,这些连接会被拒绝。
要解决这个问题,只需要在LISTENER.ORA的头部加入这一行DIRECT_HANDOFF_TTC_LISTENER = OFF即可。

在listener.ora文件加上一句 DIRECT_HANDOFF_TTC_LISTENER = OFF

然后重启监听服务

lsnrctl stop
lsnrctl start

原创粉丝点击