Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3959

schema import failure - JBWS022092: Could not resolve vfs%3A/content...

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jbossws-cxf-5.1.1.Final
    • jbossws-cxf-5.1.0.Final
    • None
    • None

      The importing XSD file in a same jar can't be resolved during WSDL publishing. I hit this issue on WildFly10 CR4/JBossWS 5.1.0.Final, and this sample application is working fine on EAP6/WildFly8.0.
      On EAP6/WildFly8.0, the xsd path starts with "vfs:/content" at ResourceResolverImpl#resolve(), but on WF10 it's "vfs%3A/content". It seems like the required decode ("%3A"=>":") is not processed for the XSD path.

      [0m[31m16:39:41,215 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."switchyard-demo-library-2.1.0-SNAPSHOT.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."switchyard-demo-library-2.1.0-SNAPSHOT.jar".SwitchYardService: org.switchyard.component.soap.WebServicePublishException: java.lang.RuntimeException: JBWS024076: Service {urn:switchyard-quickstart-demo:library:1.0}SuggestionService, cannot publish wsdl to: /home/tomo/workspace/SwitchYard/switchyard/release/jboss-as7/wildfly/dist/target/jboss-switchyard/wildfly-10.0.0.CR4/standalone/data/wsdl/suggestion.deployment/vfs%3A/content/switchyard-demo-library-2.1.0-SNAPSHOT.jar/META-INF/SuggestionService.wsdl
      
      ..... (snip) .....
      
      Caused by: java.lang.RuntimeException: JBWS024076: Service {urn:switchyard-quickstart-demo:library:1.0}SuggestionService, cannot publish wsdl to: /home/tomo/workspace/SwitchYard/switchyard/release/jboss-as7/wildfly/dist/target/jboss-switchyard/wildfly-10.0.0.CR4/standalone/data/wsdl/suggestion.deployment/vfs%3A/content/switchyard-demo-library-2.1.0-SNAPSHOT.jar/META-INF/SuggestionService.wsdl
              at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:113)
              at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:148)
              at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:85)
              at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
              at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:543)
              at org.jboss.wsf.stack.cxf.configuration.BusHolder.configure(BusHolder.java:231)
              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:97)
              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:59)
              at org.jboss.ws.common.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:118)
              at org.jboss.as.webservices.publish.EndpointPublisherImpl.doDeploy(EndpointPublisherImpl.java:163)
              at org.jboss.as.webservices.publish.EndpointPublisherImpl.publish(EndpointPublisherImpl.java:114)
              at org.jboss.as.webservices.publish.EndpointPublisherImpl.publish(EndpointPublisherImpl.java:107)
              at org.switchyard.as7.extension.ws.JBossWSEndpoint.publish(JBossWSEndpoint.java:103)
              at org.switchyard.as7.extension.ws.JBossWSEndpointPublisher.publish(JBossWSEndpointPublisher.java:89)
              ... 11 more
      Caused by: java.io.IOException: JBWS022092: Could not resolve vfs%3A/content/switchyard-demo-library-2.1.0-SNAPSHOT.jar/META-INF/LibraryTypes.xsd in deployment suggestion.deployment
              at org.jboss.ws.common.deployment.ResourceResolverImpl.resolve(ResourceResolverImpl.java:128)
              at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:234)
              at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:259)
              at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:263)
              at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:98)
              ... 24 more
      

            [JBWS-3959] schema import failure - JBWS022092: Could not resolve vfs%3A/content...

            Verified it works fine - thanks for the quick fix!

            tomohisa igarashi added a comment - Verified it works fine - thanks for the quick fix!

            OK, I should have fixed the issue with commit https://github.com/jbossws/jbossws-cxf/commit/437440a42eb4ce163f94df92778b88144d508e0c .
            Please note we'll likely need to revisit this piece of integration when the VFS will be removed from WildFly (which might happen in the next future).

            Alessio Soldano added a comment - OK, I should have fixed the issue with commit https://github.com/jbossws/jbossws-cxf/commit/437440a42eb4ce163f94df92778b88144d508e0c . Please note we'll likely need to revisit this piece of integration when the VFS will be removed from WildFly (which might happen in the next future).

            well, then I really need to try the SwitchYard app and figure out how to get it back working. The change that is affecting you is most likely this https://github.com/jbossws/jbossws-cxf/commit/fcf95cb4c718187945074eab0e1ea15193d7b1db , which was a fix to JBWS-3941 / JBEAP-857.
            Will work on this next week.

            Alessio Soldano added a comment - well, then I really need to try the SwitchYard app and figure out how to get it back working. The change that is affecting you is most likely this https://github.com/jbossws/jbossws-cxf/commit/fcf95cb4c718187945074eab0e1ea15193d7b1db , which was a fix to JBWS-3941 / JBEAP-857 . Will work on this next week.

            Tried cherry-picking it over 5.1.0.Final and replaced jbossws-cxf-server jar, then I got this

            JBWS022092: Could not resolve content/switchyard-demo-library-2.1.0-SNAPSHOT.jar/LibraryTypes.xsd in deployment
            

            vfs:/ is ommitted? I guess vfs:/ is needed to resolve this file via ClassLoader#getResource()

            tomohisa igarashi added a comment - Tried cherry-picking it over 5.1.0.Final and replaced jbossws-cxf-server jar, then I got this JBWS022092: Could not resolve content/switchyard-demo-library-2.1.0-SNAPSHOT.jar/LibraryTypes.xsd in deployment vfs:/ is ommitted? I guess vfs:/ is needed to resolve this file via ClassLoader#getResource()

            mmmh... I've just spotted something in the code that might be the culprit, perhaps you can try pulling this fix: https://github.com/jbossws/jbossws-cxf/commit/e109e4daa84a68b0b6db2e7864b7e0e5398f2c4e ?

            Alessio Soldano added a comment - mmmh... I've just spotted something in the code that might be the culprit, perhaps you can try pulling this fix: https://github.com/jbossws/jbossws-cxf/commit/e109e4daa84a68b0b6db2e7864b7e0e5398f2c4e ?

            Here is the application, but it's a SwitchYard application and need to setup SwitchYard on top of EAP/WildFly. Plus WildFly10 support is still under development.
            https://github.com/jboss-switchyard/switchyard/tree/master/quickstarts/demos/library

            This is the WSDL file importing LibraryTypes.xsd:
            https://github.com/jboss-switchyard/switchyard/blob/master/quickstarts/demos/library/src/main/resources/META-INF/SuggestionService.wsdl

            And the LibraryTypes.xsd is in same path:
            https://github.com/jboss-switchyard/switchyard/blob/master/quickstarts/demos/library/src/main/resources/META-INF/LibraryTypes.xsd

            Does it help?

            tomohisa igarashi added a comment - Here is the application, but it's a SwitchYard application and need to setup SwitchYard on top of EAP/WildFly. Plus WildFly10 support is still under development. https://github.com/jboss-switchyard/switchyard/tree/master/quickstarts/demos/library This is the WSDL file importing LibraryTypes.xsd: https://github.com/jboss-switchyard/switchyard/blob/master/quickstarts/demos/library/src/main/resources/META-INF/SuggestionService.wsdl And the LibraryTypes.xsd is in same path: https://github.com/jboss-switchyard/switchyard/blob/master/quickstarts/demos/library/src/main/resources/META-INF/LibraryTypes.xsd Does it help?

            Any chance you can provide a reproducer for this or better clarify what you mean with "The importing XSD file in a same jar" condition and hence how should I build up a deployment jar to reproduce the issue?

            Alessio Soldano added a comment - Any chance you can provide a reproducer for this or better clarify what you mean with "The importing XSD file in a same jar" condition and hence how should I build up a deployment jar to reproduce the issue?

              rhn-support-asoldano Alessio Soldano
              toigaras@redhat.com tomohisa igarashi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: