xybrek | 25 May 08:23 2016
Picon
Gravatar

Timeout while writing to the queue-based output stream

I'm using Restlet version 2.3.5 for Google App Engine (GAE)

My GAE app breaks and RootServerResource stops working (serving) over 
time (1-2 hours usually) when this error hits:

     WARNING: Error while writing to the piped input stream.
     java.io.IOException: Timeout while writing to the queue-based 
output stream
               org.restlet.engine.io.PipeStream$2.write(PipeStream.java:99)
               java.io.OutputStream.write(OutputStream.java:116)
            com.dropbox.core.util.IOUtil.copyStreamToStream(IOUtil.java:52)

com.dropbox.core.util.IOUtil.copyStreamToStream(IOUtil.java:63)

com.dropbox.core.util.IOUtil.copyStreamToStream(IOUtil.java:34)

com.dropbox.core.v1.DbxClientV1$Downloader.copyBodyAndClose(DbxClientV1.java:535)
               com.dropbox.core.v1.DbxClientV1.getFile(DbxClientV1.java:427)

com.firststeps.resource.gae.GaeRootServerResource.getFile(GaeRootServerResource.java:268)

com.firststeps.resource.gae.GaeRootServerResource$1.write(GaeRootServerResource.java:140)
               org.restlet.engine.io.IoUtils$2.run(IoUtils.java:537)
               org.restlet.engine.Engine$1.run(Engine.java:158)

com.google.appengine.tools.development.RequestThreadFactory$1$1$2.run(RequestThreadFactory.java:110)
               java.security.AccessController.doPrivileged(Native Method)

com.google.appengine.tools.development.RequestThreadFactory$1$1.run(RequestThreadFactory.java:107)

(Continue reading)

Jerome Louvel | 3 May 05:03 2016
Gravatar

Re: Is restlet swagger extension still working and maintained?

Hi Gabriele,

We are planning to upgrade/maintain this extension bit have limited bandwidth at this moment.

Ia this something you could help us accelerate with a contribution?

Best regards,
Jerome

On Apr 28, 2016 8:39 AM, "Gabriele Marsili" <g8marsili <at> gmail.com> wrote:
Hello everyone,

I was looking for a software that helps the documentation of an API and since the API uses the restlet framework I thought about using the extension for swagger.


I'm having many problems integrating the tags( <at> ) and since the last post regarding this extension dates from the beginning of 2015 I wanted to ask if you have any idea if the extension is still working and being maintained or if it's just deprecated.

Thank you in advance for your answers

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Gabriele Marsili | 28 Apr 17:39 2016
Picon

Is restlet swagger extension still working and maintained?

Hello everyone,

I was looking for a software that helps the documentation of an API and since the API uses the restlet framework I thought about using the extension for swagger.

https://restlet.com/technical-resources/restlet-framework/guide/2.3/extensions/swagger

I'm having many problems integrating the tags( <at> ) and since the last post regarding this extension dates from the beginning of 2015 I wanted to ask if you have any idea if the extension is still working and being maintained or if it's just deprecated.

Thank you in advance for your answers

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Christine Karman | 2 Mar 22:36 2016
Picon
Gravatar

SSL intermediate cert issue

I want to switch from using a self-signed certificate in Restlet, which 
worked well, to a startcom certificate. The reason I want to change it 
is that I want to give third parties access to the server without having 
to give them my self signed cert.

Now I see an issue with Restlet apparently not sending the certificate 
chain, which my android app doesn't like. When I type

openssl s_client -showcerts -connect pengo.christine.nl:9005

in a shell, I get this error:

CONNECTED(00000003)
depth=0 CN = pengo.christine.nl
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = pengo.christine.nl
verify error:num=21:unable to verify the first certificate
verify return:1

When I type
openssl s_client -showcerts -connect pengo.christine.nl:9005 -CAfile 
./chain.crt

with chain.crt containing the root cert and intermediate cert, I get

CONNECTED(00000003)
depth=2 C = IL, O = StartCom Ltd., OU = Secure Digital Certificate 
Signing, CN = StartCom Certification Authority
verify return:1
depth=1 C = IL, O = StartCom Ltd., OU = StartCom Certification 
Authority, CN = StartCom Class 1 DV Server CA
verify return:1
depth=0 CN = pengo.christine.nl
verify return:1

