Java. Lang. linkageerror: jaxb 2.0 API is being loaded from the bootstrap classloader...

Source: Internet
Author: User
Tags apache tomcat netbeans
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 mechanisms 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 mechanics 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 shoshould be fine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.