RE: Re: Restlet Put Method infinite loop

2012-05-08 Thread Christie English
Thanks.  I switched to the Jetty connector and it is creating the HTTP 
connector fine, but for some readon the HTTPS conector is still the internal 
connector:


public void setupSSLServer(int nPort)
  {
Server serverSSL = getServers().add(Protocol.HTTPS, nPort);
SeriesParameter paramSSL = serverSSL.getContext().getParameters();
paramSSL.add(useForwardedForHeader, true);  
  
  
paramSSL.add(sslContextFactory,org.restlet.ext.ssl.PkixSslContextFactory);
paramSSL.add(keystorePath,SSL_KEYSTORE_PATH);
paramSSL.add(keystorePassword, );
paramSSL.add(keyPassword, ); 
paramSSL.add(keystoreType,JKS);
}



Server serverHttp =  getServers().add(Protocol.HTTP, 8080);
SeriesParameter paramHttp = serverHttp.getContext().getParameters();
  paramHttp.add(useForwardedForHeader, true);  
  
setupSSLServer(8443);




INFO: LoggerImplFactory set to 
com.google.code.morphia.logging.jdk.JDKLoggerFactory
0 [main] DEBUG org.eclipse.jetty.util.log  - Logging to 
org.slf4j.impl.Log4jLoggerAdapter(org.eclipse.jetty.util.log) via 
org.eclipse.jetty.util.log.Slf4jLog
1 [main] DEBUG org.eclipse.jetty.util.log  - Container 
org.restlet.ext.jetty.JettyServerHelper$WrappedServer@648730b8 + 
qtp1457099383{1=0=0/255,-1} as threadpool
1 [main] DEBUG org.eclipse.jetty.util.log  - Container 
org.restlet.ext.jetty.JettyServerHelper$WrappedServer@648730b8 + 
SelectChannelConnector@0.0.0.0:8080 STOPPED as connector
1 [main] DEBUG org.eclipse.jetty.util.log  - starting 
org.restlet.ext.jetty.JettyServerHelper$WrappedServer@648730b8
1 [main] INFO org.eclipse.jetty.util.log  - jetty-7.4.2.v20110526
15 [main] DEBUG org.eclipse.jetty.util.log  - starting 
org.restlet.ext.jetty.JettyServerHelper$WrappedServer@648730b8
15 [main] DEBUG org.eclipse.jetty.util.log  - starting 
qtp1457099383{1=0=0/255,-1}
16 [main] DEBUG org.eclipse.jetty.util.log  - STARTED 
qtp1457099383{1=0=1/255,0}
16 [main] DEBUG org.eclipse.jetty.util.log  - starting 
SelectChannelConnector@0.0.0.0:8080 STOPPED
17 [main] DEBUG org.eclipse.jetty.util.log  - starting 
org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager@6360f5bf
26 [main] DEBUG org.eclipse.jetty.util.log  - STARTED 
org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager@6360f5bf
34 [main] INFO org.eclipse.jetty.util.log  - Started 
SelectChannelConnector@0.0.0.0:8080 STARTING
34 [main] DEBUG org.eclipse.jetty.util.log  - STARTED 
SelectChannelConnector@0.0.0.0:8080 STARTED
34 [main] DEBUG org.eclipse.jetty.util.log  - STARTED 
org.restlet.ext.jetty.JettyServerHelper$WrappedServer@648730b8
Starting the internal [HTTPS/1.1] server on port 8443

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


RE: Re: Re: File extensions content negotiation for POST

