Thursday, March 4, 2010

Fixing JAXB LinkageError in JBoss with JDK 1.6

Struggled a bit to sort out the following issue which popped while trying to deploy a web service in Jboss booted with JDK 1.6

java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/liferay_portal/jboss-tomcat-4.2.3/server/default/tmp/deploy/tmp3673jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See at com.sun.xml.bind.v2.model.impl.ModelBuilder.( at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet( at com.sun.xml.bind.v2.runtime.JAXBContextImpl.( at com.sun.xml.bind.v2.ContextFactory.createContext( at com.sun.xml.bind.api.JAXBRIContext.newInstance(

To fix this need to copy the following jars from ${JBOSS_HOME}/client to ${JBOSS_HOME}/lib/endorsed:

* jaxb-api.jar
* jboss-jaxrpc.jar
* jboss-jaxws.jar
* jboss-jaxws-ext.jar (applies to 2.0.2 +)
* jboss-saaj.jar

Also if the following error occur when invoking the service .

12:50:28,718 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
at javax.xml.soap.SOAPMessage.setProperty(

Copy the above jars plus the following from ${JBOSS_HOME}/lib to ${JBOSS_HOME}/lib/endorsed:



Anonymous said...

Thank you very much ...
It worked like a charm ...
You saved my time ...

Keep it up !

Shiran said...

How can i fix this issue with JBoss 7

jeff said...

god I hate jboss

Anonymous said...

Great, it worked, took a day to finally see your post, thanks for sharing

Post a Comment