My restlet configuration contains

         params.add("sslContextFactory", 
"org.restlet.engine.ssl.DefaultSslContextFactory");
         params.add("keystorePath", 
"/home/christine/motogymkhana/pengo_ssl.jks");
         params.add("keystorePassword", ServerConstants.keyStorePw);
         params.add("keystoreType", "JKS");
         params.add("keyAlias", ServerConstants.keyAlias);
         params.add("keyPassword", ServerConstants.keyPw);

The keystore does contain the same certificates as the chain.crt file.

How do I make Restlet send the chain with the certificate?

dagdag
Christine

--

-- 
dagdag is just a two character rotation of byebye

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

ttemplier | 2 Mar 09:47 2016
Gravatar

Article "Optimizing your Restlet Framework server applications"

Hi all,

We just published an article about the way to optimize your server applications implemented with Restlet. We detailled the following:

- Using caching
- Compressing content
- Configuring specific converters
- Configuring template engines

You can reach this article at the following link: http://restlet.com/blog/2016/02/29/optimizing-your-restlet-framework-server-applications/

Thierry

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
WayneP | 29 Feb 18:59 2016
Gravatar

404 returned for same URL

Hi,

something I'm seeing  is sometimes we get a 404 returned in production for a url that normally is fine. For example:

INFO: 2016-02-18        15:45:43        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-
443e-ad69-3c21c7143a92        -       200     0       965202  4347       Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:47 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:47        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a        -       200     0       940191  3640       Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:48 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:48        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a       -       200     0       11065   305         Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:48 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:48        195.2.244.193   -       127.0.0.1       443     POST    /api/newfolder/99471df9-79a4-443e-ad69-3c21c7143a     -       200     -       132     280         Restlet-Framework/2.1.6 -
Feb 18, 2016 3:45:51 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:51        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a       -       200     0       721892  2533        Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:54 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:54        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a        -       200     0       669242  2294       Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:54 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:54        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a        -       404     400     702546  3          Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:57 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:57        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a        -       404     400     620847  3        Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:59 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:59        195.2.244.193   -       127.0.0.1       443     POST    /api/newfolder/99471df9-79a4-443e-ad69-3c21c7143a    -       404     400     120     4        Restlet-Framework/2.1.6 -



Why would restlet return a 404 when normally it should process the request and return 200?

thanks

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
WayneP | 29 Feb 18:53 2016
Gravatar

404 returned for same URL

Hi,

something I'm seeing in production is sometimes we get a 404 returned for a url that normally is fine. For example:

INFO: 2016-02-18        15:45:43        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a92        -       200     0       965202  4347       Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:47 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:47        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a92        -       200     0       940191  3640       Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:48 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:48        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a92        -       200     0       11065   305         Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:48 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:48        195.2.244.193   -       127.0.0.1       443     POST    /api/newfolder/99471df9-79a4-443e-ad69-3c21c7143a92     -       200     -       132     280         Restlet-Framework/2.1.6 -
Feb 18, 2016 3:45:51 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:51        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a92        -       200     0       721892  2533        Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:54 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:54        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a92        -       200     0       669242  2294       Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:54 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:54        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a92        -       404     400     702546  3          Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:57 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:57        135.196.39.58   -       127.0.0.1       443     POST    /api/upload/99471df9-79a4-443e-ad69-3c21c7143a92        -       404     400     620847  3        Apache-HttpClient/4.3.1 (java 1.5)      -
Feb 18, 2016 3:45:59 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2016-02-18        15:45:59        195.2.244.193   -       127.0.0.1       443     POST    /api/newfolder/99471df9-79a4-443e-ad69-3c21c7143a92     -       404     400     120     4       https://admin.glasscubes.com    Restlet-Framework/2.1.6 -



Why would restlet return a 404 when normally it should process the request and return 200?

thanks

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Binoy Dalal | 13 Feb 22:04 2016
Picon

Document is empty error while returning get response in Chrome

Hello everyone,
I've just started out with the restlet framework.
I've written simple server and resource classes to get started. Here's the
code:
Resource:
/import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;

public class HelloWorldResource extends ServerResource {
	 <at> Get
	public String represent(){
		return "Hello World";
	}
}/

Server:
/import org.restlet.Server;
import org.restlet.data.Protocol;

public class HelloWorldServer {
	public static void main(String[] args) throws Exception {
		Server server = new Server(Protocol.HTTP, 8989, HelloWorldResource.class);
		server.start();
	}
}
/

When I try to run the code in Chrome by hitting /http://localhost:8989// I
get the following error:

