Grails app jaxb LinkageError problem since build 9920

I've been experiencing the following problem when launching my Grails 1.0.5 application since IDEA build 9902. IDEA release 8.1.3 (build 9886) and earlier work fine, and I can still launch my app from the command line. I only have a problem when launching from within IDEA in builds 9920 and 9939. Here is the error that I see with build 9939:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in URL [jar:file:/C:/dev/AgileMark.svn.work/lib/cxf-2.1.6.jar!/META-INF/cxf/cxf.fixml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw exception; nested exception is java.lang.LinkageError: JAXB 2.0 API jar is being loaded (from jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%209939/lib/javaee.jar!/javax/xml/bind/annotation/XmlSchema.class), but this RI (from jar:file:/C:/dev/AgileMark.svn.work/lib/jaxb-impl-2.1.9.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) requires JAXB 2.1 API jar.

The message indicates that an old version of JAXB is being loaded from the IntelliJ provided javaee.jar instead of the jaxb jars that are located in my Grails app/lib directory.

I receive a less specific error from build 9920:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usaDataSoapPort': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in URL [jar:file:/C:/dev/AgileMark.svn.work/lib/cxf-2.1.6.jar!/META-INF/cxf/cxf.fixml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder

Is there a work around for my problem?

Please sign in to leave a comment.