Cannot create poolableconnectionfactory(Io exception: The network Adapter could not establish the connection) recently used
ORACLEDatabase as a project, creating a connection pool when it appears
Cannot create poolableconnectionfactory(Io exception: The network Adapter could not establish the connection) error, then found that the original connection pool URL configuration and listener inside the inconsistency, must be the same machine name or the same IP address hair, Otherwise, the above error ==================================================================1, IP error:
Error in setting URL, for example: JDBC:ORACLE:THIN:@192.168.1.80:1521:ORCL
Database server is correct: Ping server IP is unobstructed. Ping is not a general rule to change the URL correctly.
The port number is correct.
To do this: type Sqlplus on DOS to check if Oracle is open
Everything is fine. Follow step 2nd below.
2, Firewall
If a fire wall is installed on the machine, it may be caused by the server port number shielding. After you close the firewall, try to reconnect.
Still not, then perform step 3rd.
3. The database listener did not start modifying the ImagePath value in the registry on your PC.
Here's an example of an Oracle database
To restart database monitoring manually:
1: Start → run → input cmd→ enter DOS command prompt interface
D:>lsnrctl
lsnrctl> status
Or
Lsnrctl> start
If the information in a similar picture
Congratulations, your problem has been found out, is the database monitor did not start the cause.
Here's how to start the database manually:
Execute regedit at run place into registry to
Start → Run →regedit
Press the following path
Hkey_local_machine\system\currentcontrolset\services\oracleorahome90tnslistener
Find Oracleorahome90tnslistener (I'm using oracle9i other version should be Oracleorahomexxxtnslistener)
After you find it, you will find that the ImagePath key value does not exist, create it: (if present, click Modify, modify method described below)
Right-click, pop-up menu select New Key (N) → string value (S)
Name it ImagePath
Select the ImagePath right click to select Modify:
Enter your Oracle installation directory \ora90 in the value (the other version corresponds to the oraxxx directory) \bin\tnslsnr
Exit the registry after OK:
And then type start under the DOS command
If the following screen appears, congratulations, the listener started successfully:
Turn off the DOS and start your program for testing and it should be back to normal. The above is the reason why the network Adapter could not establish the connection exception that is common in 3 is thrown.
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.