i used intellij idea 12 community edition. trying create test case class creating test case. when run test case says
java.lang.noclassdeffounderror: org/hamcrest/selfdescribing @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclasscond(classloader.java:631) @ java.lang.classloader.defineclass(classloader.java:615) @ java.security.secureclassloader.defineclass(secureclassloader.java:141) @ java.net.urlclassloader.defineclass(urlclassloader.java:283) @ java.net.urlclassloader.access$000(urlclassloader.java:58) @ java.net.urlclassloader$1.run(urlclassloader.java:197) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247) @ org.junit.internal.builders.junit4builder.runnerforclass(junit4builder.java:10) @ org.junit.runners.model.runnerbuilder.saferunnerforclass(runnerbuilder.java:59) @ org.junit.internal.builders.alldefaultpossibilitiesbuilder.runnerforclass(alldefaultpossibilitiesbuilder.java:26) @ org.junit.runners.model.runnerbuilder.saferunnerforclass(runnerbuilder.java:59) @ org.junit.internal.requests.classrequest.getrunner(classrequest.java:26) @ com.intellij.junit4.junit4ideatestrunner.startrunnerwithargs(junit4ideatestrunner.java:44) @ com.intellij.rt.execution.junit.junitstarter.preparestreamsandstart(junitstarter.java:195) @ com.intellij.rt.execution.junit.junitstarter.main(junitstarter.java:63) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ com.intellij.rt.execution.application.appmain.main(appmain.java:120) caused by: java.lang.classnotfoundexception: org.hamcrest.selfdescribing @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247) ... 25 more
how run test case in intellij. included junit4.11 jar file module
did include hamcrest-core-1.3.jar
file in classpath? if not included means include jar , try once again.
Comments
Post a Comment