`

JAXB 2.0 API is being loaded from the bootstrap classloader

阅读更多

转自:   http://hi.baidu.com/sunxiangwei/blog/item/6f13eec4ee488ea18226ac45.html

 

 sun的官方说明: http://java.sun.com/j2se/1.5.0/docs/guide/standards/ 

 

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.jar的包(比如从netbeans目录下搜索一下),复制到endorsed目录下去.

 

 --------------------------------------------- 以上是转载,以下是测试 ---------------------------------------------------------

 

自己测试:

         jre必须是1.6, tomcat5.5的jdk可以是jdk1.5,  jdk和jre下面新建endorsed文件夹,并放入jaxb-api.jarjaxws-api.jar是没用的, 必须把这两个jar包放入"tomcat5.5\common\endorsed"(没有这个文件夹则新建,如果是 tomcat6.0, 则放在"Tomcat6.0\endorsed"), 特把两个jar共享..

 

         测试内容: 自制webservices客户端访问jax-ws的webservices服务端

         测试环境: myeclipse6.5  tomcat5.5  jre1.6  jdk1.5(可以全是1.6)

 

分享到:
评论

相关推荐

    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的核心包。。。。。。。。。。。。。。。。。。。

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

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

    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 2.0 java architecture for xml binding

    THE Java™Architecture for XML Binding (JAXB) provides a fast and convenient way to bind between XML schemas and Java representations, making it easy for Java developers to incorporate XML data and ...

Global site tag (gtag.js) - Google Analytics