Hi Thierry

Thanks for your response.

I have tried the FirstSteps as a webapp and a standalone Java program. I
took the exact same code given in the link below and it throws the same
error in both cases on the web page :500.

The server encountered an unexpected condition which prevented it from
fulfilling the request

You can get technical details here.
Please continue your visit at our home page. 


Here is the output from the standalone java i ran using the code attached

java -cp org.restlet.jar;.com.myapp.rest.api.RepoRest
Jan 7, 2010 5:39:37 PM org.restlet.engine.http.StreamServerHelper start
INFO: Starting the internal HTTP server
Jan 7, 2010 5:39:38 PM org.restlet.resource.Finder createFinder
WARNING: Cannot create a Finder for the given target class, since it is
neither
a subclass of Resource nor a subclass of ServerResource.
Jan 7, 2010 5:40:19 PM org.restlet.routing.Filter doHandle
WARNING: The filter org.restlet.routing.ro...@c2ff5 was executed without a
next
Restlet attached to it.
Jan 7, 2010 5:40:19 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2010-01-07        17:40:19        127.0.0.1       -       -       8182
GET     /hello  -       500     398     -       47     
http://localhost:8182
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201
Firef
ox/3.5.6 (.NET CLR 3.5.30729)   -
Jan 7, 2010 5:40:19 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2010-01-07        17:40:19        127.0.0.1       -       -       8182
GET     /favicon.ico    -       404     363     -       0      
http://localhost
:8182   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6)
Gecko/200912
01 Firefox/3.5.6 (.NET CLR 3.5.30729)   -
Jan 7, 2010 5:40:22 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2010-01-07        17:40:22        127.0.0.1       -       -       8182
GET     /favicon.ico    -       404     363     -       0      
http://localhost
:8182   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6)
Gecko/200912
01 Firefox/3.5.6 (.NET CLR 3.5.30729)   -

I used the exact same code given in the tutorial given below:
package com.myapp.rest.api;
import org.restlet.Restlet;
import org.restlet.Application;
import org.restlet.Component;
import org.restlet.data.Protocol;
import org.restlet.routing.Router;  
           
public class RepoRest extends Application {  
           
             /** 
              * Creates a root Restlet that will receive all incoming calls. 
              */  
               
             public synchronized Restlet createInboundRoot() {  
                 // Create a router Restlet that routes each call to a  
                 // new instance of HelloWorldResource.  
                 Router router = new Router(getContext());  
           
                 // Defines only one route  
                 router.attach("/hello", HelloWorldResource.class);  
           
                 return router;  
             }  
              public static void main(String[] args) {  
                    try {  
                          // Create a new Component.  
                          org.restlet.Component component = new
org.restlet.Component();  
                    
                          // Add a new HTTP server listening on port 8182.  
                          component.getServers().add(Protocol.HTTP, 8182);  
                    
                          // Attach the sample application.  
                          component.getDefaultHost().attach(new RepoRest());  
                    
                          // Start the component.  
                          component.start();  
                      } catch (Exception e) {  
                          // Something is wrong.  
                          e.printStackTrace();  
                      }  
                  }  
           
}  



Thierry Boileau wrote:
> 
> Hello,
> 
> 1. the group ids have been changed recently. As there are several editions
> (see this page for more details
> http://wiki.restlet.org/docs_2.0/275-restlet.html), the group ids are now:
> org.restlet.<edition>.
> For example, if you wan to get the sources of the org.restlet artefact, go
> to this URL : 
> http://maven.restlet.org/org/restlet/jse/org.restlet/2.0-M6/
> You can also get the source code of the whole project from the svn
> repository, see here for more details:
> http://restlet.tigris.org/source/browse/restlet/
> 
> 2. well, I've just tried successfully with the "firstSteps" sample code
> (available here http://www.restlet.org/documentation/2.0/firstSteps).
> Could you give more details?
> 
> Best regards,
> Thierry Boileau
> 
> 
>> 1. Where can I find the sources for the 2.0-M6 release. I have found the
>> maven artifacts on the maven.restlet.org site?
>> 
>> 2. When I use the latest jars in a simple helloResource example provided
>> in
>> the documentation,  this is the error I get on the web page and the logs:
>> 
>> On the page:
>> The server encountered an unexpected condition which prevented it from
>> fulfilling the request
>> 
>> Logs:
>> WARNING: The filter org.restlet.routing.ro...@e13409 was executed without
>> a
>> next
>> Restlet attached to it.
>> Jan 6, 2010 11:13:36 AM org.restlet.engine.log.LogFilter afterHandle
>> INFO: 2010-01-06        11:13:36        127.0.0.1       -       127.0.0.1
>> 8037    GET     /myapp/hello  -       500     398     -       0      
>> http://l
>> ocalhost:8037   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
>> rv:1.9.1.6)
>> Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)   -
>> 
>> 
>> Any help/pointers would be appreciated.
>> 
>> Thanks !!
>> 
>> -- 
>> View this message in context:
>> http://n2.nabble.com/restlet-2-0-m6-questions-tp4267423p4267423.html
>> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>> 
>> ------------------------------------------------------
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2435526
> 
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2435543
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/restlet-2-0-m6-questions-tp4267423p4269465.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to