报错现象:
Exception in thread "main" java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/javaLib/cxf_all_jar/jaxb-impl-2.2.1.1.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
问题原因:
在JDK6之后,都自带了JAXB工具,所以在jdk类库与tomcat WEBAPP类库之间,会造成冲突。
解决办法:
删除webapp下WEB-INF/lib下的jaxb-api-2.1.jar和jaxb-impl-2.1.12.jar。
如果jdk没有endorsed文件夹 加之 将jaxb-api-2.1.jar拷入
转载请注明出处:http://www.cnblogs.com/likehua/archive/2011/05/25/2057377.html