Java. SQL. SQLException: Io: NL Exception was generated (jdbc data source problem)

Source: Internet
Author: User

Error message:

------------- In sendHeartBeats
------------- In sendHeartBeats
17:37:51, 456 ERROR (com. ylkj. drmt. importer. IndicatorDimensionCompostionImporter: 226)-T_JJ_YYJC_JJAQJMjava. SQL .SQLException: Io: Exception was generated
At oracle. jdbc. driver. DatabaseError. throwSqlException (DatabaseError. java: 112)
At oracle. jdbc. driver. DatabaseError. throwSqlException (DatabaseError. java: 146)
At oracle. jdbc. driver. DatabaseError. throwSqlException (DatabaseError. java: 255)
At oracle. jdbc. driver. T4CConnection. logon (T4CConnection. java: 387)
At oracle. jdbc. driver. PhysicalConnection. <init> (PhysicalConnection. java: 420)
At oracle. jdbc. driver. T4CConnection. <init> (T4CConnection. java: 165)
At oracle. jdbc. driver. T4CDriverExtension. getConnection (T4CDriverExtension. java: 35)
At oracle. jdbc. driver. OracleDriver. connect (OracleDriver. java: 801)
At java. SQL. DriverManager. getConnection (DriverManager. java: 525)
At java. SQL. DriverManager. getConnection (DriverManager. java: 171)
At com. ylkj. drmt. dataquality. detaildata. service. impl. JoinCheckServiceImpl. getStatNum (JoinCheckServiceImpl. java: 64)
At com. ylkj. drmt. dataquality. detaildata. service. impl. JoinCheckServiceImpl. addJoinValidate (JoinCheckServiceImpl. java: 203)
At com. ylkj. drmt. dataquality. detaildata. service. impl. JoinCheckServiceImpl $ FastClassByCGLIB $ cbd1_bc. invoke (<generated>)
At net. sf. cglib. proxy. MethodProxy. invoke (MethodProxy. java: 149)
At org. springframework. aop. framework. Cglib2AopProxy $ CglibMethodInvocation. invokeJoinpoint (Cglib2AopProxy. java: 700)
At org. springframework. aop. framework. ReflectiveMethodInvocation. proceed (ReflectiveMethodInvocation. java: 149)
At org. springframework. transaction. interceptor. TransactionInterceptor. invoke (TransactionInterceptor. java: 106)
At org. springframework. aop. framework. ReflectiveMethodInvocation. proceed (ReflectiveMethodInvocation. java: 171)
At org. springframework. aop. interceptor. ExposeInvocationInterceptor. invoke (ExposeInvocationInterceptor. java: 89)
At org. springframework. aop. framework. ReflectiveMethodInvocation. proceed (ReflectiveMethodInvocation. java: 171)
At org. springframework. aop. framework. Cglib2AopProxy $ DynamicAdvisedInterceptor. intercept (Cglib2AopProxy. java: 635)
At com. ylkj. drmt. dataquality. detaildata. service. impl. JoinCheckServiceImpl $ EnhancerByCGLIB $ f685b5ea. addJoinValidate (<generated>)
At com. ylkj. drmt. dataquality. detaildata. validate. engine. IdvalidateEngine. joinValidate (IdvalidateEngine. java: 112)
At com. ylkj. drmt. dataquality. detaildata. validate. engine. DvalidateEngine $1. processor (DvalidateEngine. java: 80)
At com. ylkj. drmt. dataquality. detaildata. validate. engine. IdvalidateEngine. run (IdvalidateEngine. java: 126)
At java. lang. Thread. run (Thread. java: 595)
------------- In sendHeartBeats
------------- In sendHeartBeats


Analysis Solution:

The RAC configuration is as follows:


Node1: IP address 192.168.60.132, Instance name: rac1, Host Name: rac1
 
Node2: IP address 192.168.60.144, Instance name: rac2, Host Name: rac2
 
The RAC service name is oratest.
My application server is apache + weblogic
 
The configuration process is as follows:
 
1. After searching, we found that there are many connection RAC methods and copied the following jdbcURL:
 
Jdbc: oracle: thin: @ (description = (address_list = (address = (host = 192.168.60.132) (protocol = tcp) (port = 1521) (address = (host = 192.168.60.144) (protocol = tcp) (port = 1521) (load_balance = yes) (failover = yes) (connect_data = (service_name = oratest )))
 
However, weblogic reports the following error:
Io Exception: NL Exception was generated;
 
2. google and baidu on the Internet. Although the n method is found, the error is always prompted;
 
3. In desperation, open the database tnsname. ora and find that the configuration is as follows:
Oratest =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = rac1) (PORT = 1521 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = rac2) (PORT = 1521 ))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oratest)
)
)
Modify jdbcUR:
Jdbc: oracle: thin: @ (description = (address_list = (address = (host = rac1) (protocol = tcp) (port = 1521) (address = (host = rac2) (protocol = tcp) (port = 1521) (load_balance = yes) (failover = yes) (connect_data = (service_name = oratest )))
 
The test result is successful;
Initially, the Database Service adopts the host name, while the IP address in jdbcURL will cause the NL Exception;
 
Suggestion: if there is a problem connecting RAC, it is best to use the connection string in tnsnames. ora to connect;
 
Do you have such a problem?

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.