Hi,
When CXF loads, from what I understand, it scas that classpath for
extensions. Is there a way to control extension loading?
The reason I want to do this is because I want to use CXF 2.2.6 in the
Geronimo 2.2 app server. Geronimo already includes CXF 2.1.4. Therefore,
in a geronimo-specific deployment descriptor (geronimo-web.xml) I "hide"
the geronimo-bundled CXF so that the one from WEB-INF/lib is used. This
is done by specifying the following in geronimo-web.xml:
<sys:hidden-classes>
<sys:filter>org.springframework</sys:filter>
<sys:filter>org.apache.cxf</sys:filter>
</sys:hidden-classes>
Unfortunalely, there's a geronimo extension to CXF (see
http://repo2.maven.org/maven2/org/apache/geronimo/modules/geronimo-cxf/2.2/geronimo-cxf-2.2.pom)
that gets detected (via the META-INF/cxf/cxf-extension-geronimo.xml) and
CXF tries to load it. Ultimately this ends up in invoking code loaded
from Geronimo's class loader that is linked against Geronimo's CXF
(2.1.4) and causes class definition mismatches (see stacck trace at end
of this e-mail).
So, is there a way to tell CXF to ignore a specific extension while
scanning its classpath?
Here's the stack trace I get:
---------------------------------------------------------------------------------
2010-02-20 19:08:05,050 WARN [SpringBusFactory] Initial attempt to
crate application context was unsuccessful.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'org.apache.cxf.resource.ResourceManager'
defined in class path resource
[META-INF/cxf/cxf-extension-geronimo.xml]: Unsatisfied dependency
expressed through constructor argument with index 0 of type
[java.util.List]: Could not convert constructor argument value of type
[java.util.ArrayList] to required type [java.util.List]: Failed to
convert value of type [java.util.ArrayList] to required type
[java.util.List]; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type
[org.apache.cxf.resource.ClasspathResolver] to required type
[org.apache.cxf.resource.ResourceResolver]: no matching editors or
conversion strategy found
...
Caused by:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'org.apache.cxf.resource.ResourceManager'
defined in class path resource
[META-INF/cxf/cxf-extension-geronimo.xml]: Unsatisfied dependency
expressed through constructor argument with index 0 of type
[java.util.List]: Could not convert constructor argument value of type
[java.util.ArrayList] to required type [java.util.List]: Failed to
convert value of type [java.util.ArrayList] to required type
[java.util.List]; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type
[org.apache.cxf.resource.ClasspathResolver] to required type
[org.apache.cxf.resource.ResourceResolver]: no matching editors or
conversion strategy found
at
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:565)
....
---------------------------------------------------------------------------------