I'm having a strange problem and hope someone can tell me what I'm doing wrong.
I have a Resteasy servlet configured and reachable at http://myhost.com/srv and a couple of classes that look like this: @Path("/connections") public class Connections { @Inject private NetworkService networkService; @GET @Path("/") @Produces({MediaType.APPLICATION_JSON}) public Collection<ConnectionDTO> allConnections() { . . . return listOfConnectionsDtos; } } @Path("/outgoingrequests") public class OutgoingRequests { @Inject private OutgoingRequestCache cache; @GET @Path("/") @Produces({MediaType.APPLICATION_JSON}) public Collection<OutgoingRequestDTO> allRequests() { . . . return listOfOutgoingReuqestsDtos; } } These work fine and have been working for some time now. I access them with http://myhost.com/srv/connections and http://myhost.com/srv/outgoingrequests respectively. I recently tried to add a new service to my app that looks like this @Path("/devices") public class Devices { @Inject private DeviceCache cache; @GET @Path("/") @Produces({MediaType.APPLICATION_JSON}) public Collection<DeviceDTO> allDevices() { . . . return listOfDeviceDTO; } } However this one doesn't work. When I try to access it with the url http://myhost.com/srv/devices I get "HTTP Status: 404" returned. I've tried creating a couple of other dummy service using this same pattern and they are all coming back with a 404 error. I've turned on debug logging for Resteasy categories and I'm seeing the following exception in my JBoss log file: 15:33:10,001 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher] () PathInfo: /devices 15:33:10,002 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher] () Failed executing GET /devices: org.jboss.resteasy.spi.NotFoundException: Could not find resource for relative : /devices of full path: http://myhost.com/myapp/srv/devices at org.jboss.resteasy.core.registry.RootSegment.matchChildren(RootSegment.java:360) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.core.registry.RootSegment.matchRoot(RootSegment.java:374) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.core.registry.RootSegment.matchRoot(RootSegment.java:367) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(ResourceMethodRegistry.java:350) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousDispatcher.java:192) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2] < -- SNIP -- > My web.xml file looks like this: <context-param> <param-name>resteasy.resources</param-name> <param-value> zedi.pacbridge.web.services.OutgoingRequests, zedi.pacbridge.web.services.Connections </param-value> </context-param> <servlet> <servlet-name>Resteasy</servlet-name> <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> </servlet> <context-param> <param-name>resteasy.servlet.mapping.prefix</param-name> <param-value>/srv</param-value> </context-param> <servlet-mapping> <servlet-name>Resteasy</servlet-name> <url-pattern>/srv/*</url-pattern> </servlet-mapping> Can anyone tell me what might be happening here? What am I doing wrong??? Thanks, Dave.
------------------------------------------------------------------------------
_______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users