TCP/IP connection to host failed Java.net.ConnectException:Connection timed out__.net

Source: Internet
Author: User

Org.apache.commons.dbcp.SQLNestedException:Cannot Create poolableconnectionfactory (TCP/IP connection to host failed.) Java.net.ConnectException: Connection timedout: Connect)

1, network configuration TCP/IP is not open

2, Firewall

3, the connection address write wrong (the project file in the database connection written correctly, does not mean that the content is correct after compiling)

MM Reload Database program is not connected, the above points are confirmed no problem

What's the reason?

Think of the possible db.properties in the database connection although the MyEclipse configuration changed, but did not actually go to the edited directory classes, open the file, there is this file, and the content is correct.

At this time mm call, said that other projects run successfully, is ZJQ this project run unsuccessful. The key here is the project issue . The project was copied from the company's own notebook. Decide to recompile the project.

Myeclipse->project->clean, Myeclipse->project->build Project found no content output under the Classes folder.

Baidu Search: MyEclipse cannot compile

Find a solution http://zhidao.baidu.com/question/40085118.html

Workaround:
1: Here is the idea to solve the problem: Click Project->clean to clear the deployment file

2: Check the project Properties->java build Path->default output folder

3: Check the project Properties->java build path->libraries See if all the library packages are imported correctly

4: Delete all referenced library packages, and then import the test again

5: If there is a problem, see if there is a problem with the JDK configuration

Follow the steps above to discover that there are 2 jar pack errors under libraries. The address is not under this engineering directory and is referenced under Tomcat5 Server-api.jar and Jsp-api.jar (hint Miss). Tomcat comes with these packages and does not need to add the 2 jar packages, this 2 reference to the wrong jar package, compiled successfully, classes output files. Restart the TOMCAT,ZJQ project to run successfully.

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.