"JBAS018733: org.xml.sax.SAXParseException" intermittently when deploying application with JAX-WS endpoints

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Platform (EAP)
    • 6.x

Issue

Getting the following error intermittently during deployment of my application:

JBAS018733: Failed to process phase INSTALL of subdeployment "test-web.war" of deployment "test.ear":
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
    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:1145) [rt.jar:1.7.0_65]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: java.lang.RuntimeException: JBWS024076: Service {urn:test}TestErvice, cannot publish wsdl to: /opt/app/jboss/jboss-eap-6.1/standalone/data/wsdl/test.ear/test-web.war/my-wsdl.wsdl
    at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:105)
    at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:131)
    at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:71)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:250)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:536)
    at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116)
    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.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
    ... 5 more
Caused by: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 591; columnNumber: 78; XML document structures must start and end within the same entity.
    at org.jboss.ws.common.DOMUtils.parse(DOMUtils.java:274)
    at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:247)
    at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:248)
    at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:248)
    at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:248)
    at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:253)
    at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:257)
    at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:92)
    ... 14 more

Required parameters for issue:

  • An .ear with multiple subdeployments that have at least one JAX-WS endpoint
  • WSDL files must be under WEB-INF/classes
  • Each WSDL must reference external schemas using the relative .. syntax, e.g. schemaLocaion="../schemas/my-schema.xsd"

Resolution

Move WSDL and schema files under WEB-INF/wsdl. This will require changes to the @WebService(wsdlLocation="...") attribute for each endpoint.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments