java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader...

3 篇文章 0 订阅
when trying to write and deploy a web-service under Netbeans 6.0 using Apache Tomcat 6.0, you get a weird error about an incompatibility between the JAXB libraries versions:
**************************************WARNING***************************************To use JAX-WS 2.1 with JDK 6, newer versions of API jars need to be in bootclasspathbefore rt.jar. To do this you can use Java endorsed mechanism to override what is inJava platform. The easiest way to do so is to copy all jars from the C:/Program Files/NetBeans 6.0 Beta 1/java1/modules/ext/jaxws21/api folder to C:/Program Files/Apache Software Foundation/Apache Tomcat 6.0/endorsed.
************************************************************************************
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: 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) 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/)

What you need to do is exactly what suggested:
copy the jar files from C:/Program Files/NetBeans 6.0 Beta 1/java1/modules/ext/jaxws21/api to C:/Program Files/Apache Software Foundation/Apache Tomcat 6.0/endorsedYou will need to create the "endorsed" folder under Tomcat 6 main folder;
in my case, 6 jar files are copied:
18/09/2007 14.51 89.193 jaxb-api.jar
18/09/2007 14.51 36.005 jaxws-api.jar
18/09/2007 14.51 23.246 jsr173_api.jar
18/09/2007 14.51 7.956 jsr181-api.jar
18/09/2007 14.51 5.948 jsr250-api.jar
18/09/2007 14.51 18.623 saaj-api.jar

Then you need to rebuild the project, restart tomcat and undeploy/redeploy your project, and everything should be fine.
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值