Simple REST application failes with 404 when deployed in JBoss EAP 7.

Solution Unverified - Updated -

Issue

  • We have a simple JAX-RS class :

    @Path("/")
    public class HelloWorld
     {
      @Inject
      HelloService helloService;
       @GET
        @Path("/json")
       @Produces({ "application/json" }) 
       public String getHelloWorldJSON() {
          return "{\"result\":\"" + helloService.createHelloMessage("World") + "\"}";
     }
    
    ...
    
    //HelloService
    
    package org.jboss.as.quickstarts.rshelloworld;
    
    public class HelloService 
    {   String createHelloMessage(String name) 
    {        return "Hello " + name + "!";   }
    }
    

Getting 404 while accessing the REST Service URL : http://localhost:8080/uu/rest/json

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content