Discussion:
The server has not found anything matching the request URI
Shrileckha Chaithanya
2010-05-14 19:48:02 UTC
Permalink
Hi All,

I am getting "The server has not found anything matching the request URI" when I run a sample application deployed in the weblogic server. Attached are the sample REST app that is taken from the restlet website. Below is the following entry in web.xml file:
<servlet>
<servlet-name>RestletServlet</servlet-name>
<servlet-class>
com.noelios.restlet.ext.servlet.ServerServlet
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>RestletServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

This is not only one entry in web.xml file. I have other application entries too.

The url to access the web app is:
http://localdev.gartner.com:8010/myApp/

I don't get any error on web logic server console. But I get "The server has not found anything matching the request URI" in the browser.

Out put from console:

May 14, 2010 3:37:07 PM com.noelios.restlet.LogFilter afterHandle
INFO: 2010-05-14 15:37:07 127.0.0.1 - 127.0.0.1 8010 GET /myApp/ - 404 0 - 16 http://localdev.mydomain.com:8010 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 -


It would be really helpful if any one can find the problem.

Thanks,
Shrileckha Chaithanya

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2609211
Thierry Boileau
2010-05-15 06:59:36 UTC
Permalink
hello Shrileckha,


could you precise the way your application is set up in the web.xml too?

Best regards,
Thierry Boileau

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2609339
Shrileckha Chaithanya
2010-05-17 15:19:09 UTC
Permalink
In the web.xml

I have mapping to struts action and mapping for AJAX servlet as shown
below. I do have some filter mapping entires too.

<servlet-mapping>
<servlet-name>AjaxCallServlet</servlet-name>
<url-pattern>/ajaxCall/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

But I think the web.xml is not an issue. I thought of testing in tomcat
since weblogic does not display proper results. I did the sample hello world
application from the restlet website.

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.Router;

public class FirstStepsApplication extends Application {

/**
* Creates a root Restlet that will receive all incoming calls.
*/
@Override
public synchronized Restlet createRoot() {
// Create a router Restlet that routes each call to a
// new instance of HelloWorldResource.
Router router = new Router(getContext());

// Defines only one route
//router.attachDefault(HelloWorldResource.class);
router.attach("/hello",HelloWorldResource.class);

return router;
}
}


import org.restlet.Context;
import org.restlet.data.MediaType;
import org.restlet.data.Request;
import org.restlet.data.Response;
import org.restlet.resource.Representation;
import org.restlet.resource.Resource;
import org.restlet.resource.ResourceException;
import org.restlet.resource.StringRepresentation;
import org.restlet.resource.Variant;

/**
* Resource which has only one representation.
*
*/
public class HelloWorldResource extends Resource {

public HelloWorldResource(Context context, Request request,
Response response) {
super(context, request, response);

// This representation has only one type of representation.
getVariants().add(new Variant(MediaType.TEXT_PLAIN));
}

/**
* Returns a full representation for a given variant.
*/
@Override
public Representation represent(Variant variant) throws
ResourceException {

StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("<html>");
stringBuilder
.append("<head><title>Sample REST Application
Page</title></head>");
stringBuilder.append("<body bgcolor=white>");

stringBuilder.append("<table border=\"0\">");
stringBuilder.append("<tr>");
stringBuilder.append("<td>");
stringBuilder.append("<h1>Hello Word!</h1><br>");
stringBuilder.append("This is a sample rest application");
stringBuilder.append("</td>");
stringBuilder.append("</tr>");
stringBuilder.append("</table>");
stringBuilder.append("</body>");
stringBuilder.append("</html>");

/* Representation representation = new StringRepresentation(
"hello, world", MediaType.TEXT_PLAIN);*/
Representation representation = new
StringRepresentation(stringBuilder
.toString(), MediaType.TEXT_HTML);
return representation;
}
}

But I get following exception:
root cause

java.lang.NoClassDefFoundError: javax/mail/MessagingException
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
java.lang.Class.getConstructor0(Unknown Source)
java.lang.Class.getConstructor(Unknown Source)
com.noelios.restlet.Engine.registerHelper(Engine.java:1175)
com.noelios.restlet.Engine.registerHelpers(Engine.java:1224)
com.noelios.restlet.Engine.discoverClientConnectors(Engine.java:460)
com.noelios.restlet.Engine.discoverConnectors(Engine.java:477)
com.noelios.restlet.Engine.<init>(Engine.java:256)
com.noelios.restlet.Engine.<init>(Engine.java:240)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.restlet.util.Engine.getInstance(Engine.java:177)
org.restlet.Restlet.<init>(Restlet.java:82)
org.restlet.Connector.<init>(Connector.java:83)
org.restlet.Client.<init>(Client.java:82)
org.restlet.Client.<init>(Client.java:68)

com.noelios.restlet.ext.servlet.ServletWarClient.<init>(ServletWarClient.java:66)

com.noelios.restlet.ext.servlet.ServerServlet.createWarClient(ServerServlet.java:662)

com.noelios.restlet.ext.servlet.ServerServlet.createComponent(ServerServlet.java:377)

com.noelios.restlet.ext.servlet.ServerServlet.getComponent(ServerServlet.java:739)
com.noelios.restlet.ext.servlet.ServerServlet.init(ServerServlet.java:817)
javax.servlet.GenericServlet.init(GenericServlet.java:212)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)


I am prototyping the rest API using restlet. It would be great if you can
help me in solving this issue ASAP.


