Does RESTServiceDiscovery work in WildFly?
jensaug May 14, 2014 9:43 AMHello RESTeasy folks!
I'm trying to find a working example with RESTful atomic links using RESTServiceDiscovery to work in WildFly (8.1.0.CR2) - does anyone have such a working example?
I've failed trying to produce my own. I've added a Maven dependency to resteasy-links...
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-links</artifactId>
<version>3.0.8.Final</version>
</dependency>
...assuming 3.0.8.Final since other resteasy libs in module path of WildFly 8.1.0.CR2 are of this version. My Forge/JPA/AngularJS/RestEasy WAR example compiles and is built nicely, but my web app won't start because...
14:59:02,936 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (MSC service thread 1-5) Deploying javax.ws.rs.core.Application: class com.example.angulizr.rest.JaxRsActivator$Proxy$_$$_WeldClientProxy
14:59:02,941 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./angulizr: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./angulizr: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
Caused by: java.lang.RuntimeException: Could not find constructor for class: org.jboss.resteasy.core.AsynchronousDispatcher
at org.jboss.resteasy.spi.metadata.ResourceBuilder.constructor(ResourceBuilder.java:683)
If I make resteasy-links <scope>provided</scope> I'll get a ClassNotFoundException for the RESTServiceDiscovery.class in run-time.
My goal is to turn some JPA entity Collection references into atomic links when leaving the REST API. This is suppose to work according to documentation (and unit test).
br,
Jens