Mail sent on the 09/10 and apparently lost.
---

Hi Colin,

I think this has already been mentionned and fixed. Could you try with the latest snapshot (http://www.restlet.org/downloads/snapshot.zip)?

Best regards,
Thierry Boileau
--
Restlet ~ Core developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


Restlet-1.1rc1 with Spring2.5.

There seem to be some sort of conflict with creating Component and Application
objects when using the new Spring integration classes. 

I want to use the default component and so I removed the following setting from
my web.xml and spring bean config.

    <context-param>
        <param-name>org.restlet.component</param-name>
        <param-value>component</param-value>
    </context-param>

    <bean id="component" class="org.restlet.ext.spring.SpringComponent">
   ... <bean>


However, in SpringServerServlet.java, line 134, the statement

    component = (Component) getWebApplicationContext().getBean(componentBeanName);

will throw an IllegalArgumentException if componentBeanName is null or
NoSuchBeanDefinitionException if the bean does not exist, ie no
'org.restlet.component' and 'component'. Null component is never returned and
tested. The call to create the default component is never called.


To avoid the exceptions I add the 'org.restlet.component' and 'component' init
parameter settings. But this prevents the Application object to be created via
the method getApplication() in ServerServlet.java, line 580.

The call to isDefaultComponent() always returns false because I've added the 
'org.restlet.component' context init parameter. This in turn makes the method
getApplication() return null always. There is also a null SuppressWarnings
annotation.

Is there a way around this? 

Thanks.
  

Reply via email to