Thanks,
Shrileckha Chaithanya
--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anything-matching-the-request-URI-tp5058385p5065606.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2609991
Shrileckha Chaithanya
2010-05-17 15:36:02 UTC
Permalink
okay the earlier post is the error from my eclipse tomcat. I installed tomcat
6.0 and it is giving me 404 error like the one in weblogic.

ay 17, 2010 11:32:30 AM com.noelios.restlet.LogFilter afterHandle
INFO: 2010-05-17 11:32:30 10.1.9.105 - 10.1.9.105 8080 GET
/MyRest/testRest/hello - 404 0 - 16 http://10.1.9.105:8080 Mozilla/5.0
(Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
-


I guess I am missing some jar or some thing. I am using Restlet1.1 since it
is stable version by the restlet website. Pls advice.
--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anything-matching-the-request-URI-tp5058385p5065680.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2610000
Shrileckha Chaithanya
2010-05-17 19:49:15 UTC
Permalink
Okay finally it worked when I added.. the below entry in the web.xml:

<context-param>
<param-name>org.restlet.application</param-name>

<param-value>com.gartner.portal.RestAPI.WebServiceApplication</param-value>
</context-param>


I thought by seeing the servlet mapping the Restlet engine will determine
all the Restlet applications.
So in the above case, if there are multiple applications running how it is
going work?
--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anything-matching-the-request-URI-tp5058385p5066726.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2610066
Jerome Louvel
2010-05-20 09:46:07 UTC
Permalink
Hi Shrileckha,

Supporting several Restlet applications is possible in Restlet 1.1 (use
several WARs on the "org.restlet.component" parameter). However it is much
easier to achieve in Restlet 2.0, see the example in the Javadocs:
http://www.restlet.org/documentation/snapshot/jee/ext/org/restlet/ext/servle
t/ServerServlet.html

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com



-----Message d'origine-----
De : Shrileckha Chaithanya [mailto:***@gmail.com]
Envoyé : lundi 17 mai 2010 21:49
À : ***@restlet.tigris.org
Objet : RE: The server has not found anything matching the request URI

Okay finally it worked when I added.. the below entry in the web.xml:

<context-param>
<param-name>org.restlet.application</param-name>

<param-value>com.gartner.portal.RestAPI.WebServiceApplication</param-value>

</context-param>


I thought by seeing the servlet mapping the Restlet engine will determine
all the Restlet applications.
So in the above case, if there are multiple applications running how it is
going work?
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anythi
ng-matching-the-request-URI-tp5058385p5066726.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=26100
66

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2611243
Shrileckha Chaithanya
2010-05-20 11:08:02 UTC
Permalink
Thanks Jerome for the reply. For the restlet web site I see that Version 2.0
Release Candidate 3 is under testing phase. is good to use this version for
the development? My Code is going to production by end of July.
is it reliable to use it? Please advice.

Thanks,
-Shrileckha Chaithanya
--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anything-matching-the-request-URI-tp5058385p5079141.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2611280
Jerome Louvel
2010-05-21 08:20:06 UTC
Permalink
Hi Shrileckha,

Here is the current roadmap of the framework:
http://www.restlet.org/about/roadmap

2.0 RC3 is good for new developments and 2.0.0 should be out in June or
July, depending on blocking issues to be fixed.

However, 2.0.0 will not immediately be marked as 'stable' yet as we want to
wait for additional feed-back and a 2.0.1 version at least, but we are very
conservative about of version tags. I know some persons use 2.0 milestone
versions in production already, so it depends on the level of stability you
expect...

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com


-----Message d'origine-----
De : Shrileckha Chaithanya [mailto:***@gmail.com]
Envoyé : jeudi 20 mai 2010 13:08
À : ***@restlet.tigris.org
Objet : RE: The server has not found anything matching the request URI

Thanks Jerome for the reply. For the restlet web site I see that Version 2.0
Release Candidate 3 is under testing phase. is good to use this version for
the development? My Code is going to production by end of July.
is it reliable to use it? Please advice.

Thanks,
-Shrileckha Chaithanya
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anythi
ng-matching-the-request-URI-tp5058385p5079141.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=26112
80

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2611684
Shrileckha Chaithanya
2010-05-21 15:11:54 UTC
Permalink
Hi Jerome...

Thanks for the reply. If I use 2RC3 or 2.0.0, is there any memory leak
involved. Did you get any kind of issues so far? Please let me know.

Thanks,
Shrileckha Chaithanya
--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anything-matching-the-request-URI-tp5058385p5084704.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2611810
Jerome Louvel
2010-06-12 09:08:54 UTC
Permalink
Hi Shrileckha,

Our list of open issues is public. You can get it via the roadmap page that
I just updated:
http://www.restlet.org/about/roadmap

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com





-----Message d'origine-----
De : Shrileckha Chaithanya [mailto:***@gmail.com]
Envoyé : vendredi 21 mai 2010 17:12
À : ***@restlet.tigris.org
Objet : RE: The server has not found anything matching the request URI

Hi Jerome...

Thanks for the reply. If I use 2RC3 or 2.0.0, is there any memory leak
involved. Did you get any kind of issues so far? Please let me know.

Thanks,
Shrileckha Chaithanya
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/The-server-has-not-found-anythi
ng-matching-the-request-URI-tp5058385p5084704.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=26118
10

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2620117
chandra gorantala
2010-05-19 20:11:13 UTC
Permalink
You can configure multiple resources in Application class.. But there will be only one application...

Eg....
router.attach("req1 format", Resource1.class);
router.attach("req2 format", Resource1.class);
router.attach("req3 format", Resource2.class);

Thanks,
Chandra

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2610978
Continue reading on narkive:
Loading...