加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

JAXB 2.0 API is being loaded from the bootstrap classloader

发布时间:2020-12-17 21:18:43 所属栏目:安全 来源:网络整理
导读:转自:???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.springfram

转自:???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_05jrelib下新建endorsed文件夹,放入jaxb-api.jar还是没有效果,经过我的仔细阅读E文,纠正这个错误,如果是Tomcat 5.5,则新建文件路径为“Tomcat 5.5commonendorsed”,如果是Tomcat 6.0,则新建路径为“Tomcat 6.0endorsed”不是在jdk1.6.0_05jrelib

对于找一个jaxb-api.jar的包(比如从netbeans目录下搜索一下),复制到endorsed目录下去.

?

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

?

自己测试:

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

?

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

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读