Laurent Rustuel | 12 Sep 18:26 2014

maven dependencies

I'm wanted to try the swagger extension, and thus created a maven 
project with dependency to repository When 
building with
I've the following error :
[ERROR] Failed to execute goal on project ucs-web: Could not resolve 
dependencies [...]
collect dependencies at 
org.restlet.jee:org.restlet.ext.swagger:jar:2.3-SNAPSHOT ->${lib-e4-version}: 
Failed to read artifact descriptor for
jar:${lib-e4-version}: Could not transfer artifact${lib-e4-version} 
from/to maven-restlet ( Illegal character in 
path at index 103:${lib-e4-version}/${lib-e4-version}.pom 

If I set this version
mvn compile -Dlib-e4-version=0.12.RC1
I then got the following error :

(Continue reading)

hshorter | 9 Sep 17:45 2014

HTTP -> HTTPS redirect

Is there a way to redirect a browser from HTTP to HTTPS?

For example, I enter "localhost:1234/MyApplication" into a browser and I would like it to redirect to "https://localhost:1234/MyApplication".



Ziemowit Stolarczyk | 4 Sep 14:06 2014

ClientResource and proxy settings


We have following problem.

1. We use org.restlet.resource.ClientResource in our code.
2. We set up http.nonProxyHosts setting but it does not help. Code always tries to use proxy.

Does ClientResource is able to cooperate with nonProxyHosts setting or should we use different approach?

Could You help?


Mitu Kumar Debnath | 3 Sep 21:43 2014

use of DigestVerifier for verifiying user/pass with mysql DB

I was working with Restlet framework lately and I am fairly new with this framework. I was trying to use
DigestVerifier in my serverside code but quite not sure how to use this class. I searched the web for the
example of how to use digest verifier to verify digested user/password coming from clientside request
with digested user/pass from mysql database, but didn't get any. Anyone can provide an example of
DeigestVerifier please?

Thanks in advance.



Josef Zapletal | 27 Aug 09:15 2014

Problem with Restlet 2.2 server on Android


I have problem with the Restlet for Android. I downloaded ZIP file (, extract it and from the "\lib" folder I copy "org.restlet.jar" file to the project "\libs" file. I refreshed the project and run clean up the project. Then I compiled the project and try run server (I used this tutorial:, part 3. "Listening to Web browsers") but I get this error message:

No available server connector supports the required protocols: 'HTTP' . Please add the JAR of a matching connector to your classpath. Then, register this connector helper manually.

I tried to google some more information, but nothing work. Also post on the stackoverflow ( not help. I´m using Eclipse IDE and Android 4.0+.

What do you recommend? Can you help me?

Robert Barnett | 20 Aug 20:39 2014

lib/org.restlet.ext.ssl.jar missing from 2.2.2 zip

The 2.2.2 documentation states that to enable https one must add lib/org.restlet.ext.ssl.jar to the
class path. (source:  But no such jar
appears in the distribution.  Omitting this jar appears to lead to the runtime exception:

java.lang.ClassNotFoundException: org.restlet.ext.ssl.PkixSslContextFactory

Please advise.



bitsofinfo | 20 Aug 16:28 2014

simple spring example help

I am trying to wire up the following in spring. I can get the "topComponent" object from my spring context. I
invoke start() on it, however the SpringRouter I have setup does not seem to be registered? 

No matter what URI I go to at localhost:8090/restlet/20140101 i just get 404's

What am I missing? Any help appreciated, thanks

Starting the internal [HTTP/1.1] server on port
2014-08-20	10:06:21	0:0:0:0:0:0:0:1%0	-	-	8090	GET	/restlet/20140101	-	404	439	0	4	http://localhost:8090	my
user agent

	<bean id="topComponent" class="org.restlet.ext.spring.SpringComponent">
	    <property name="server">
	        <bean class="org.restlet.ext.spring.SpringServer">
	            <constructor-arg value="http" />
	            <constructor-arg value="8090" />
	    <property name="defaultTarget" ref="defaultRouter" />
	 <bean id="topComponent.context"
class="org.springframework.beans.factory.config.PropertyPathFactoryBean" />
	<bean id="defaultRouter" class="org.restlet.ext.spring.SpringRouter">
           <constructor-arg ref="topComponent.context"/>
	    <property name="attachments">
	            <entry key="/restlet" value-ref="rootRouter" />
	<bean id="rootRouter" class="org.restlet.ext.spring.SpringRouter">
	    <property name="attachments">
	            <entry key="/{apiVersion}">
	                <ref bean="myResource"/>
	<bean id="myResource" class="my.MyResource" scope="prototype">


Alex Harvey | 8 Aug 23:13 2014

Using JUnit with JacksonRepresentation


I'd like to be able to write some tests using JUnit to rest server resource classes. I'm encountering a
problem when I try to pass a JacksonRepresentation in. My test class looks something a little like this:

        TransactionResource resource = new MyResource();
        MyData data = new MyData(etc);

        Representation entity = new JacksonRepresentation<MyData>(myData);


        Representation response =;

This is all fine as far as I know. But I receive an error in my ServerResource derived class when I try and
deserialize the object using Jackson:

            MyData myData = new JacksonRepresentation<>(entity, MyData.class)

com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: UNKNOWN; line: 1, column: 1]
	at com.fasterxml.jackson.databind.JsonMappingException.from(
	at com.fasterxml.jackson.databind.ObjectReader._initForReading(
	at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(
	at com.fasterxml.jackson.databind.ObjectReader.readValue(
	at org.restlet.ext.jackson.JacksonRepresentation.getObject(

Is this the correct approach? Am I doing something wrong in my test case in setting up the call to my resource class?



Shai Levit | 6 Aug 19:40 2014

Complexity in understanding

So I am working on a more complex format from the tutorials but running into some odd issues and/or
confusions that I don't quite understand.
To simplify things, I attached my code. There are 3 java files (Main, Tracer and RootRoute).
I am trying to get a better understanding on Router, Directory, Application, Root, Restlet and context.
The code compiles fine, but I get an error:

The filter org.restlet.engine.application.RangeFilter <at> 5c4ef185 was executed without a next Restlet
attached to
2014-08-06	13:37:42	0:0:0:0:0:0:0:1	-	-	8183	GET	/	-	500	486	0	10	http://localhost:8183	Mozilla/5.0
(Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36	-

Attachment ( application/octet-stream, 2352 bytes
Attachment ( application/octet-stream, 695 bytes
Attachment ( application/octet-stream, 658 bytes
Ole Hornischer | 6 Aug 12:41 2014

CDI Weld Issue on Wildfly 8.1 due to public field

Hey everyone,
I discovered an issue with the deployment of the restlet libraries in a project (XWiki) on the current
Wildfly 8.1

When trying to deploy the application with the bundled libraries I get the following error:

Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000075: Normal scoped managed bean
implementation class has a public field:  [EnhancedAnnotatedFieldImpl] public org.restlet.ext.jaxrs.internal.provider.JaxbElementProvider.contextResolver

A bit of googleing and a peek into the source code showed me, that there is indeed a public field named
contextResolver in the org.restlet.ext.jaxrs.internal.provider.AbstractJaxbProvider (in
version 2.2.2) which is commented to be public for testing purposes. 

Is it possible to change the field to be private and test via a getter Method? Because like this restlets
become unusable on Wildfly, at least on vanilla Wildfly.



Robert Barnett | 6 Aug 06:17 2014

Restlet 2.2.1 only serves from one thread

I had a very strange latency issue pop up today which I have isolated to an apparent issue with 2.2.1.  I can
take the "Hello World" stand alone example from and modify the Resource to be:

package firstSteps;

import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;

public class HelloWorldResource extends ServerResource {

     <at> Get
    public String represent() throws InterruptedException
        return "hello, world";

I then take two browsers, Firefox and Chrome, and make a request from each.  Firefox shows Hello World after
10 seconds and Chrome after 20.  Looking at the console I see that both requests were serviced by the same
thread.  I can the take my load generator, jMeter, and send a lot of requests in parallel to Restlet.  Restlet
processes them one at a time and always with the same thread. It is as if the default thread pool size is one.
When I downgrade to 2.1 and run the same tests, the issue goes away with a variety of threads servicing the
requests in parallel.

Please advise.