Hi Thierry, I had the same issue, IIRC the problem is that Restlet instantiates a Resource per request. If that Resource is not managed by spring,your injected DAO will always be null. You need to use org.restlet.ext.spring.SpringFinder in your Application like so: (be warned, there's more to this than what I just show here, and I'm using the WadlApplication class.In short you will need the full Spring initialised Restlet paradigm defined)
<bean name="rootResource" class="com.foo.resource.RootServerResource" /> <bean id="myApplication" class="org.restlet.ext.wadl.WadlApplication"> <constructor-arg> <util:property-path path="component.context" /> </constructor-arg> <property name="encoderService.enabled" value="true"/> <property name="name" value="My Server Component" /> <property name="description" value="My Service component" /> <property name="owner" value="My Company" /> <property name="author" value="Ioannis Mavroukakis" /> <property name="autoDescribing" value="true"/> <property name="inboundRoot"> <bean class="org.restlet.ext.spring.SpringRouter"> <constructor-arg ref="myApplication" /> <property name="attachments"> <map> <entry key="/"> <bean class="org.restlet.ext.spring.SpringFinder"> <lookup-method name="create" bean="rootResource" /> </bean> </entry> </map> </property> </bean> </property> </bean> ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2993167