zoukankan      html  css  js  c++  java
  • Solution of Cobertura Exception "touchJump" when Unit Test

    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.

  • 相关阅读:
    关于值传递和引用传递
    单例设计模式(创建型模式)
    逻辑分页和物理分页
    java基本数据类型
    Keepalived笔记
    lvs,HAProxy,nginx简单笔记
    限流, 熔断,降级笔记
    redis事务之watch
    Redis-Sentinel
    正式入驻博客园
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3606760.html
Copyright © 2011-2022 走看看