An exception to a database connection was reported by someone today:
Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io Exceptions: NL Exception was generated)
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io Exceptions: NL Exception was generated)
Because the program has been running normally for a long time, so the basic rule out code logic problems, check the configuration found that the JDBC connection string problem;
The original URL was written as:
jdbc:oracle:thin:@(DESCRIPTION =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))(LOAD_BALANCE = yes))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))
Where, DESCRIPTION appears twice, which is incorrect, and the correct connection string should be:
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))(LOAD_BALANCE = yes))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))
Conclusion:
A JDBC connection string syntax error may result in Io exceptions: NL Exception was generated.
Read More:
- I/O error while reading input message; nested exception is java.io.IOException: Stream closed
- [Solved] ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed t
- [Solved] org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception
- Java learning unreported exception java.io.IOException ; must be caught or declared to be thrown
- [Solved] Hadoop Error: Exception in thread “main“ java.io.IOException: Error opening job jar: /usr/local/hadoop-2.
- keytool error java.io.IOException:keystore was tampered with,or password was incorre
- keytool Error: java.io.IOException: Keystore was tampered with, or password was incorrect
- [Solved] springboot Project Run Error: HikariPool-1 – Exception during pool initialization.
- JAVA: Controller exception handling
- [Solved] hadoop Error: 9000 failed on connection exception java.net.ConnectException Denied to Access
- [Solved] org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is
- [Solved] Java.lang.BootstrapMethodError: call site initialization exception
- Request processing failed; nested exception is java.lang.NullPointerException or UnsatisfiedDependencyE
- Mybatis single parameter pass in exception (How to Fix)
- Exception information: jsonmappingexception: out of start_ ARRAY token
- Dubbo failed to register and consumer null pointer exception
- [Solved] Method threw ‘java.lang.StackOverflowError‘ exception. Cannot evaluate
- [Solved] Upload Files Error: Request processing failed;nested exception is org.springframework.web.multipart.MultipartExcepti
- [Solved] qrcode-error: Exception in thread “main” java.lang.NoClassDefFoundError…
- nested exception is java.lang.StackOverflowError [How to Solve]