1

分析 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

4

1 回答 1

1

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

该问题可能是由于jaxbjava 提供的和 sonar 所需的 API 版本冲突。

将“jaxb-api.jar in theendorsed”目录作为 instructex 放置在错误消息中。

于 2013-01-04T09:56:47.730 回答