<http://restlet-discuss.1400322.n2.nabble.com/file/n7579436/Capture.png> 

This error goes away when I enclose the resource return value in xml tags
like so /<sometag>Hello World</sometag>/ and the default XML template is
displayed in Chrome with "Hello World" in the tags.

Using a /ClientResource/ variable to access the resource via code works just
fine without the tags.

Additionally, while running the same code in IE, it automatically downloads
a JSON file with the message to my computer.

What is the reason behind this kind of behavior?

Thanks.

--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Document-is-empty-error-while-returning-get-response-in-Chrome-tp7579436.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Nick Ver Voort | 8 Feb 19:11 2016
Picon
Gravatar

Restlet with logback-access?

Hi, I'm trying to integrate logback-access into my webapp, which is Reslet with an embedded Jetty server. I already have logback-classic working, via the restlet slf4j bridge, but access seems to be a whole other beast. Has anybody done this before? Thanks!

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
ttemplier | 8 Feb 15:26 2016
Gravatar

Server, Client, Object conversion questions from StackOverflow

One great feature of the Restlet framework is its ability to plug external tools into your applications. This can be done at different levels to quote a few:
  • Server: the element responsible to handle HTTP requests within server applications
  • Client: the tool to use to execute HTTP requests from clients
  • Object conversion: the tool to use to convert request payload into object and response object into response text 
Registrations for each type are transparent for the application code. You simply need to put JAR files of Restlet extensions that contain such elements. For example, to use a Jetty server simply add the org.restlet.ext.jetty.jar into your classpath. The same can be done to use Jackson for conversion.

Some questions on StackOverflow are related to this issue because by default Restlet uses an internal HTTP server that should be used for development only and is not suitable for production. A best practice consists of configuring tools like Jetty for both internal server and client to execute HTTP requests.

Some of the related questions are listed below:


Feel free to discuss these issues.
Thierry

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Thierry Boileau | 27 Jan 08:54 2016
Gravatar

Restlet Framework version 2.3.6 released

Hello,

The version 2.3.6 of the Restlet Framework has been released yesterday.
You can get Maven artifacts from the public Maven repository http://maven.restlet.org, download a zip containing jar, javadocs and sources from https://restlet.com/downloads/current/ or use the Eclipse update site http://p2.restlet.org.


Here is a list of the bug fixes and updates. This list includes also the fixes/updates of the 2.3.5 version:
 - 2.3.6 (01/26/2016)
    - Bugs fixed
       - Fixed current application thread constant when issuing internal calls. Issue #1183.
       - Fixed StringIndexOutOfBoundsException in HeaderReader when reading header with empty value. Issue #1167.
       - Fixed StatusService.toStatus(Status, Request, Response) is not called. Issue #1156.
       - Fixed issue with case sensitivity of query parameters with JAX-RS. Issue #1163.
       - Fixed method value caching broken. Issue #1130.
       - Prevented NPE if using Redirector.MODE_SERVER_INBOUND. Issue #1182.
    - Enhancements
       - Upgraded Jetty connector to version 9.2.14. Issue #1180.

- 2.3.5 (10/03/2015)
    - Bugs fixed
       - Added check for jar class path resources if the inputstream is empty.
         Reported and contributed by Gernot Pansy.
       - Fixed Jetty server connector that sends the Date header twice. Issue #1141.
       - Fixed ResourceException constructor calling incorrect Status constructor. Issue #1139.
         Reported by Chad Gatesman.
       - Fixed support of encoding inside the DecodeRepresentation, and the Jetty client connector.
         Issue #1146.
       - Fixed handling of header Access-Control-Expose-Headers. Issue #1147.
         Reported and contributed by Ralph van Etten.
       - Fixed issue when setting header Access-Control-Expose-Headers. Issue #1145.
         Reported by Ralph van Etten.
       - Removed useless log trace for HTTP_OAUTH_BEARER request with raw value. Issue #1152.
       - Cors filter does not take into account PATCH method. Issue #1178.
    - Enhancements
       - Added Request and response attributes to the ResourceException class.
       - ServerResource traces Exception in the doCatch method with SEVERE log
         level, in case of 5xx errors.
       - Added Guice extension to GAE edition. Issue #1136.
       - Upgraded Jetty connector to version 9.2.14. Issue #1180.
    - API changes
       - Added ResourceException#resource attribute and ResourceException#getRequest()
         and ResourceException#getResponse() shortcut methods.


Best regards,
Thierry Boileau

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.

Gmane