I hit the following issue while trying to run a JUnit test in Eclipse:
The Failure Trace displayed a message stating java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
I made sure that I had JUnit 4 and org.hamcrest.core along with the Java library in my project but still faced this issue.
After analyzing quite a bit, I noticed that my JRE System Library also has JUnit files associated. I added the org.hamcrest.core_1xx.jar to my JRE path as shown below.
I ran the test again. This time the test run was successful.
Other links which may help you to solve this issue
I had to Google around quite a bit to find the solution. I noticed there are multiple causes for this issue. If the solution outlined in this blog did not help you, try one of these helpful links:
© 2013-2017, Avinash Shetty. All rights reserved.