Hi,
Instead of putting jars in the endorsed folder, could you try to put the
below jboss-app.xml in your $ear/META-INF to see if it works.
jboss-app.xml:
?xml version=1.0 encoding=UTF-8?
jboss-app
loader-repository
org.apache.cxf:loader=your ear name (such as spring_http.ear)
loader-repository-config
java2ParentDelegation=false
/loader-repository-config
/loader-repository
/jboss-app
Detail please refer to:
http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
Let me know if it works or not...
Thanks
Jeff
bastien.legras wrote:
After hours of bloody debugging /tracing through CXF code, I found the root
cause of my issue :
It has to do with my JBOSS 4.0.4 GA environment I forgot to mention :(
For the one who care, I wrote below a detailed explanation + solution
Detailed Explanation :
JAXBContext is already classloaded via jboss-j2ee.jar
(/server/default/lib) prior the one packaged with CXF (jaxb-api-2.0.jar).
Jboss's JABXBContext works fine for CXF as long as your JAX Beans are
packaged inside the web services application. But once you move your JAX
Beans outside the application, things changes in the JAXBEncoderDecoder :
line 388 (for CXF 2.0.2) :
obj = unmarshalWithClass ? u.unmarshal((XMLStreamReader)source, clazz) : u
return an object with null properties as the Unmarshaller is not the right
one as its implementor comes from Jboss instead of CXF.
Solution :
To fix the issue I found no other solution than copying the following jars
to JBOSS_HOME/lib/endorsed directory (server/default/lib is not enough) :
jaxb-api-2.0.jar
jaxb-impl-2.0.5.jar
geronimo-activation_1.1_spec-1.0-M1.jar
stax-api-1.0.1.jar
Hope this will help others !
Cheers,
Bastien LEGRAS