Tal Liron | 21 Jul 07:40 2014

Missing git tags

There are no git tagd for versions 2.2.0 and 2.2.1. Would the Restlet team happen to have the git hashes
recorded somewhere?

I am chasing a nasty bug and want to make sure I'm on the right code.


Jerome Louvel | 7 May 06:05 2014

Announcing HTML newsletter and Restlet web API platform

Hi all,

Starting with the Restlet Framework 2.3 M2 and 2.2.1 versions released today, we will be announcing the new releases and security updates via an HTML newsletter. As always, we cross post the content to our blog and Twitter  <at> restlet_org account.

Registering to Tigris.org is a real barrier for new users who often prefer to reach out on StackOverFlow or Twitter, so we think that offering this direct information channel is necessary. We are also planning to migrate from Tigris to Google Groups later this year.

To kick things off, we on-boarded existing subscribers to this mailing list and also offer a clear way to subscribe to this newsletter when downloading the framework. If needed, unsubscribing is just one click away.

We are also building some synergies between the open source Restlet Framework and the APISpark full-stack PaaS under the Restlet web API platform project at Restlet.org (see updated web site) to provide additional value to our open source community on the following fronts:
  1. API documentation (during development, once published, multiple versions)
  2. API crafting (design contract, generate server skeleton)
  3. API usage (client SDKs, self-registration, sand-boxing, forking)
  4. API management (firewall, rate limitation, usage reports)
  5. API hosting (multi-tenant, containerization, cross-region)
As always, we look forward to better serving our community and welcome any feed-back and contributions!
Jerome Louvel | 7 Feb 00:05 2014

GitHub issues reorganization

Hi all,

In preparation of the new Restlet Framework 3.0 dev cycle, some clean-up was due in our GitHub issue tracker.

I have just reorganized the tags for clarity and constency based on our recent experience. We now have six aspects/dimensions for an issue:
  • Distribution: Zip | Maven | Eclipse (p2) | Windows
  • Version: 2.1 | 2.2 | 3.0
  • Edition: Android | GAE |GWT | Java SE | Java EE | OSGi
  • Module: Restlet API | Restlet Engine | Forge | Documentation
  • Extension: Atom | Crypto | ...
  • State: new | analysis | implementation | testing | escalated
  • Type: bug | feature | enhancement | task
  • Priority: critical | high | medium | low
Work still has to be done to properly label existing issues, but when you enter new issues, please try to properly set the labels for each dimension.

I've also cleaned up our milestones so provide the realistic set of issues that we are working on instead of the desired set. We will now use the "Priority" level to express this.

Here is the current set of milestones we have:
Best regards,
Andy Dennie | 25 Jan 14:33 2014

suggestion for facilitating exception translation

All of my ServerResource subclasses have methods containing exception translation boilerplate, like

