Java. Lang. linkageerror: jaxb 2.0 API is being loaded from the bootstrap classloader, but this RI (xxx

Source: Internet
Author: User
Tags mule esb

The error jaxb 2.0 API is being loaded from the bootstrap classloader often occurs in projects that require jaxb such as WebService and mule ESB, use the endorsed directory mechanisms to place jaxb-api.jar In the bootstrap classloader according to the output information. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/) to do, usually cannot solve the problem, the suggested information has two problems leading to the failure:

1. Download The jaxb-api.jar file instead of downloading the jaxb-api-2.1.jar File

2. Instead of placing the downloaded JAR file under <Java-Home>/lib/endorsed provided by the sun website, you need to test the directory to which the downloaded JAR file should be placed:

The method for determining which directory to store is as follows:

First, check whether your project is a Java project or a Java Web project:

A, Java project directly prints system. Out. println (system. getproperty ("Java. endorsed. dirs"); that is the directory that the jaxb-api-2.1.jar should put.

B. the Java Web project should use a web project that can be started normally (of course, The jaxb web project is not used) and print the system. out. println (system. getproperty ("Java. endorsed. dirs "); you can, my Java Web project is played by E:/tomcat6/common/endorsed.

 

After I put the jaxb-api-2.1.jar under E:/tomcat6/common/endorsed, the problem is solved.

Note: If the common/endorsed directory does not exist, create it by yourself.

 

Related Article

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.