Tomcat JAXB 1 and 2 linkage error
I'm running a tomcat 6, spring, apache cxf webservice,开发者_高级运维 know it is a must to add one third party library to my webapp to fulfill an order.
I have jaxb-impl-2.1.12.jar for apache cxf in WEB-INF/lib folder and the new library which contains the JAXB 1.0 runtime.
JAXB 2 ist used by apache cxf for dynamic clients (i need them).
So is there a possibility to run the webapps with both libraries?
Error:
Caused by: java.lang.LinkageError: You are trying to run JAXB 2.0 runtime but you have old JAXB 1.0 runtime earlier in the classpath. Please remove the JAXB 1.0 runtime for 2.0 runtime to work correctly.
The JAXB2 reference implementation contains a backward-compatibility library for JAXB1, called jaxb1-impl.jar
. You need to track down that JAR from the same place you got jaxb-impl-2.1.12.jar
.
If you just drop the old JAXB1 JAR in alongside JAXB2, it will fail in the manner you describe.
精彩评论