Josiah Haswell
2013-01-10 03:11:25 UTC
Josiah Haswell [https://community.jboss.org/people/haswellj] created the discussion
"HTTP Status 404 - Could not find resource for relative :"
To view the discussion, visit: https://community.jboss.org/message/789964#789964
--------------------------------------------------------------
Hi everyone,
I've been Googling around for this, and none of the solutions I've found have worked for me. I'm trying to build a RESTEasy-enabled application on Jboss 7.1.1 with Gradle. I have the relevant configuration detailed towards the bottom of the message, but I see that the application is being deployed in the logs when I visit that URL:
19:43:46,458 INFOÂ [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /impl
19:43:46,474 INFOÂ [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war"
19:43:53,533 INFOÂ [org.jboss.resteasy.cdi.CdiInjectorFactory] (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager
19:43:53,542 INFOÂ [org.jboss.resteasy.spi.ResteasyDeployment] (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: class example.JaxRsActivator$Proxy$_$$_WeldClientProxy
But I receive the following error when I deploy the WAR and visit http://localhost:8080/impl/rest/user/list: http://localhost:8080/impl/rest/user/list:
*HTTP Status 404 - Could not find resource for relative : /user/list of full path: http://127.0.0.1:8080/impl/rest/user/list http://127.0.0.1:8080/impl/rest/user/list*
I do not see any errors in the log. I've tried various permutations on omitting or adding the "/" before the paths--does this matter?
What am I doing wrong?Â
Thanks!
Joe
Configuration:
src/main/webapp/WEB-INF/web.xml (empty except for the opening/closing tags)
example.JaxRsActivator:
@ApplicationPath("/rest")
public class JaxRsActivator extends Application
{
}
example.UserEndpoint:
@Path("user")
public class UserEndpoint
{
   @Inject
   UserService userService;
   @GET
   @Path("list")
   List<User> list() {
       User user = new User();
       user.setFirstName("Test");
       user.setLastName("User");
       return new ArrayList<User>(Arrays.asList(user));
   }
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/789964#789964]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
"HTTP Status 404 - Could not find resource for relative :"
To view the discussion, visit: https://community.jboss.org/message/789964#789964
--------------------------------------------------------------
Hi everyone,
I've been Googling around for this, and none of the solutions I've found have worked for me. I'm trying to build a RESTEasy-enabled application on Jboss 7.1.1 with Gradle. I have the relevant configuration detailed towards the bottom of the message, but I see that the application is being deployed in the logs when I visit that URL:
19:43:46,458 INFOÂ [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /impl
19:43:46,474 INFOÂ [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war"
19:43:53,533 INFOÂ [org.jboss.resteasy.cdi.CdiInjectorFactory] (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager
19:43:53,542 INFOÂ [org.jboss.resteasy.spi.ResteasyDeployment] (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: class example.JaxRsActivator$Proxy$_$$_WeldClientProxy
But I receive the following error when I deploy the WAR and visit http://localhost:8080/impl/rest/user/list: http://localhost:8080/impl/rest/user/list:
*HTTP Status 404 - Could not find resource for relative : /user/list of full path: http://127.0.0.1:8080/impl/rest/user/list http://127.0.0.1:8080/impl/rest/user/list*
I do not see any errors in the log. I've tried various permutations on omitting or adding the "/" before the paths--does this matter?
What am I doing wrong?Â
Thanks!
Joe
Configuration:
src/main/webapp/WEB-INF/web.xml (empty except for the opening/closing tags)
example.JaxRsActivator:
@ApplicationPath("/rest")
public class JaxRsActivator extends Application
{
}
example.UserEndpoint:
@Path("user")
public class UserEndpoint
{
   @Inject
   UserService userService;
   @GET
   @Path("list")
   List<User> list() {
       User user = new User();
       user.setFirstName("Test");
       user.setLastName("User");
       return new ArrayList<User>(Arrays.asList(user));
   }
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/789964#789964]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]