Oracle.net.ns.NetException:NL Exception was generated____oracle

Source: Internet
Author: User

These two days modified the following database configuration file, the results of the following error message background, as follows (mainly concerned about the red part)

Org.springframework.jdbc.support.MetaDataAccessException:Error while extracting DatabaseMetaData; Nested exception is org.apache.commons.dbcp.SQLNestedException:Cannot create Poolableconnectionfactory (NL exception was generated) at Org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData (jdbcutils.java:296)
At Org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData (jdbcutils.java:320)
At Org.springframework.jdbc.support.SQLErrorCodesFactory.getErrorCodes (sqlerrorcodesfactory.java:216)
At Org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource ( sqlerrorcodesqlexceptiontranslator.java:140)
At Org.springframework.jdbc.support.sqlerrorcodesqlexceptiontranslator.<init> ( sqlerrorcodesqlexceptiontranslator.java:103)
At Org.springframework.jdbc.support.JdbcAccessor.getExceptionTranslator (jdbcaccessor.java:99)
At Org.springframework.orm.ibatis.SqlMapClientTemplate.execute (sqlmapclienttemplate.java:212)
At Org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult (sqlmapclienttemplate.java:249)
At Org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList (sqlmapclienttemplate.java:296)
......
At Java.lang.Thread.run (thread.java:736)
caused By:org.apache.commons.dbcp.SQLNestedException:Cannot create poolableconnectionfactory (NL Exception was Generated)
At Org.apache.commons.dbcp.BasicDataSource.createDataSource (basicdatasource.java:855)
At Org.apache.commons.dbcp.BasicDataSource.getConnection (basicdatasource.java:540)
At Org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection (datasourceutils.java:113)
At Org.springframework.jdbc.datasource.transactionawaredatasourceproxy$transactionawareinvocationhandler.invoke (transactionawaredatasourceproxy.java:210)
At $Proxy 107.getMetaData (Unknown Source)
At Org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData (jdbcutils.java:285)
... More
caused By:java.sql.SQLException:NL Exception was generated
At Oracle.jdbc.driver.SQLStateMapping.newSQLException (sqlstatemapping.java:70)
At Oracle.jdbc.driver.DatabaseError.newSQLException (databaseerror.java:133)
At Oracle.jdbc.driver.DatabaseError.throwSqlException (databaseerror.java:199)
At Oracle.jdbc.driver.DatabaseError.throwSqlException (databaseerror.java:480)
At Oracle.jdbc.driver.T4CConnection.logon (t4cconnection.java:413)
At Oracle.jdbc.driver.physicalconnection.<init> (physicalconnection.java:508)
At Oracle.jdbc.driver.t4cconnection.<init> (t4cconnection.java:203)
At Oracle.jdbc.driver.T4CDriverExtension.getConnection (t4cdriverextension.java:33)
At Oracle.jdbc.driver.OracleDriver.connect (oracledriver.java:510)
At Org.apache.commons.dbcp.DriverConnectionFactory.createConnection (driverconnectionfactory.java:37)
At Org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (poolableconnectionfactory.java:290)
At Org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory (basicdatasource.java:877)
At Org.apache.commons.dbcp.BasicDataSource.createDataSource (basicdatasource.java:851)
... More
caused By:oracle.net.ns.NetException:NL Exception was generated
At Oracle.net.resolver.AddrResolution.resolveAddrTree (addrresolution.java:613)
At Oracle.net.resolver.AddrResolution.resolveAndExecute (addrresolution.java:410)
At Oracle.net.ns.NSProtocol.establishConnection (nsprotocol.java:634)
At Oracle.net.ns.NSProtocol.connect (nsprotocol.java:208)
At Oracle.jdbc.driver.T4CConnection.connect (t4cconnection.java:966)
At Oracle.jdbc.driver.T4CConnection.logon (t4cconnection.java:292)

... More

In fact, this error occurred, mainly in the database configuration file URL string errors caused . Carefully check the URL string, the problem is basically resolved.

The following is a URL string that can be run:

oracle.url=jdbc:oracle:thin:@ (description= address_list= (Load_balance=off) (Failover=on) (address= (PROTOCOL=TCP) (host=192.168.1.12) (port=1521)) (Address= (PROTOCOL=TCP) (host=192.168.1.15) (port=1521)) (Connect_data= (SERVICE_NAME=ORCL) (Failover_mode= (Type=select) (Method=basic)))

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.