Spring3-org. gjt. mm. mysql. Drivernotfound

Source: Internet
Author: User
Spring3 problems-org. gjt. mm. mysql. Drivernotfound in fact, this problem is often quite simple. Generally, if the classpath does not contain the mysql driver package, no error will be reported after configuration. However, a strange problem was found during the use of spring3.1. The jar package is already in classpath, but after being started, org. gjt will be reported as long as it is called to the database.

Spring3-org. gjt. mm. mysql. Driver not found is actually a very simple problem. Generally, if the mysql Driver package is not found in classpath, no error will be reported when the configuration is complete. However, a strange problem was found during the use of spring3.1. The jar package is already in classpath, but after being started, org. gjt will be reported as long as it is called to the database.

Spring3-org. gjt. mm. mysql. Driver not found
In fact, this problem is often quite simple. Generally, if the classpath does not contain the mysql driver package, no error will be reported when the configuration is complete. However, a strange problem was found during the use of spring3.1. The jar package is already in classpath, but after being started, the org. gjt. mm. mysql. the Driver cannot be found. This problem has been plagued for many days. After Baidu put the mysql Driver package under the EXT extension directory of java, everything runs OK. Although the problem has been solved, it is still very troublesome to put the jar package under the JDK lib package every time during deployment. After subsequent analysis, the data source "org. apache. tomcat. dbcp. dbcp. basicDataSource "(in the commons-dbcp.jar) does not exist in the project. It is strange that why does spring not report an error after it starts the container? The single Singleton is loaded when the container is started. The reason should be that the class cannot be found.
Ah for the time being first put the "commons-dbcp.jar" in the path to use it, and then think about the reasons.

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.