【问题标题】:Error When analyzing cpp projects with Sonar使用 Sonar 分析 cpp 项目时出错
【发布时间】:2013-01-04 04:24:44
【问题描述】:

我在分析 CPP 项目时遇到以下错误。我用声纳 3.1 和 3.4 分析了这个项目。但我得到了同样的错误 在两个声纳版本中。请帮助我找到并解决问题..

[ERROR] Failed to execute goal org.codehaus.sonar-plugins:maven-cpp-plugin:0.4:metrics (default-cli
) on project ConnectJet: Execution default-cli of goal org.codehaus.sonar-plugins:maven-cpp-plugin:
0.4:metrics failed: An API incompatibility was encountered while executing      
org.codehaus.sonar-plugins:maven-cpp-plugin:0.4:metrics: java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader,   
but this RI (from jar:file:/C:/Users/Renjith.R/.m2/repository/com/sun/xml/bind/j
axb-impl/2.1.12/jaxb-impl-2.1.12.jar!/com/sun/xml/bind/v2/model   
/impl/ModelBuilder.class) needs 2.1
API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap   
classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)

提前致谢 Renjith.R

【问题讨论】:

  • 您是否按照错误消息中的说明 - 将jaxb-api.jar 放入endorsed 目录并重试?
  • 是的。我的<java-home>/jre/lib 中没有名为endorsed 的目录。我创建了endorsed 目录并将jax-api.jar 放入其中。现在它工作得很好。

标签: maven sonarqube linkageerror


【解决方案1】:

将评论作为答案移动,因为它有效...

此问题可能是由于 java 提供的和声纳所需的 jaxb API 的版本冲突。

将 'jaxb-api.jarin theendorsed` 目录作为 instructex 放入错误消息中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-10-13
    • 2015-09-01
    • 1970-01-01
    • 2018-01-30
    • 2014-07-17
    • 2013-04-23
    • 2018-05-29
    相关资源
    最近更新 更多