2012-05-08 Thread Lee Nave
 Hello,
 
 I think it should be @Post(multipart:tsv), | means an alternative (
 http://wiki.restlet.org/docs_2.1/13-restlet/328-restlet.html).
 
 Best regards,
 Thierry Boileau
 

Yes, of course you are correct.  I am using @Post(multipart:tsv), that was a 
typo in my earlier response.

So anyway, is the file extension content-negotiation not expected to work with 
POST?  I can certainly understand that it wouldn't, but this would've been a 
handy trick.

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


RE: Re: Restlet Put Method infinite loop

2012-05-08 Thread Christie English
Thanks, I will look into using the alternate connector.


FYI, the exception was occurring with Restlet 2.1 RC4 J2SE




--

May 7, 2012 8:40:51 PM org.restlet.util.SelectionRegistration block
WARNING: Unable to block the thread at the cyclic barrier
java.util.concurrent.TimeoutException
at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:222)
at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:399)
at 
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:179)
at 
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:228)
at org.restlet.engine.io.Buffer.process(Buffer.java:597)
at 
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:305)
at java.io.InputStream.read(InputStream.java:82)
at org.restlet.engine.io.BioUtils.exhaust(BioUtils.java:238)
at 
org.restlet.representation.Representation.exhaust(Representation.java:247)
at 
org.restlet.engine.connector.ServerOutboundWay.onCompleted(ServerOutboundWay.java:174)
at 
org.restlet.engine.connector.HttpServerOutboundWay.onCompleted(HttpServerOutboundWay.java:117)
at 
org.restlet.engine.connector.OutboundWay.processIoBuffer(OutboundWay.java:409)
at org.restlet.engine.connector.Way.onSelected(Way.java:412)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
at 
org.restlet.engine.connector.Connection.onSelected(Connection.java:603)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
at 
org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:200)
at 
org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:99)
at 
org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:273)
at 
org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:153)
at org.restlet.engine.connector.Controller.run(Controller.java:158)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
May 7, 2012 8:40:51 PM org.restlet.engine.connector.ServerOutboundWay 
onCompleted
WARNING: Unable to automatically exhaust the request entity.
java.io.IOException: Unable to block the thread at the cyclic barrier.
at 
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:183)
at 
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:228)
at org.restlet.engine.io.Buffer.process(Buffer.java:597)
at 
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:305)
at java.io.InputStream.read(InputStream.java:82)
at org.restlet.engine.io.BioUtils.exhaust(BioUtils.java:238)
at 
org.restlet.representation.Representation.exhaust(Representation.java:247)
at 
org.restlet.engine.connector.ServerOutboundWay.onCompleted(ServerOutboundWay.java:174)
at 
org.restlet.engine.connector.HttpServerOutboundWay.onCompleted(HttpServerOutboundWay.java:117)
at 
org.restlet.engine.connector.OutboundWay.processIoBuffer(OutboundWay.java:409)
at org.restlet.engine.connector.Way.onSelected(Way.java:412)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
at 
org.restlet.engine.connector.Connection.onSelected(Connection.java:603)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
at 
org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:200)
at 
org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:99)
at 
org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:273)
at 
org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:153)
at org.restlet.engine.connector.Controller.run(Controller.java:158)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: 

Remove

2012-05-08 Thread David Bakker
Please remove me from this list
- This email and any files transmitted with it are confidential 
and is intended only for the individual named. If you are not the named 
addressee or if this email is to a user no longer associated with the named 
address you should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system. E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The 
sender therefore does not accept liability for any errors or omissions in the 
contents of this message, which arise as a result of e-mail transmission. If 
verification is required please request a hard-copy version. Please note that 
any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, the recipient 
should check this email and any attachments for the presence of viruses. The 
company accepts no liability for any damage caused by any virus transmitted by 
this email. (DCLM001) Arraya Solutions Inc, 523 Plymouth Road, Suite 212, 
Plymouth Meeting, PA 19462

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


Re: Re: Jetty + Webapp + Restlet

2012-05-08 Thread Thierry Boileau
Hello Kevin,

I think there is no need to provide your own ServerServlet or
ServletAdapter. I'm able to run your code, once I simply provide a
ServerServlet instead of DemoRestletServlet:

// Restlet context
ServletContextHandler restletContext = new ServletContextHandler(
ServletContextHandler.NO_SESSIONS );
restletContext.setContextPath( /restlet );
ServerServlet restletServlet = new ServerServlet();
ServletHolder restletHolder = new ServletHolder( restletServlet );
   restletHolder.setInitParameter( org.restlet.application,
DemoApp.class.getName() );
restletContext.addServlet( restletHolder, /* );

Best regards,
Thierry Boileau


2012/4/27 Kevin Minder kmin...@gmail.com

 I think I've figured it out.  The key seems to be that to have the level
 of control I want for my use case, I need to use the ServletAdapter instead
 of the ServerServlet.  I've attached a working version of my test case that
 makes this change.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2954490

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