java.lang.SecurityException: class "org.hamcrest.TypeSafeMatcher"'s signer...

今天在做Jmock测试时候,报如下异常:

java.lang.SecurityException: class "org.hamcrest.TypeSafeMatcher"'s signer information does not match signer information of other classes in the same package


搜了下网上的解决方案,都是说什么顺序不对。。。其实就是包冲突,如果是Eclipse自带的JUnit架包包含了一个org.hamcrest.core.jar,Jmock里面也有一个同样的架包,两个冲突了。可以把eclipse自带的JUnit架包直接移除掉,从官网下载一个纯净的不带hamcrest的架包,加载进来后,测试通过。


JUnit下载地址:http://www.junit.org/

posted on 2012-12-01 21:58  <安之若素>  阅读(785)  评论(0编辑  收藏  举报

导航