Spring framework in org.jboss.ws.cxf.jbossws-cxf-server pom file

Solution Unverified - Updated -

Issue

  • We need to introduce some specific configurations to a cxf web-service and it seems to be supported for Spring-based configuration only. These specific configurations include the following features that can be declared in Spring based configuration:

    • A lot of sts customizations that highly relies on Spring configuration.

The problem is that we don't use Spring at all, so there are only two places where we can potentially use it. We handle it just by adding dependencies for a cxf and spring in my ear/war archive and it works. We don't think it's the best solution since we have cxf module on fuse, so we would like to be able to use that module.

  • We tried to add the following into jboss-deployment-structure.xml (which is located in WEB-INF folder of my war archive):
<module name="org.jboss.ws.cxf.jbossws-cxf-server" slot="main"></module>
and
<module name="org.apache.cxf" slot="main"></module>

and we also added Spring dependencies to this archive (in lib folder) and it throws the following exception even though spring-beans jar placed in lib folder the my war:

Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser from [Module "org.apache.cxf:main" from local module loader @5d7f9a29

  • Can it cause any potential issues if we go the way it's working now (just putting cxf and spring dependencies into lib folder of our war archive)?
  • Do we need to install Spring module to handle the configurations ?
  • If we install Spring module - can it potentially cause any issues if we are using EJB stack... will it conflict somehow?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
  • Apache CXF
  • Spring
  • Maven

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content