在构建项目时出现以下错误:
java.lang.LinkageError
: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Documents and Settings/ind/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.4-1/jaxb-impl-2.2.4-1.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
请回复asp。
最佳答案
JAXB 2.1 实现包含在 Java SE 6 中,JAXB 2.2 实现包含在 Java SE 7 中。除非您有这样做的要求,否则我建议使用符合包含的 JAXB API 的 JAXB 实现在您使用的 Java 版本中。
关于java - 构建项目给了我 java.lang.LinkageError : JAXB 2. 1 API is being loaded from the bootstrap classloader,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7639067/