天天看點

cxf與jdk1.6相容問題

Caused by: java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (Seehttp://java.sun.com/j2se/1.6.0/docs/guide/standards/)

這是cxf和jdk的jar包有沖突引起的!

首先在JDK的lib目錄下建立endorsed目錄(如果存在就不需要建立了)

然後把2.2的jaxb.jar 拷貝endorsed目錄下,問題解決。