Solve the Problem of connecting myeclipse to the mysql database (this problem was discovered after a long time

Source: Internet
Author: User
A problem occurred while connecting to MYSQL during the BBS website today. The error code is as follows: java. lang. classNotFoundException: com. mysql. jdbc. driveratorg. apache. catalina. loader. webappClassLoader. loadClass (WebappClassLoader. -java: 1352) atorg. apache. catalina. loader. W

A problem occurred while connecting to MYSQL during the BBS website today. The error code is as follows: java. lang. classNotFoundException: com. mysql. jdbc. driver at org. apache. catalina. loader. webappClassLoader. loadClass (WebappClassLoader. java: 1352) at org. apache. catalina. loader. W

A problem occurred while connecting to MYSQL during the BBS website today. The error code is as follows:

Java. lang. ClassNotFoundException: com. mysql. jdbc. Driver
At org. apache. catalina. loader. WebappClassLoader. loadClass (WebappClassLoader. java: 1352)
At org. apache. catalina. loader. WebappClassLoader. loadClass (WebappClassLoader. java: 1198)
At java. lang. ClassLoader. loadClassInternal (ClassLoader. java: 319)
At java. lang. Class. forName0 (Native Method)
At java. lang. Class. forName (Class. java: 164)

Because java. lang. classNotFoundException: com. mysql. jdbc. driver, I always thought it was a problem with my connection JAR package. I searched the internet for a long time. Similar problems are caused by JAR packages, but I am sure that my JAR package is correct, then I started to look for the code and found that the code in one of my previous cases is exactly the same as this, and the previous cases can run normally (when it was previously run ).

Then I thought it was not properly configured when I re-installed it. Then I turned over N to configure MYECLIPSE and found no problems at all. At this time, I was so discouraged, but I didn't give up and went on to look for it. Then I ran another previous case and found that the previous case could not run normally, I suspect that it is neither a JAR package nor a code issue.

I found that there are two lines in front of at java. lang. Class. forName0 (Native Method): at org. apache. catalina. loader. WebappClassLoader. loadClass (WebappClassLoader. java: 1352)
At org. apache. catalina. loader. WebappClassLoader. loadClass (WebappClassLoader. java: 1198)

When I went online, I found the problem was caused by port 8080 of TOMCAT. I restarted TOMCAT and found OK !!!

Oh, that's so exciting! However, this issue should be recorded to avoid the same problem in the future!


Http://blog.csdn.net/chenlm871224/archive/2008/04/08/2260947.aspx

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.