Application Server Specific Configuration Guide

This document provides app server-specific configuration information for running Apache CXF.

JBoss

If you package the war in the ear, you might need to add the jboss specific file (jboss-app.xml) in the $EAR/META-INF folder to config the classloader.

<?xml version="1.0" encoding="UTF-8"?>
<jboss-app>
	<loader-repository>
		apache.cxf:loader=spring_http.ear
		<loader-repository-config>
			java2ParentDelegation=false
		</loader-repository-config>
	</loader-repository>
</jboss-app>

If you are coming across LinkageErrors involving the QName class, try repackaging the stax-api jar without the javax.xml.namespace.QName class.  (In JBoss 4.0.5GA at least) a conflicting version of this class is included in JBoss's lib and lib/endorsed directories.  This was the only way I could get CXF working in my environment.

WebLogic

There are two ways to deploy a CXF WAR archive in WebLogic. (Note: This has been validated on WebLogic9.2.)

Put jars in endorsed folder

Pack war in an ear, deploy the ear with weblogic-application.xml

Websphere

Currently, I've only found the endorsed way to make cxf work with websphere. (Note: this has been validated against Websphere6.1.0.0)

put jar in the endorsed folder

And then restart the Websphere server. (Because we changed the endorsed folder, we need to restart it to make it effect).

Please make sure your classpath doesn't have the servlet-2.5 library, since WebSphere6.1 is servlet-2.4 compliant!

OC4J

I got CXF working in OC4J by ignoring Oracle's XML parser and adding the Xerces parser libs as shared libraries, and by performing the QName hack above.

Resources

Utilizing the OC4J Class Loading Framework
Deploy XFire in WebLogic
Understanding WebLogic ClassLoader
JBoss Class Configuration