Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if there is an error when using jdbc to connect to oracle in spring

Shulou Source: shulou.com Published: 2022-05-31 17:50:40 10月03日 Update

This article mainly explains the "spring with jdbc to connect oracle errors how to do", the article explained the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "spring to use jdbc to connect oracle errors how to do" it!

An error occurred when using jdbc to connect to oracle in spring:

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 connectionCaused by:org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException (SQLStateConverter.java:103) is generally due to: after the customer connects to the listener, the listener redirects the customer to the scheduler port, and these connections will be rejected due to operating system problems.

To solve this problem, simply add the line DIRECT_HANDOFF_TTC_LISTENER = OFF to the header of the LISTENER.ORA.

Add the sentence DIRECT_HANDOFF_TTC_LISTENER = OFF to the listener.ora file

Then restart the listening service

Lsnrctl stop

Lsnrctl start

Thank you for your reading, the above is the content of "what to do when there is an error when connecting oracle with jdbc in spring". After the study of this article, I believe you have a deeper understanding of what to do when you use jdbc to connect oracle in spring, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Use error what to do time out problem learning monitoring content customer listener operating system one line reason header that is ideas situations files articles time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Apple Xiaomi Redmi Huawei