cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Api doesn't listen

Abdelrahman_Sa1
Confirmed Champ
Confirmed Champ

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> 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 ?

1 REPLY 1

Patrick_Abgrall
Star Contributor
Star Contributor

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

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.