"IOException: Could not find classpath:/***.wsdl in the additional metadatafiles!" occurs when deploying a web service using 'wsdlLocation' on EAP 5.2.0 / SOA-P 5.3.1 + JBoss WS CXF

Solution Verified - Updated -

Issue

  • I tried to migrate our web services applications from SOA-P 5.3.0 (EAP 5.1.2) to 5.3.1 (5.2.0), but failed.
  • The way our packaging works is that we have, for example, example-ws.war and example-wsdl.jar. We package all the WSDL files in example-wsdl.jar and copy example-ws.war to $JBOSS_HOME/jboss-as/server/default/deploy and example-wsdl.jar to $JBOSS_HOME/jboss-as/common/lib.
  • Below is the sample code we use for defining a web service:
@WebService(... wsdlLocation = "classpath:/MySampleService.wsdl")
public class MySampleServiceImpl implements MySampleService {
  • This approach works in SOA-P 5.3.0 (EAP 5.1.2) but I get the following exception in 5.3.1 (5.2.0):
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/opt/jboss-soa-p-5.3.1/jboss-as/server/default/deploy/example-ws.war/
    at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1225)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
    at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
    at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
    at org.jboss.Main.boot(Main.java:229)
    at org.jboss.Main$1.call(Main.java:561)
    at org.jboss.Main$1.call(Main.java:557)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: java.io.IOException: Could not find classpath:/MySampleService.wsdl in the additional metadatafiles!
    at org.jboss.wsf.stack.cxf.DescriptorDeploymentAspect.checkCVE20122379(DescriptorDeploymentAspect.java:267)
    at org.jboss.wsf.stack.cxf.DescriptorDeploymentAspect.create(DescriptorDeploymentAspect.java:83)
    at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
    at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:76)
    at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60)
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
    ... 33 more
Caused by: java.io.IOException: Could not find classpath:/MySampleService.wsdl in the additional metadatafiles!
    at org.jboss.wsf.framework.deployment.ResourceResolverImpl.resolve(ResourceResolverImpl.java:121)
    at org.jboss.wsf.stack.cxf.DescriptorDeploymentAspect.checkCVE20122379(DescriptorDeploymentAspect.java:261)
    ... 39 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.2.0
  • Red Hat JBoss SOA Platform (SOA-P)
    • 5.3.1
  • JBoss WS CXF stack
    • 3.1.2.SP13

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