Resteasy get only 404 and no Logging
mostart Jan 16, 2015 7:47 AMI have a very simple RESTeasy example running wildfly 8.2 on Mac.
It contains only two classes:
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("/")
public class RestApp extends Application {
}
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/test")
@Stateless
@LocalBean
public class TestTheRest extends Application {
@GET
@Produces({MediaType.APPLICATION_JSON})
public Response getBookingDetails() {
String hello = "Hi";
return Response.ok(hello).build();
}
}
EDIT: I also have the problem when running the javaee7 example rest enpoint: javaee7-samples/jaxrs/jaxrs-endpoint at master · javaee-samples/javaee7-samples · GitHub
Browsing to /warname gives me "forbidden" which should be ok while trying with "/warname/test" will return a 404 not found. Also in the server.log i can see just nothing when making requests ??
Looks as if the Resource Annotations are not scanned at all ? Wish I had some logging at least.
Any idea ?
[0m [0m19:03:54,777 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017534: Registered web context: /logicshop
[0m [0m19:03:54,814 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "logicshop.war" (runtime-name : "logicshop.war")
[0m [0m19:03:54,823 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
[0m [0m19:03:54,823 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
[0m [0m19:03:54,823 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 3018ms - Started 262 of 317 services (92 services are lazy, passive or on-demand)
[0mConnected to server
[2015-01-15 07:03:54,836] Artifact logicshop: Artifact is being deployed, please wait...
[0m19:03:54,899 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017535: Unregistered web context: /logicshop
[0m [0m19:03:54,918 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.3.Final
[0m [0m19:03:54,966 INFO [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015877: Stopped deployment logicshop.war (runtime-name: logicshop.war) in 71ms
[0m [0m19:03:55,013 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS018558: Undeployed "logicshop.war" (runtime-name: "logicshop.war")
[0m [0m19:03:55,079 INFO [org.jboss.as.server.deployment] (MSC service thread 1-15) JBAS015876: Starting deployment of "logicshop.war" (runtime-name: "logicshop.war")
[0m [0m19:03:55,138 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017534: Registered web context: /logicshop
[0m [0m19:03:55,149 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS018559: Deployed "logicshop.war" (runtime-name : "logicshop.war")
[0m[2015-01-15 07:03:55,165] Artifact logicshop: Artifact is deployed successfully
[2015-01-15 07:03:55,165] Artifact logicshop: Deploy took 329 milliseconds
Nachricht geändert durch Moritz Winterberg
Nachricht geändert durch Moritz Winterberg