I'm trying to use the Jetty connector with Restlet 2.1, but I can't get it to work.
I started with the only sample code I could find: http://wiki.restlet.org/docs_2.1/13-restlet/28-restlet/78-restlet/55-restlet.html However, out of the box, that did not compile, so I had to fix some references. I have attached the fixed version. However, that then gets runtime errors as soon as I make a GET request. Is there some example code out there that works? The log: Mar 9, 2011 5:29:56 PM org.restlet.engine.component.ChildContext fireContextChanged SEVERE: For security reasons, don't pass the component context to child Restlets anymore. Use the Context#createChildContext() method instead.class JettyAJPApplication$1 Mar 9, 2011 5:29:56 PM org.restlet.engine.component.ChildContext fireContextChanged SEVERE: For security reasons, don't pass the component context to child Restlets anymore. Use the Context#createChildContext() method instead.class org.restlet.Server 2011-03-09 17:29:56.882:INFO::jetty-7.3.1.v20110307 2011-03-09 17:29:56.907:INFO::Started [email protected]:8182 Mar 9, 2011 5:29:56 PM org.restlet.engine.component.ChildContext fireContextChanged SEVERE: For security reasons, don't pass the component context to child Restlets anymore. Use the Context#createChildContext() method instead.class org.restlet.Server 2011-03-09 17:29:56.910:INFO::jetty-7.3.1.v20110307 2011-03-09 17:29:56.910:INFO::Started [email protected]:8183 2011-03-09 17:29:56.911:INFO::AJP13 is not a secure protocol. Please protect port 8183 2011-03-09 17:30:29.439:INFO::jetty-7.3.1.v20110307 2011-03-09 17:30:29.440:WARN::FAILED [email protected]:8182: java.net.BindException: Address already in use 2011-03-09 17:30:29.440:WARN::FAILED org.restlet.ext.jetty.JettyServerHelper$WrappedServer@716c9867: java.net.BindException: Address already in use Mar 9, 2011 5:30:29 PM org.restlet.Restlet handle WARNING: Unable to start the Restlet java.net.BindException: Address already in use at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77) at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:170) at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:356) at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:248) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.server.Server.doStart(Server.java:269) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.restlet.ext.jetty.JettyServerHelper.start(JettyServerHelper.java:395) at org.restlet.Server.start(Server.java:585) at org.restlet.Restlet.handle(Restlet.java:227) at org.restlet.Server.handle(Server.java:485) at org.restlet.engine.ServerHelper.handle(ServerHelper.java:71) at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:150) at org.restlet.ext.jetty.JettyServerHelper$WrappedServer.handle(JettyServerHelper.java:167) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:581) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1040) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:592) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:526) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:41) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528) at java.lang.Thread.run(Thread.java:636) Mar 9, 2011 5:30:29 PM org.restlet.engine.log.LogFilter afterHandle -John ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2710551
JettyAJPApplication.java
Description: Binary data

