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.
**************************************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.
相关文章推荐
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI ***
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI ***
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI....
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader
- Caused by: java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI(***
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI(xxx
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI(xxx
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI(xxx) needs 2.1 API
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI(xxx
- java.lang.LinkageError: 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
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI ***
- webservice中经常有这样的问题 JAXB 2.0 API is being loaded from the bootstrap classloader.
- LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader
- CXF中jaxb-api.jar、jaxws-api.jar与jdk1.6不兼容问题:JAXB 2.0 API is being loaded from the bootstrap classloader
- JAXB 2.0 API is being loaded from the bootstrap classloader
- JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI ...解决
- 异常——JAXB 2.0 API is being loaded from the bootstrap classloader
- JAXB 2.0 API is being loaded from the bootstrap classloader