天天看点

jdk1.6与cxf兼容问题

刚接手一个项目,包含使用cxf,启动tomcat时,后台报错:

Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:

nested exception is java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/ )。

后来上网查找,原来是JDK1.6与cxf的兼容性有问题升级到jdk1.6.0_14即可。

继续阅读