Java. Lang. noclassdeffounderror: cocould not initialize class com. MySQL. JDBC. connectionimpl

Source: Internet
Author: User

Exception in thread "com. mchange. v2.async. threadpoolasynchronousrunner $ poolthrea
D-#2 "Java. Lang. noclassdeffounderror: cocould not initialize class com. MySQL. JDBC. connectionimpl

 

Sqlclientinfoexception is only available in JDK 6.0

 

 

The solution to the error is as follows: According to the error message, the "Java/SQL/sqlclientinfoexception" information cannot be found. First, check whether the JDK version has the sqlclientinfoexception class (according to the introduction on the network, this category is available only in JDK 6 or later versions !). Although this type of file exists in the JDK6-API, it does not necessarily exist in JDK 6 installed on your machine (JDK 6 or below is more likely to have this category ), A convenient confirmation method is to go to the JDK installation path on your machine and check whether the source file "sqlclientinfoexception" is found in the path "Java/SQL/" in the "/src.zip" source file package. java "if not, it indicates that the JDK you installed does not contain such files (take the JDK on your machine as an example, although it is version 1.6 ["Java version" 1.6.0-rc-b66 ""], but there is no such file), therefore, "Java/SQL/sqlclientinfoexception" always occurs during database connection! I copied a later version of the "% java_home %/jrelib/RT. Jar" file (JDK version containing the "Java/SQL/sqlclientinfoexception" class file !) Replace the corresponding file on the local machine and execute the program. It's okay. It's successful!

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.