首页 > 其他 > 详细

Solution of Cobertura Exception "touchJump" when Unit Test

时间:2014-03-18 11:47:52      阅读:421      评论:0      收藏:0      [点我收藏+]

During unit test I encounter a

"java.lang.NoSuchMethodError: net.sourceforge.cobertura.coveragedata.ClassData.touchJump(IIZ)V"

exception. I find there are 2 cobertura.jar in classpath. That jar in /usr/share/ant/lib is v1.9.2, while in ./lib/ is 1.8.1.

When I delete the jar in ./lib, there is a

"java.lang.NoClassDefFoundError: net/sourceforge/cobertura/coveragedata/HasBeenInstrumented"

exception.

Then I copy cobertura.jar from /usr/share/ant/lib to ./lib, everything goes fine.

Solution of "local class incompatible"

Problem: local class incompatible: stream classdesc serialVersionUID = 2, local class serialVersionUID = 2152686494816595840

Solution: use unzip -q -c cobertura.jar META-INF/MANIFEST.MF, I found the version of this jar is 1.8, while that in other projects is 1.9.1. So I copy the jar of version 1.9.1 to replace that of version 1.8, everything goes fine.

Solution of Cobertura Exception "touchJump" when Unit Test,布布扣,bubuko.com

Solution of Cobertura Exception "touchJump" when Unit Test

原文:http://www.cnblogs.com/darkmatter/p/3606760.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!