Restlet 2.1.1 - The thread blocked at the cyclic barrier has timed out

2013-01-07 Thread Itzkowitz (Silver), Aliza
Hello,
I am using restlet 2.1.1 to implement a HTTP server. everything works OK except 
once in a while the server takes an awful long time to respond (even for a 
simple HTTP GET via the browser).
On the server side I see these errors:

Jan 07, 2013 2:19:32 PM org.restlet.util.SelectionRegistration block
WARNING: The thread blocked at the cyclic barrier has timed out
java.util.concurrent.TimeoutException
at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:250)
at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:427)
at org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:191)
at 
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:230)
at org.restlet.engine.io.Buffer.process(Buffer.java:601)
at 
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:307)
at java.io.InputStream.read(InputStream.java:101)
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.onMessageCompleted(ServerOutboundWay.java:174)
at 
org.restlet.engine.connector.HttpServerOutboundWay.onMessageCompleted(HttpServerOutboundWay.java:118)
at 
org.restlet.engine.connector.OutboundWay.processIoBuffer(OutboundWay.java:468)
at org.restlet.engine.connector.Way.onSelected(Way.java:445)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:325)
at org.restlet.engine.connector.Connection.onSelected(Connection.java:614)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:325)
at 
org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:213)
at 
org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:99)
at 
org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:299)
at 
org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:167)
at org.restlet.engine.connector.Controller.run(Controller.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Jan 07, 2013 2:19:32 PM org.restlet.engine.connector.ServerOutboundWay 
onMessageCompleted
WARNING: Unable to automatically exhaust the request entity.
java.io.IOException: The thread blocked at the cyclic barrier has timed out.
at org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:197)
at 
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:230)
at org.restlet.engine.io.Buffer.process(Buffer.java:601)
at 
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:307)
at java.io.InputStream.read(InputStream.java:101)
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.onMessageCompleted(ServerOutboundWay.java:174)
at 
org.restlet.engine.connector.HttpServerOutboundWay.onMessageCompleted(HttpServerOutboundWay.java:118)
at 
org.restlet.engine.connector.OutboundWay.processIoBuffer(OutboundWay.java:468)
at org.restlet.engine.connector.Way.onSelected(Way.java:445)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:325)
at org.restlet.engine.connector.Connection.onSelected(Connection.java:614)
at 
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:325)
at 
org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:213)
at 
org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:99)
at 
org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:299)
at 
org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:167)
at org.restlet.engine.connector.Controller.run(Controller.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:250)
at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:427)
at org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:191)
... 24 more

Here is my code:

 

Re: Serving up index file in Restlet Directory

2013-01-07 Thread Jerome Louvel
FW: I'm resending this email from 01/04 due to an email gateway error
--

Hi Paul,

You have reached a limitation of the CLAP pseudo-protocol which isn't
suitable to list the content of a directory and therefore do any sort of
content negotiation.

We could automatically append the indexName to a directory URI to try to
prevent the 404 or need to hardcode the URI as you have to do though.

Would you mind entering an issue in GitHub?

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel


2013/1/4 Paul Morris 

> Hi there-
>
> Here's what I'm trying to do:
>
> Redirect GET calls to root to a static directory with an index.html file
> in it. I thought I could redirect to the folder containing the index.html
> and then use the setIndexName of Directory to serve up the index.html file
> once the user gets redirected to the parent folder but it's not working
> that way. Here's what I have right now:
>
> 
>  />
> 
> 
> 
> 
> 
> 
>
> 
> 
>  />
> 
> 
> class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
> 
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> This actually works because I am redirecting to the actually index.html
> but it seems awfully brittle to be redirecting to {rbi}docs/index.html
> rather than just {rbi}docs/ which I could live with but the problem is my
> WADL description shows that you can call a GET on docs/ but when you try
> that you get a plain ol' non-hypermediafied listing of the files within
> docs. I tried messing with the setNegotiatingContent flag to no avail. Have
> I missed the purpose of setIndexName?
>
> Thanks.
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3041079
>

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

Re: Suggestion on OpenID extension wiki

2013-01-07 Thread Jerome Louvel
FW: I'm resending this email from 01/04 due to an email gateway error.
--

Hi Pier,

Thanks for the feed-back, I have updated the wiki page.

I also created you a wiki account with doc author rights (check your email
for details), so you can make further changes if needed.

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel


2012/12/30 Pier Luigi Rocca 

> Dear restlet mailing list,
>
> I have some suggestions for the wiki page dedicated to the OpenID
> extension.
>
> First I think that it should be stated explicitly that
> org.openid4java.jar is a required dependency of this package.
>
> Then, about the code that starts just after:
>
> public class ProviderApplication extends Application {
>
> isn't placed inside a constructor or a method, and doesn't compile. I
> guess it should be inside a ProviderApplication() constructor.
>
> greetings,
> Pier Luigi
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3040450
>

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

Re: Serving up index file in Restlet Directory

2013-01-07 Thread Paul Morris
Sure. In the meantime is it possible to use the file protocol with a path 
relative to the context path or something along those lines?

Paul Morris

On Jan 7, 2013, at 2:54 PM, "Jerome Louvel" 
mailto:jlou...@restlet.com>> wrote:

FW: I'm resending this email from 01/04 due to an email gateway error
--

Hi Paul,

You have reached a limitation of the CLAP pseudo-protocol which isn't suitable 
to list the content of a directory and therefore do any sort of content 
negotiation.

We could automatically append the indexName to a directory URI to try to 
prevent the 404 or need to hardcode the URI as you have to do though.

Would you mind entering an issue in GitHub?

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel


2013/1/4 Paul Morris mailto:pmor...@nmh.org>>
Hi there-

Here's what I'm trying to do:

Redirect GET calls to root to a static directory with an index.html file in it. 
I thought I could redirect to the folder containing the index.html and then use 
the setIndexName of Directory to serve up the index.html file once the user 
gets redirected to the parent folder but it's not working that way. Here's what 
I have right now:


































This actually works because I am redirecting to the actually index.html but it 
seems awfully brittle to be redirecting to {rbi}docs/index.html rather than 
just {rbi}docs/ which I could live with but the problem is my WADL description 
shows that you can call a GET on docs/ but when you try that you get a plain 
ol' non-hypermediafied listing of the files within docs. I tried messing with 
the setNegotiatingContent flag to no avail. Have I missed the purpose of 
setIndexName?

Thanks.

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

This message and any included attachments are intended only for the addressee. 
The information contained in this message is confidential and may constitute 
proprietary or non-public information under international, federal, or state 
laws. Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail.

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

Does the OAuth2 extension support "client-side"/"user agent"/"implicit grant" flow?

2013-01-07 Thread Richard Berger
I have used the OAuth2 extension to build a Restlet-based and plain Java
clients for my API (Restlet/GAE).  These both use OAuth's "authorization
flow" which is supported by the OAuth2 extension. Now I wanted to build a
JavaScript client.  JavaScript clients seem to require a different flow
(variously named user agent or implicit grant or client side).  My question
is does the OAuth2 extension support this flow?

Looking at the source I see that in addition to the authorization flow
there is also a "password" flow and a "none" flow - but I can't tell if
those are meant to work with JavaScript clients.

Thanks in advance for any advice,
RB

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