Skip to main content

Hello boys and girls,

after playing around with [GWT](, [JBoss Errai]( and JAX-RS, I encountered some exceptions I was able to solve after some time.
If you encounter these yourselves, I want to equip you with the right information on how to solve them:

### „org.jboss.errai.enterprise.client.jaxrs.api.ResponseException: Not Found“:
This Exception basically tells you, that the JAX-RS Client Proxy tried to call a REST Service, but it got a 404.If you look into the Developer Tools of your Browser, you will likely see a HTTP Request to one of your REST Services which returned a 404. This way you can ensure, that its not a connection error and you can see the requested resource.The most likely reason for this error is, that you configured your REST application to accept requests under e.g. „/rest/“. Errai JAX-RS by default expects the REST services to be under your root path.To change this, you can add the following script tag to your host HTML file, e.g. your index.jsp:1:
The variable in line 2 specifies that the REST services are to be found under e.g. http://_localhost:8080/MyApplication/rest/_

### java.lang.RuntimeException: There are no proxy providers registered yet.
This Exception basically tells you, that the interface you are using inside your Errai Caller is not proving any hints about a REST service. This means that you haven´t specified the @Path for the Interface and your method(s) do not specify to which HTTP methods they listen to.As a result the GWT compiler does not generate a JAX-RS proxy for your REST interfaces and it can´t  use them internally to connect your frontend code to your backend REST services.INFO: It is enough to specify the JAX-RS annotations at interface level as they will be forwarded to your implementation.If I should encounter other Exceptions, I will update this post appropriately.Did you encounter other exceptions not covered here? Just drop me a line and I will add it here to help others too!Hope this helped you so far!-w0mbat

Daniel Sachse

Author Daniel Sachse

More posts by Daniel Sachse