`
kuangxiangly
  • 浏览: 28032 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

JAXB 2.0 API is being loaded from the bootstrap classloader错误【转】

 
阅读更多

java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI(xxx) needs 2.1 API

在使用webservice,mule esb等需要jaxb的项目里经常会出现 JAXB 2.0 API is being loaded from the bootstrap classloader这个错误,按照打出的信息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/)去做,通常是解决不了问题的,该建议信息有两个问题导致不可行:

1. 不是下载jaxb-api.jar 而是下载jaxb-api-2.1.jar文件

2.不是把下载的这个jar文件放在sun网站给出的<java-home>/lib/endorsed 下,而是要自己试验确定应该放在哪个目录下:

确定放在哪个目录下的方法如下:

首先要看你的项目是java项目还是java web项目:

A, java项目直接打印System.out.println(System.getProperty("java.endorsed.dirs"));即是jaxb-api-2.1.jar应该放的目录。

B, java web 项目要用一个可以正常启动的web项目(当然没用到jaxbweb项目),打印System.out.println(System.getProperty("java.endorsed.dirs"));即可,我的是java web项目,打出的是E:/tomcat6/common/endorsed

 

我把jaxb-api-2.1.jar放到E:/tomcat6/common/endorsed下后问题解决。

注:没有common/endorsed目录的,自己创建。

 

 JAXB 2.0 API is being loaded from the bootstrap classloader

2010-05-11 16:55:13

JAXB 2.0 API is being loaded from the bootstrap classloader
 
SSH jdk6.0 Tomcat6.0环境中使用CXF 运行时报如下错误

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in URL [jar:file:/E:/workSpace/T82A/WebRoot/WEB-INF/lib/cxf/cxf-2.1.3.jar!/META-INF/cxf/cxf.fixml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw exception; nested exception is java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/workSpace/T82A/WebRoot/WEB-INF/lib/cxf/jaxb-impl-2.1.7.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/)

...
Caused by: java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/workSpace/T82A/WebRoot/WEB-INF/lib/cxf/jaxb-impl-2.1.7.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/)
...

按照网上看说,在jdk1.6.0_05\jre\lib\下新建endorsed文件夹,放入jaxb-api.jar还是没有效果,经过我的仔细阅读E文,纠正这个错误,如果是Tomcat 5.5,则新建文件路径为“Tomcat 5.5\common\endorsed”,如果是Tomcat 6.0,则新建路径为“Tomcat 6.0\endorsed”。不是在jdk1.6.0_05\jre\lib\

 

分享到:
评论

相关推荐

    jaxb-api-2.1.jar

    在使用webservice,esb等需要jaxb的项目里经常会出现 JAXB 2.0 API is being loaded from the bootstrap classloader错误.执行System.out.println(System.getProperty("java.endorsed.dirs"));输出jaxb-api-2.1.jar...

    jaxb-2_1_9.zip

    java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file://build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class...

    jaxb-api-2.2 jaxb-impl

    在使用webservice,mule esb等需要jaxb的项目里经常会出现 JAXB 2.0 API is being loaded from the bootstrap classloader这个错误,按照打出的信息Use the endorsed directory mechanism to place jaxb-api.jar in ...

    jaxb-api-2.0.jar

    jaxb-api-2.0.jar jaxb-api-2.0.jar

    jaxb2.0 JEE5

    JEE5规范中提出。从java对象转成xsd,反之也可以

    jaxb2.0英文文档

    jaxb2.0文档,java于xml动态绑定框架,很好的东西。

    jaxb-api-2.3.0-API文档-中文版.zip

    赠送jar包:jaxb-api-2.3.0.jar; 赠送原API文档:jaxb-api-2.3.0-javadoc.jar; 赠送源代码:jaxb-api-2.3.0-sources.jar; 赠送Maven依赖信息文件:jaxb-api-2.3.0.pom; 包含翻译后的API文档:jaxb-api-2.3.0-...

    jaxb-api-2.3.0-API文档-中英对照版.zip

    赠送jar包:jaxb-api-2.3.0.jar; 赠送原API文档:jaxb-api-2.3.0-javadoc.jar; 赠送源代码:jaxb-api-2.3.0-sources.jar; 赠送Maven依赖信息文件:jaxb-api-2.3.0.pom; 包含翻译后的API文档:jaxb-api-2.3.0-...

    jaxb-api-2.2.11-API文档-中英对照版.zip

    赠送jar包:jaxb-api-2.2.11.jar; 赠送原API文档:jaxb-api-2.2.11-javadoc.jar; 赠送源代码:jaxb-api-2.2.11-sources.jar; 赠送Maven依赖信息文件:jaxb-api-2.2.11.pom; 包含翻译后的API文档:jaxb-api-...

    jaxb-api-2.3.1-API文档-中文版.zip

    赠送jar包:jaxb-api-2.3.1.jar; 赠送原API文档:jaxb-api-2.3.1-javadoc.jar; 赠送源代码:jaxb-api-2.3.1-sources.jar; 赠送Maven依赖信息文件:jaxb-api-2.3.1.pom; 包含翻译后的API文档:jaxb-api-2.3.1-...

    jaxb-api-2.2.11-API文档-中文版.zip

    赠送jar包:jaxb-api-2.2.11.jar; 赠送原API文档:jaxb-api-2.2.11-javadoc.jar; 赠送源代码:jaxb-api-2.2.11-sources.jar; 赠送Maven依赖信息文件:jaxb-api-2.2.11.pom; 包含翻译后的API文档:jaxb-api-...

    jaxb-api-2.2.2-API文档-中文版.zip

    赠送jar包:jaxb-api-2.2.2.jar; 赠送原API文档:jaxb-api-2.2.2-javadoc.jar; 赠送源代码:jaxb-api-2.2.2-sources.jar; 赠送Maven依赖信息文件:jaxb-api-2.2.2.pom; 包含翻译后的API文档:jaxb-api-2.2.2-...

    jaxb-api-2.3.1-API文档-中英对照版.zip

    赠送jar包:jaxb-api-2.3.1.jar; 赠送原API文档:jaxb-api-2.3.1-javadoc.jar; 赠送源代码:jaxb-api-2.3.1-sources.jar; 包含翻译后的API文档:jaxb-api-2.3.1-javadoc-API文档-中文(简体)-英语-对照版.zip ...

    jaxb2.0 JAR

    改JAR包是JAXB2.0的核心包。。。。。。。。。。。。。。。。。。。

    javax.rar(jaxb-impl-2.3.0、jaxb-core-2.3.0、jaxb-api-2.3.0)

    有关Maven项目中缺少jaxb-api的异常报错解决,jaxb-api-2.3.0.jar

    JAXB 2.2 API手册

    最新的JAXB API手册! JAXB_2.2_API.chm

    jaxb-api.jar

    jaxb-api 内部含有jaxb的api,对java.xml.bind 进行了封装

    jaxb-api jaxb-impl jar

    jaxb-api jaxb-impl jar

    jaxb-api.jar.jaxws-api.zip_ jaxb-api.jar_cxf_jax-ws.jar_jaxb-api

    cxf框架与jdk6出现冲突的支持包,请大家支持下!

Global site tag (gtag.js) - Google Analytics