public class MyResource extends MyBaseResource { 
     <at> Get 
    public Foo getFoo() { 
        Foo result = null; 
        try { 
            result = .... 
        catch (RuntimeException e) { 
        return result; 

and then MyBaseResource implements doCatch like this: 

    protected void doCatch(final RuntimeException e) { 
        Class<?> exceptionClass = e.getClass(); 
        if (IllegalArgumentException.class.isAssignableFrom(exceptionClass)) { 
            // chain & translate to a 400 
            throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, e.getMessage(), e); 

        // NotFoundException is a custom exception class I've defined
        if (NotFoundException.class.isAssignableFrom(exceptionClass)
                || IndexOutOfBoundsException.class.isAssignableFrom(exceptionClass)) {
            // chain & translate to a 404
            throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage(), e);

        if (UnsupportedOperationException.class.isAssignableFrom(exceptionClass)) {
            // chain & translate to a 405
            throw new ResourceException(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED, e.getMessage(), e);

        // ConflictException is a custom exception class I've defined
        if (ConflictException.class.isAssignableFrom(exceptionClass)
                || IllegalStateException.class.isAssignableFrom(exceptionClass)) {
            // chain & translate to a 409
            throw new ResourceException(Status.CLIENT_ERROR_CONFLICT, e.getMessage(), e);

        throw e; 

It would be nice if I didn't have to put that try/catch boilerplate in all my  <at> Get,  <at> Put,  <at> Post, etc. methods. 

I was thinking that a method like 
    protected ResourceException translateException(final RuntimeException e) 

defined on ServerResource would be nice to have.  It could be called from ServerResource.doHandle if an
exception is thrown, giving the resource object a chance to do the translation to a ResourceException.  If
that method returned null, then ServerResource could do its own translation. 



Jerome Louvel | 21 Sep 00:46 2013

New IntelliJ IDEA license

We have received a new license for IntelliJ IDEA that was kindly offered by JetBrains. Thanks to Martin Svenson for handling the process.

Restlet committers can contact me in order to get a copy.

Best regards,

Paul Sprague | 7 May 16:51 2013

How to implement an AMQP client+server connector?


Can anyone on this list make some recommendations as to how a connector could be implemented that isn't
based on HTTP? I was initially think that I needed to implement a connector, connection, controller,
in/outbound ways, etc. But after looking at the code I'm not so sure this is the correct approach.

My thought was to leverage Apache Qpid as the underlying implementation. I just need some idea as to how I can
integrate it into restlet.



Juan | 7 Jan 21:11 2013

access webservice with hostname versus localhost

I have been playing with the Restlet examples, seems that the URI defined in the router.attach call
(http://localhost:8111/hello) needs to called exactly like it from the clients, including the host
name. If my local machine is named galaxy18 and i run the webservice and local client, I can only access it
via localhost:8111/hello. If I change the router.attach to http://galaxy18:8111/hello then the
client can access it with galaxy18 but not with localhost.

I don't like hardcording, especially machine names, if you can imagine this will be a pain if my webservice
is running on different machines.

Is this an instance where I need to use read the hostname into a variable then use that in the router.attach or
am i missing something basic here?


Jerome Louvel | 1 Oct 13:46 2012

Restlet license for IntelliJ IDE

Hi all,


For Restlet code contributors, we have a free license available thanks to JetBrains.


Please contact us directly for additional information.








Cyril Lakech | 23 Jul 19:19 2012

Restlet 2.1-RC5 and GWT 2.4 POST entity issue


We use Restlet 2.1-RC5 and GWT 2.4 with restlet gwt extension and we
face a 415 error on posting content from the GWT app to the restlet
API: "Too few tokens in RPC request" (see errors below [1])

We can't find any solution to this exception. Debugging restlet/gwt
doesn't help...

Here is a sample of an entity sent to the server :


GET works perfectly, but when we try to POST/PUT content to the server
we get a 415 error

Any idea ?


Jul 23, 2012 4:01:21 PM org.restlet.service.ConverterService toObject
WARNING: Unable to convert a
[application/x-java-serialized-object+gwt,UTF-8] representation into
an object of class com.adeo.wikeo.business.family.domain.Family
java.io.IOException: Couldn't read the GWT object representation: Too
few tokens in RPC request at
at org.restlet.ext.gwt.GwtConverter.toObject(GwtConverter.java:149) at
at org.restlet.resource.Resource.toObject(Resource.java:828) at
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:545)
at org.restlet.resource.ServerResource.post(ServerResource.java:1178)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:430)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:646)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:341)
at org.restlet.resource.ServerResource.handle(ServerResource.java:944)
at org.restlet.resource.Finder.handle(Finder.java:246) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
at org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211) at
at org.restlet.Application.handle(Application.java:381) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211) at
org.restlet.Component.handle(Component.java:392) at
org.restlet.Server.handle(Server.java:516) at
org.restlet.engine.ServerHelper.handle(ServerHelper.java:72) at
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1089)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at net.stax.appserver.webapp.RequestMonitorValve.invoke(RequestMonitorValve.java:35)
at net.stax.appserver.admin.StaxApplicationQueryValve.invoke(StaxApplicationQueryValve.java:49)
at net.stax.appserver.webapp.RequestSetupValve.invoke(RequestSetupValve.java:31)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662) Caused by:
com.google.gwt.user.client.rpc.SerializationException: Too few tokens
in RPC request at
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:493)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:104)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:138)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:385)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:670)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:724)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:698)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:724)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:560)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:138)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:385)
at org.restlet.ext.gwt.ObjectRepresentation.getObject(ObjectRepresentation.java:122)
... 60 more Caused by: java.lang.IndexOutOfBoundsException: Index: 9,
Size: 9 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at
java.util.ArrayList.get(ArrayList.java:322) at
... 73 more Jul 23, 2012 4:01:21 PM org.restlet.engine.log.LogFilter
afterHandle INFO: 2012-07-23 16:01:21 - 80
POST /wikeo-core/business/v2/families/ - 415 554 156 37
http://toolfamilydev-antoine.webadeo.cloudbees.net Mozilla/5.0
(Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like
Gecko) Chrome/19.0.1084.56 Safari/536.5

Cyril Lakech


Dencel | 15 May 16:01 2012


I can't get my head around, why there is no filtering capability like servlet's Filter/FilterChain
available in Restlet.Is there a specific design decision at the basis for this? 

Something like: 
Authenticator authenticator = new MyAuthenticator();
Router router = new Router()

Looks more meaningful to me then: 
Authenticator authenticator = new MyAuthenticator();
authenticator = new MyAuthenticator();

In the first method there is only one filter entity created vs the two entities on the 2nd example. I've
implemented this already in my own project, but I like to know what the downside is of this approach. Imo the
only downside is there is no default Restlet API implementation of this mechanism.


Andy Dennie | 14 May 20:49 2012

setting up git repos and branches

Hi everyone,

I want to be able to occasionally submit fixes to Restlet, while maintaining local branches on my dev
machine that (a) keep up-to-date with Restlet's branches, and (b) contain my fixes, including those that
I have not yet submitted back to Restlet, and those I have submitted but which have not yet been accepted and
merged (and maybe never will be, but nevertheless I need those changes for my own use).

I'm pretty new to git, and I'd like to get off on the right foot here.

Here's what I'm thinking, please advise on whether this makes sense or if there are preferable alternatives.

As an initial setup:

- clone "https://github.com/restlet/restlet-framework-java" to my local dev environment
- in my local repo, create branches off each of the Restlet-defined branches, e.g. branch "my-master" from
"master", "my-2.2" from "2.2", etc.
- on github, fork restlet/restlet-framework-java to adennie/restlet-framework-java so that I have a
place to push fixes, and from which I can send pull requests to restlet/restlet-framework-java.

When I want to work on a fix, I would (in my local dev environment):

- make sure "master" is up-to-date by pulling from origin/master
- merge "master" into "my-master"
create a topic branch off "master" (e.g. "issue-123")
- when ready, push my topic branch to my forked repo on github, and submit a pull request 
- back in my local environment, merge my topic branch into "my-master", so that when building my dependent
project against "my-master", I see all my fixes.
if applicable, backport my fixes to "my-2.2" or "my-2.1" branches by cherry-picking them from
"my-master", so that I can build against a specific version of the library instead of "my-master" if I
don't want to live on the bleeding edge.

Can you guys advise my on this approach?  How do you do it?  

Thanks in advance.