1 2 Previous Next 17 Replies Latest reply on Jul 22, 2013 7:01 AM by mbsakho

    Migrating secured WS from JBoss 5.1 to 7.1.1

    xdury

      Hi,

       

      I've been migrating one of our projects from JBoss 5.1 to 7.1.1, all was done without too much problems but I'm stuck on the security configuration for a Web Service (which does not have WS-Security Policy):

       

      In JBoss 5.1, configuring WS-Security was done within the file "META-INF/jboss-wsse-server.xml"

       

      <jboss-ws-security>

        <key-store-file>${wsse.keystore}</key-store-file>

                <key-store-type>jks</key-store-type>

                <key-store-password>${wsse.keystore.password}</key-store-password>

        <trust-store-file>${wsse.truststore}</trust-store-file>

                <trust-store-type>jks</trust-store-type>

                <trust-store-password>${wsse.truststore.password}</trust-store-password>

        <config>

          <timestamp ttl="3000" />

          <sign type="x509v3" alias="${wsse.keystore.alias}" />

          <requires>

            <timestamp maxAge="3000" />

            <signature />

          </requires>

        </config>

      </jboss-ws-security>

       

      So, I just need requests and responses to be signed and timestamped but I have a hard time understanding how to achieve this in AS7.1.1.

       

      I've read the page https://docs.jboss.org/author/display/JBWS/WS-Security, but it didn't help.

       

      Do I need to configure this via jbossws-cxf.xml? (tried this but seems to be ignored)

      Is it available out-of-the-box in JBoss AS7.1.1? (I see  spring is being used but there are no spring jars in the distribution)

       

      I must be missing something...

       

      Thanks,

       

      Xavier

        • 1. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
          xdury

          Ok, I installed the last version of JBossWS with -Dspring=true.

           

          Now, jbossws-cxf.xml seems to be read but there's a problem with the schema validation:

           

          14:47:11,737 WARN  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-7) Ignored XML validation warning: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 30; columnNumber: 145; schema_reference.4: Failed to read schema document 'http://cxf.apache.org/schemas/configuration/cxf-beans.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

                    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:97) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:2525) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1834) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:1755) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:905) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:559) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:554) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2526) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:724) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285) [xercesImpl-2.9.1-jbossas-1.jar:]

                    at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) [spring-beans.jar:3.0.7.RELEASE]

                    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) [spring-beans.jar:3.0.7.RELEASE]

                    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans.jar:3.0.7.RELEASE]

                    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans.jar:3.0.7.RELEASE]

                    at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:190) [jbossws-cxf-server.jar:4.1.0.Final]

                    at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:138) [jbossws-cxf-server.jar:4.1.0.Final]

                    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:129) [jbossws-cxf-server.jar:4.1.0.Final]

                    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:68) [jbossws-cxf-server.jar:4.1.0.Final]

                    at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74) [jbossws-jboss711-server-integration.jar:4.1.0.Final]

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

           

           

          14:47:11,792 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.subunit."myproject.ear"."my_webservice.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myproject.ear"."my_webservice.jar".INSTALL: Failed to process phase INSTALL of subdeployment "my_webservice.jar" of deployment "myproject.ear"

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

          Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 106 in XML document from resource loaded through InputStream is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.

                    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)

                    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)

                    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)

                    at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:190)

                    at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:138)

                    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:129)

                    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:68)

                    at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                    ... 5 more

          Caused by: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.

                    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)

                    at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)

                    at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:390)

                    at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2514)

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1393)

                    at org.apache.xerces.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(XSDAttributeGroupTraverser.java:77)

                    at org.apache.xerces.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:583)

                    at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(XSDComplexTypeTraverser.java:1071)

                    at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:776)

                    at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:262)

                    at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(XSDComplexTypeTraverser.java:134)

                    at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:366)

                    at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:237)

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1255)

                    at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:569)

                    at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:554)

                    at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2526)

                    at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813)

                    at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:724)

                    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)

                    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)

                    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

                    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)

                    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)

                    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)

                    at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)

                    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)

                    at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)

                    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)

                    ... 13 more

          • 2. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
            xdury

            The cxf-beans.xsd was loaded from the network instead as a classpath resource so I rolled back the installation of the latest jbossws (4.1.0) and just kept the spring module... now, it's working.

            • 3. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
              mbsakho

              Hi Xavier,

              I'm facing to the same problem about the cxf-beans.xsd being loaded from the network.

              What do you mean by "rolling back the installation of the latest jbossws"? Have you removed the entire jboss-cxf jars in the cxf module and replaced them with the ones from cfx?

              Thank you in advance,

              Massai

              • 4. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                xdury

                Hi Massai,

                 

                I kept the WS stack which comes with 7.1.1 and only added the needed spring jars (module) to my jboss install. If you update the whole WS stack (like I did first), the xsd is loaded from the network.

                 

                Xavier

                • 5. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                  asoldano

                  I previously missed this thread, sorry. So, at first sight it looks like there migth be a bug with xsd resolution on 4.1.0, so Xavier can you perhaps share the jbossws-cxf.xml you were using, so that I can try reproducing the problem? Thanks!

                  • 6. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                    xdury

                    Here you are.

                    • 7. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                      mbsakho

                      Xavier,

                      Now that it's working for you, can you also share you web.xml file?

                      I'm still having a doubt about what to be declared there (no CXF servlet and no spring context loader listener?)

                       

                      thank you in advance.

                      Massai

                      • 8. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                        xdury

                        Hi Massai,

                         

                        Unfortunately, I don't have any web.xml to share as my WebServices are EJBs.

                         

                        Xavier

                        • 9. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                          mbsakho

                          Hi Xavier,

                          It' almost ok for me right now.

                          My application is deployed and loaded correctly?

                          I'm having trouble to about my web service ulr but I think I'll soon find it?

                          Thank you very much.

                          Massai.

                          • 10. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                            xdury

                            Hi,

                             

                            I'm facing the same problem since I migrated to JBoss EAP 6.1 (AS7.2). We are behind a proxy and our JBoss instances cannot access internet and thus fail to load the cxf xml schema:

                             

                            09:09:17,334 WARN  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-6) Ignored XML validation warning: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 30; columnNumber: 145; schema_reference.4: Failed to read schema document 'http://cxf.apache.org/schemas/configuration/cxf-beans.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
                                 at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
                                 at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) [spring-beans.jar:3.0.7.RELEASE]
                                 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) [spring-beans.jar:3.0.7.RELEASE]
                                 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans.jar:3.0.7.RELEASE]
                                 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans.jar:3.0.7.RELEASE]
                                 at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:188) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
                                 at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:136) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
                                 at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
                                 at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
                                 at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74) [jboss-as-webservices-server-integration-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                                 at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
                                 at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
                                 at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
                                 at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
                            
                            
                            09:09:17,373 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.subunit."myear.ear"."myejb.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myear.ear"."myejb.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "myejb.jar" of deployment "myear.ear"
                                 at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                                 at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
                                 at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
                                 at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
                            Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 106 in XML document from resource loaded through InputStream is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.
                                 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
                                 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
                                 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
                                 at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:188)
                                 at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:136)
                                 at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)
                                 at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)
                                 at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
                                 at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
                                 ... 5 more
                            Caused by: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.
                                 at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
                                 at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
                                 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
                                 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown Source)
                                 at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
                                 at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
                                 at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
                                 at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
                                 at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
                                 at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
                                 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                                 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                                 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                                 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                                 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                                 at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
                                 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
                                 at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
                                 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
                                 ... 13 more
                            
                            • 11. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                              xdury

                              I added a jboss-deployment-structure.xml in my ear like this:

                              <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
                                  <sub-deployment name="myejb.jar">
                                      <dependencies>
                                          <module name="org.apache.cxf" slot="main" >
                                              <imports>
                                                  <include path="META-INF**" />
                                                  <include path="org**" />
                                                  <include path="schemas**" />
                                              </imports>
                                          </module>
                                          <module name="org.apache.ws.security" />
                                      </dependencies>
                                  </sub-deployment>
                              </jboss-deployment-structure>

                              and now I get a NoClassDefFoundError on javax.servlet.ServletException:

                              11:00:43,748 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/context].[MyWebService]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet
                              .service() for servlet PunctualDataWebService threw exception: java.lang.NoClassDefFoundError: javax/servlet/ServletException
                                      at org.jboss.wsf.stack.cxf.Messages_$bundle.cannotObtainDestinationFor(Messages_$bundle.java:353)
                                      at org.jboss.wsf.stack.cxf.RequestHandlerImpl.findDestination(RequestHandlerImpl.java:168)
                                      at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:85)
                                      at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156)
                                      at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
                                      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:225)
                                      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:150)
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
                                      at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
                                      at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
                                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
                                      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
                                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
                                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
                                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
                                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
                                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
                                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
                                      at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
                              • 12. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                                xdury

                                Ok, that was this bug: https://issues.jboss.org/browse/JBWS-3602 (my endpoint url was not the same in jbossws-cxf.xml and jboss-webservices.xml).

                                 

                                But I still don't understand why I need a jboss-deployment-structure.xml so that the cxf XSD can be loaded from the classpath...

                                • 13. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                                  mbsakho

                                  It sound strange to me too.

                                  I'm planning to migrate to jboss EAP 6.1 too and I hope that everything will be ok.

                                  Massai

                                  • 14. Re: Migrating secured WS from JBoss 5.1 to 7.1.1
                                    xdury

                                    I created a JIRA issue for that: https://issues.jboss.org/browse/JBWS-3650

                                    1 2 Previous Next