您的位置:首页 > Web前端 > BootStrap

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

2008-05-19 08:54 651 查看
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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