2

I am using Eclipse Juno v4.2 R2, an eclipse-internal GlassFish 3.1.2 (had the same problem with 3.1.2.2 before) and Apache CXF 2.7.1, trying to implement RESTful web services via JAX-RS. While the GlassFish server was starting up and deployment of the application was successful, the application cannot be deployed anymore since I restarted the IDE. When Eclipse tried to publish the application on GlassFish, I keep getting this error:

Severe: wsdl file classpath:/org/apache/cxf/ws/discovery/wsdl/wsdd-discovery-1.1-wsdl-os.wsdl does not exist for web service Discovery
Severe: Exception while deploying the app [MyFunnyApp]
Severe: wsdl file classpath:/org/apache/cxf/ws/discovery/wsdl/wsdd-discovery-1.1-wsdl-os.wsdl does not exist for web service Discovery
java.lang.RuntimeException: wsdl file classpath:/org/apache/cxf/ws/discovery/wsdl/wsdd-discovery-1.1-wsdl-os.wsdl does not exist for web service Discovery
    at com.sun.enterprise.deployment.util.ModuleContentValidator.accept(ModuleContentValidator.java:196)
    at com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1999)
    at com.sun.enterprise.deployment.archivist.WebArchivist.postOpen(WebArchivist.java:284)
    at com.sun.enterprise.deployment.archivist.WebArchivist.postOpen(WebArchivist.java:89)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:245)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:252)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:185)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:827)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:769)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)


Severe: Exception while deploying the app [MyFunnyApp] : wsdl file classpath:/org/apache/cxf/ws/discovery/wsdl/wsdd-discovery-1.1-wsdl-os.wsdl does not exist for web service Discovery

Does anyone know what is causing this error?

5
  • why r u tying to use CXF with REST? you don't know to use it in order to make web services, Have u tried to edit the web.xml ? Mar 6, 2013 at 16:42
  • I'm using CXF as a JPA implementation, so that info might have been misleading. I didn't touch the web.xml since it got created automatically by Eclipse and it worked before I restarted the IDE. Mar 6, 2013 at 16:57
  • check this out: vogella.com/articles/REST/article.html Mar 6, 2013 at 17:19
  • CXF as JPA implementation Ô_o. You missed something. And yes you can use CXF with REST you both should have a look here cxf.apache.org
    – Gab
    Mar 6, 2013 at 23:10
  • Happens to me also with SOAP services
    – Marco
    May 27, 2013 at 21:15

1 Answer 1

4

So far my solution to this problem has been to follow the suggestion found here: http://osdir.com/ml/users-cxf-apache/2012-12/msg00046.html

I've moved the following JARs from the CXF lib/ directory:

cxf-services-ws-discovery-api-2.7.4.jar cxf-services-ws-discovery-service-2.7.4.jar cxf-services-wsn-api-2.7.4.jar cxf-services-wsn-core-2.7.4.jar

Then I've refreshed the CXF library on the build path tab of the Eclipse project (Remove the library then add it again, check that there are no cxf-services-ws-discovery-* and cxf-services-wsn-* JARs).

With this new CXF JARs creation and deployment of both client and service work. I've just tried it with CXF 2.7.4 (CXF 2.7.5 has even bigger problems with Eclipse 4.2... Java2Ws stops immediately...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.