9 Replies Latest reply on Feb 20, 2013 1:35 PM by Sriks K

    Unresolved conflict on resource environment reference named: cxf

    Sam W Expert

      Hi

      I created a WAR application based on Spring 3.0.5 and CXF 2.4.1.

      When I deploy to JBOSS 6.0, it thrown the following exception:

       

       

      01:31:32,084 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfs:///usr/local/users/jboss/jboss6/server/default/deploy/order-ws-0.0.1-SNAPSHOT.war state=ClassLoader mode=Manual requiredState=PostClassLoader: org.jboss.deployers.spi.DeploymentException: Deployment error processing fragment for JAR: cxf-rt-transports-http-jetty-2.4.1.jar

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]

              at org.jboss.web.deployers.MergedJBossWebMetaDataDeployer.deploy(MergedJBossWebMetaDataDeployer.java:394) [:6.0.0.Final]

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]

              at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]

              at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]

              at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.0.0.Final]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]

              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_03-p4]

      Caused by: java.lang.IllegalStateException: Unresolved conflict on resource environment reference named: cxf

              at org.jboss.metadata.javaee.spec.ResourceEnvironmentReferencesMetaData.augment(ResourceEnvironmentReferencesMetaData.java:78) [:2.0.0.Alpha24]

       

      I think there is some libraries conflict between my WAR file and JBOSS. I have searched google, and could  not found a way to resolve it.

      Your suggestion is very appreciated.

       

      Thanks

      Sam

        • 1. Re: Unresolved conflict on resource environment reference named: cxf
          Sam W Expert

          I just found Jboss 7 is released.

          After compared its components between 6 and 7, I found that 7 does not as many components as 6.

          I would give 7 a try and see if CXF is still causing the problem.

          • 2. Re: Unresolved conflict on resource environment reference named: cxf
            Leon Doud Newbie

            Sam,

             

            I ran into this while debugging my first CXF service on JBoss.

             

            Are you using jbossws-cxf.xml?  If so, make sure you don't have the normal CXF imports, such as:


            <import resource="classpath:META-INF/cxf/cxf.xml" />

            <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />

            <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

             

            Good luck!

            Leon

            • 3. Re: Unresolved conflict on resource environment reference named: cxf
              Marcos Prado Newbie

              Hi Leon, i have the same problem. I've tried all the solutions i've read but with no result. I'll try to explain my environment:

               

              - JBoss 6.1.0-Final server

              - JBossWS without spring dependencies (i've tried also installing jbossws-cxf-bin-dist with -Dspring=true but with no result)

              - My app is a WAR with CXF 2.4.0 & spring 3.0.5.RELEASE dependencies (maven configuration) with scope "compile".

              - I've tried isolating the classloading configuration with this:

               

              jboss-web.xml

               

              <?xml version="1.0" encoding="UTF-8" ?>

              <jboss-web>

                 <class-loading java2ClassLoadingCompliance="false">

                    <loader-repository>

                       org.apache.cxf

                       <loader-repository-config>java2ParentDelegation=false</loader-repository-config>

                    </loader-repository>

                 </class-loading>

                        <context-root>/nim-ws</context-root>

              </jboss-web>

               

              jboss-classloading.xml

               

              <classloading xmlns="urn:jboss:classloading:1.0"

                  domain="org.apache.cxf:loader=nim-ws.war"

                  export-all="NON_EMPTY"

                  import-all="true">

              </classloading>

               

               

              My applicationContext.xml:

               

              <beans xmlns="http://www.springframework.org/schema/beans"

                        xmlns:context="http://www.springframework.org/schema/context"

                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"

                        xmlns:jee="http://www.springframework.org/schema/jee"

                        xmlns:jaxws='http://cxf.apache.org/jaxws'

                        xsi:schemaLocation="

              http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

              http://www.springframework.org/schema/context

              http://www.springframework.org/schema/context/spring-context-3.0.xsd

              http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd

              http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

               

                  <jee:jndi-lookup id="dataSource" jndi-name="java:jdbc/nim"/>

               

                  <jaxws:endpoint id="personaFisicaWS" implementor="#personaFisicaServiceWS" address="/personaFisicaWS"/>

               

              </beans>

               

              The implementor is like this:

               

              @WebService(endpointInterface = "test.ws.IPersonaFisicaService", serviceName = "personaFisicaWS")

              @Repository("personaFisicaServiceWS")

              public class PersonaFisicaServiceImpl implements IPersonaFisicaService {

               

                @Autowired

                        PersonaFisicaService personaFisicaService;

               

                @WebMethod

                public List<PersonaFisicaVo> obtenerPersonas() {

                   return personaFisicaService.getPersons();

                        }

              }

               

              I've also tried with or without jbossws-cxf.xml with the same result... any idea?

              • 4. Re: Unresolved conflict on resource environment reference named: cxf
                Alessio Soldano Master

                Generally speaking, if you're using JBoss AS 6 Final or 7 (which come with JBossWS-CXF stack by default), you should not embedd cxf libraries into your deployment (the reason being that Apache CXF is already available). If you really need to do that, you need some kind of classloading isolation, which I can't provide my suggestions on without performing some tests / debugging.

                In any case, AS6 and AS7 should behave differently here, due to the different classloading. AS7 should offer a better isolated environment by default due to the modular classloading, so achieving the required isolation might be easier.

                • 5. Re: Unresolved conflict on resource environment reference named: cxf
                  Marcos Prado Newbie

                  Thank you for your response, Alessio.

                   

                  As I've said, I've tried reinstallating JbossWS with -Dspring=true option and eliminating cxf and spring dependencies from my app.

                   

                  Now I'm having this exception because I suppose it has no visibility from the BaseClassloader to my war classloader (isolated or not):

                   

                  13:08:23,973 ERROR [AbstractKernelController] Error installing to Real: name=vfs:///D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/deploy/nim-ws.war state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/deploy/nim-ws.war

                            at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.2.GA]

                            at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]

                            at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0.Final]

                            at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

                            at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]

                            at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]

                            at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]

                            at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

                            at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]

                            at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]

                            at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]

                            at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]

                            at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]

                            at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]

                            at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]

                            at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.1.0.Final]

                            at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]

                            at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

                            at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

                            at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]

                  Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [vfs:/D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/deploy/nim-ws.war/WEB-INF/jbossws-cxf.xml]; nested exception is org.springframework.beans.FatalBeanException: Could not load class: test.ws.PersonaFisicaServiceImpl; nested exception is java.lang.ClassNotFoundException: test.ws.PersonaFisicaServiceImpl from BaseClassLoader@1675ec4{vfs:///D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/conf/jboss-service.xml}

                            at org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointDeploymentAspectDelegate.start(JMSEndpointDeploymentAspectDelegate.java:62) [:3.4.1.GA]

                            at org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointDeploymentAspect.start(JMSEndpointDeploymentAspect.java:51) [:3.4.1.GA]

                            at org.jboss.webservices.integration.deployers.WSDeploymentAspectDeployer.internalDeploy(WSDeploymentAspectDeployer.java:123) [:6.1.0.Final]

                            at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.2.GA]

                            ... 43 more

                  Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [vfs:/D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/deploy/nim-ws.war/WEB-INF/jbossws-cxf.xml]; nested exception is org.springframework.beans.FatalBeanException: Could not load class: test.ws.PersonaFisicaServiceImpl; nested exception is java.lang.ClassNotFoundException: test.ws.PersonaFisicaServiceImpl from BaseClassLoader@1675ec4{vfs:///D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/conf/jboss-service.xml}

                            at org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory.createBus(JBossWSSpringBusFactory.java:83) [:3.4.1.GA]

                            at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:131) [:2.3.1]

                            at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:121) [:2.3.1]

                            at org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointDeploymentAspectDelegate.start(JMSEndpointDeploymentAspectDelegate.java:56) [:3.4.1.GA]

                            ... 47 more

                  Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [vfs:/D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/deploy/nim-ws.war/WEB-INF/jbossws-cxf.xml]; nested exception is org.springframework.beans.FatalBeanException: Could not load class: test.ws.PersonaFisicaServiceImpl; nested exception is java.lang.ClassNotFoundException: test.ws.PersonaFisicaServiceImpl from BaseClassLoader@1675ec4{vfs:///D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/conf/jboss-service.xml}

                            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) [:3.0.3.RELEASE]

                            at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109) [:2.3.1]

                            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [:3.0.3.RELEASE]

                            at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131) [:2.3.1]

                            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [:3.0.3.RELEASE]

                            at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:122) [:3.0.3.RELEASE]

                            at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:262) [:2.3.1]

                            at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [:3.0.3.RELEASE]

                            at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) [:3.0.3.RELEASE]

                            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) [:3.0.3.RELEASE]

                            at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusApplicationContext.<init>(JBossWSBusApplicationContext.java:71) [:3.4.1.GA]

                            at org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory.createBus(JBossWSSpringBusFactory.java:78) [:3.4.1.GA]

                            ... 50 more

                  Caused by: org.springframework.beans.FatalBeanException: Could not load class: test.ws.PersonaFisicaServiceImpl; nested exception is java.lang.ClassNotFoundException: test.ws.PersonaFisicaServiceImpl from BaseClassLoader@1675ec4{vfs:///D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/conf/jboss-service.xml}

                            at org.apache.cxf.jaxws.spring.EndpointDefinitionParser.loadImplementor(EndpointDefinitionParser.java:161) [:2.3.1]

                            at org.apache.cxf.jaxws.spring.EndpointDefinitionParser.doParse(EndpointDefinitionParser.java:107) [:2.3.1]

                            at org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) [:3.0.3.RELEASE]

                            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) [:3.0.3.RELEASE]

                            ... 62 more

                  Caused by: java.lang.ClassNotFoundException: test.ws.PersonaFisicaServiceImpl from BaseClassLoader@1675ec4{vfs:///D:/NIM/java/Tools/jboss-6.1.0.Final/server/default/conf/jboss-service.xml}

                            at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.1.GA]

                            at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_23]

                            at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:236) [:2.3.1]

                            at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:222) [:2.3.1]

                            at org.apache.cxf.jaxws.spring.EndpointDefinitionParser.loadImplementor(EndpointDefinitionParser.java:158) [:2.3.1]

                            ... 72 more

                   

                  If it helps, my jbossws-cxf.xml is:

                   

                  <beans

                    xmlns='http://www.springframework.org/schema/beans'

                    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'

                    xmlns:beans='http://www.springframework.org/schema/beans'

                    xmlns:jaxws='http://cxf.apache.org/jaxws'

                    xsi:schemaLocation='http://www.springframework.org/schema/beans

                    http://www.springframework.org/schema/beans/spring-beans.xsd

                    http://cxf.apache.org/jaxws

                    http://cxf.apache.org/schemas/jaxws.xsd'>

                   

                    <jaxws:endpoint

                      id="personaFisicaWS"

                      address="/personaFisicaWS"

                      implementor="test.ws.PersonaFisicaServiceImpl">

                      <jaxws:invoker>

                        <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>

                      </jaxws:invoker>

                    </jaxws:endpoint>

                   

                  </beans>

                  • 6. Re: Unresolved conflict on resource environment reference named: cxf
                    Marcos Prado Newbie

                    Hello, I've tried undeploying JBossWS-CXF stack and deploying the JBossWS Native one. Now, in my maven project, I have all the CXF 2.4.0 & spring 3.0.5.RELEASE dependencies but I'm getting again the first exception indicated in this thread ("ERROR Unresolved conflict on resource environment reference named: cxf [...] Deployment error processing fragment for JAR: cxf-rt-bindings-soap-2.4.0.jar")

                     

                    It's very strange because i've searched all the Jboss server folder but the only reference is in my own war (neither in /common/lib nor /server/default/lib). This is really driving me nuts!

                     

                    @Leon Doud: I've removed the imports you say in my applicationContext.xml

                    • 7. Re: Unresolved conflict on resource environment reference named: cxf
                      Leon Doud Newbie

                      Marcos,

                       

                      Sounds like you running with the JBoss WS Native installed on the server now, and CXF dependencies in your war.  If that is so you probably need to put your imports back into your applicationContext.xml.  Sorry I can't offer any more suggestions as I've haven't used this configuration before.

                       

                      Leon

                      • 8. Re: Unresolved conflict on resource environment reference named: cxf
                        Marcos Prado Newbie

                        Thank you all, now I got the solution (it was yesterday late so I couldn't post it).

                         

                        After all, I isolated again the classloading but I needed one more step:

                         

                        My app is a war so i put this on my /WEB-INF (if you have it in an EAR you have to put it in the EAR's META-INF)

                         

                        /WEB-INF/jboss.classloading.xml

                         

                        <?xml version="1.0" encoding="UTF-8" ?>
                        <classloading xmlns="urn:jboss:classloading:1.0"

                                            domain="nim-ws.war"

                                            export-all="NON_EMPTY"

                                            import-all="true">

                        </classloading>

                         

                        to isolate the classloading. Then, I needed also this:

                         

                        /WEB-INF/jboss-scanning.xml

                         

                        <?xml version="1.0" encoding="UTF-8"?>

                        <scanning xmlns="urn:jboss:scanning:1.0">

                                               <path name="WEB-INF/classes"/>

                                               <path name="WEB-INF/lib/jaxb-xjc-2.1.13.jar">

                                                              <exclude name="" recurse="true"/>

                                               </path>

                        </scanning>

                         

                        'cause this library was in conflict and this tells jboss not to scan it. More info at the end of this thread http://community.jboss.org/thread/160615

                         

                        Hope this help anyone else

                        • 9. Re: Unresolved conflict on resource environment reference named: cxf
                          Sriks K Newbie

                          Thanks for the solution,Marcos Prado. I got rid off that issue for now