The Spring Project JUnit test error ClassNotFoundException resolved,

Source: Internet
Author: User

The MyEclipse item has a red exclamation point and each package is displayed as normal. With JUnit test part can run, partial error, error is as follows:

Class not found N_JDBC. Userdaotest
Java.lang.ClassNotFoundException:n_jdbc. Userdaotest
At Java.net.urlclassloader$1.run (urlclassloader.java:200)
At java.security.AccessController.doPrivileged (Native Method)
At Java.net.URLClassLoader.findClass (urlclassloader.java:188)
At Java.lang.ClassLoader.loadClass (classloader.java:307)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:301)
At Java.lang.ClassLoader.loadClass (classloader.java:252)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass (remotetestrunner.java:693)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses (remotetestrunner.java:429)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:452)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:683)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:390)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:197)

Solve:

Under Window----->preferences---->java---->compiler---->building page:

Modify the following two properties: Error---->warning

Modified to:

It's working again, and the reason is not clear.

The Spring Project JUnit test error ClassNotFoundException resolved,

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.