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

Source: Internet
Author: User

I encountered this depressing problem when I first set up the platform environment: (it has been a long time)

 

The environment I used at the beginning was myeclipse 6.5 (full installation version) + JDK 6 (Update 2) + Tomcat 6.0. This environment should be more appropriate,

However, after the environment is set up, the corresponding form cannot be displayed, and the following inexplicable error will be reported:

 

Java. Lang. linkageerror: jaxb 2.0 API is being loaded from the bootstrap classloader,
But this RI (from jar: file:/E:/jercy/tomcat6/tomcat6/webapps/helloword/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)
Com. Sun. xml. Bind. v2.model. impl. modelbuilder. <clinit> (modelbuilder. Java: 135)
Com. Sun. xml. Bind. v2.runtime. jaxbcontextimpl. gettypeinfoset (jaxbcontextimpl. Java: 389)
Com. Sun. xml. Bind. v2.runtime. jaxbcontextimpl. <init> (jaxbcontextimpl. Java: 253)
Com. Sun. xml. Bind. v2.contextfactory. createcontext (contextfactory. Java: 84)
Com. Sun. xml. Bind. v2.contextfactory. createcontext (contextfactory. Java: 66)
Com. Sun. xml. Bind. v2.contextfactory. createcontext (contextfactory. Java: 132)
Sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
Sun. Reflect. nativemethodaccessorimpl. Invoke (nativemethodaccessorimpl. Java: 39)
Sun. Reflect. delegatingmethodaccessorimpl. Invoke (delegatingmethodaccessorimpl. Java: 25)
Java. Lang. Reflect. method. Invoke (method. Java: 597)
Javax. xml. Bind. contextfinder. newinstance (contextfinder. Java: 132)
Javax. xml. Bind. contextfinder. Find (contextfinder. Java: 286)
Javax. xml. Bind. jaxbcontext. newinstance (jaxbcontext. Java: 372)
Javax. xml. Bind. jaxbcontext. newinstance (jaxbcontext. Java: 337)
Javax. xml. Bind. jaxbcontext. newinstance (jaxbcontext. Java: 244)
Com. aisino. Platform. util. rsutil. unmarshall (unknown source)
Com. aisino. Platform. Core. event. servicemgr. initialize (unknown source)
Com. aisino. Platform. Core. event. eventregistor. fireinitevent (unknown source)
Com. aisino. Platform. View. stub. B (unknown source)
Com. aisino. Platform. View. stub. initformbyservlet (unknown source)
Com.aisino.platform.view.html. htmlmaker. <init> (unknown source)
Com. aisino. Platform. View. servlet. initformservlet. doshowform (unknown source)
Com. aisino. Platform. View. servlet. initformservlet. doget (unknown source)
Javax. servlet. http. httpservlet. Service (httpservlet. Java: 617)
Javax. servlet. http. httpservlet. Service (httpservlet. Java: 717)
Com. aisino. Platform. util. securityfilter. dofilter (unknown source)

 

From the above error, we can probably see that the version of the jaxb-impl.jar is too low, needs 2.1 API. So I find the 2.1 package

 

Refer to this blog online and the jar package provided above:

Http://lxj8495138.javaeye.com/blog/338384

And

Http://queue19.javaeye.com/blog/418748

 

I follow the above method:

Test by yourself: </P> <p> JRE must be 1.6, tomcat5.5 JDK can be jdk1.5, JDK and JRE under the new endorsed folder, and put the jaxb-api.jar and jaxws-api.jar is useless, you must put these two jar packages into "tomcat5.5/common/endorsed" (if this folder is not available, it is created. If it is tomcat6.0, it is placed in "tomcat6.0/endorsed "), share two jar files .. </P> <p> test content: Self-made WebServices client accesses the WebServices server of Jax-ws </P> <p> test environment: myeclipse6.5 atat5.5 jre1.6 jdk1.5 (all may be 1.6) </P> <p>

But not after the test.

And I put the latest downloaded jar package directly under Project E:/jercy/tomcat6/tomcat6/webapps/helloword/WEB-INF/lib or not

 

 

I tested it again: jdk6.0.2 + myeclipse 6.5 + atat5.5

Jdk6.0.2 + myeclipse 7.5 + atat6.0

Both cases have the same effect.

 

It is certainly not a problem with myeclipse and tomcat.

 

Note: The above Tomcat fully installed version and Lite version have been tested. The same is true,

However, if you use the Tomcat release program that comes with myeclipse7.5, you will not encounter any errors!

 

 

The final method is as follows:

If both myeclipse and tomcat are reinstalled, the problem is JDK:

Use the endorsed directory mechanics to place jaxb-api.jar In the bootstrap classloader

 

At last, JDK is updated to the latest update17, or the JDK version is later installed,

No errors will occur after testing.

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.