Custom Api doesn't listen

Hello Dears

i was starting to build custom api as https://doc.nuxeo.com/nxdoc/webengine-jax-rs/ my code is

Main Class : public class MyWebAppRoot extends Application {

@Override
public Set<Class<?>> getClasses() {
    HashSet<Class<?>> result = new HashSet<Class<?>>();
    result.add(TestController.class);
    return result;
}

}

testClass

@Produces(MediaType.APPLICATION_JSON)
@WebObject(type = "Hello")
public class TestController  extends ModuleRoot {


     @GET
      public String doGet() {
        return "Sample1: Hello World!";
      }



}

MainfestFile : Manifest-Version: 1.0 Nuxeo-WebModule: com.nuxeo.dataserve.MyWebAppRoot


after coding i build my App by : mvn install then i copied jar into nxserver\bundles and start server after i hit http://localhost:8080/nuxeo/site/Hello response is {“entity-type”:“exception”,“status”:404,“message”:“com.sun.jersey.api.NotFoundException: null for uri: http://localhost:8080/nuxeo/site/Hello”} i know this is mean that my code doesn't work success can any one tell me what the wrong in my Code ?

0 votes

0 answers

872 views

ANSWER

Debugging remotely with no access to source code is a bit nightmarish. Do you have anything in the server.log at boot time/deploy time that could orientate the investigation? As a reminder, a MANIFEST.MF ends with an empty line. https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html
11/30/2019