Hey Folks, Restlet API rocks! I'm just getting to learn this wonderful framework and I'm really enjoying using it so far. I've run into a small problem that I can't seem to find an answer for after digging through numerous code examples and mailing list questions.
First off, I tried the ServerServlet connector and configured my web.xml file as so: <servlet> <servlet-name>ServerServlet</servlet-name> <servlet-class>com.noelios.restlet.ext.servlet.ServerServlet</servlet-class> </servlet> <!-- Catch all requests (Mandatory) --> <servlet-mapping> <servlet-name>ServerServlet</servlet-name> <url-pattern>/impression/*</url-pattern> </servlet-mapping> and this works fine. I have no problem and I can deploy and render the application without any problems. The next step was trying to integrate Spring using the SpringServerServlet connector which is giving me problems. Here is my configuration for my web.xml file: <context-param> <param-name>org.restlet.application</param-name> <param-value>foo.bar.web.ImpressionRestlet</param-value> </context-param> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/application-context.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> - <!-- Restlet adapter (Mandatory) --> <servlet> <servlet-name>ServerServlet</servlet-name> <servlet-class>com.noelios.restlet.ext.spring.SpringServerServlet</servlet-class> </servlet> <!-- Catch all requests (Mandatory) --> <servlet-mapping> <servlet-name>ServerServlet</servlet-name> <url-pattern>/impression/*</url-pattern> </servlet-mapping> and here is my application-context.xml: <bean id="component" class="org.restlet.ext.spring.SpringComponent"> <property name="defaultTarget" ref="springRouter" /> </bean> <bean id="springRouter" class="org.restlet.ext.spring.SpringRouter"> <property name="attachments"> <map> <entry key="/impression/{impression}" value-ref="impressionRestlet" /> </map> </property> </bean> <bean id="impressionRestlet" class="foo.bar.web.ImpressionRestlet"> <property name="service" ref="impressionService" /> </bean> <bean id="component.context" class="org.springframework.beans.factory.config.PropertyPathFactoryBean" /> <bean id="impressionService" class="foo.bar.service.impl.ImpressionServiceImpl"> <property name="jdbcTemplateFacade" ref="jdbcTemplateFacade" /> </bean> When I try to run the application I get the following stack trace: java.lang.IllegalArgumentException: 'name' must not be null at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.beans.factory.BeanFactoryUtils.transformedBeanName(BeanFactoryUtils.java:71) at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:859) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at com.noelios.restlet.ext.spring.SpringServerServlet.createComponent(SpringServerServlet.java:134) at com.noelios.restlet.ext.servlet.ServerServlet.getComponent(ServerServlet.java:637) at com.noelios.restlet.ext.servlet.ServerServlet.init(ServerServlet.java:716) at javax.servlet.GenericServlet.init(GenericServlet.java:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:613) I am using Spring 2.5 and Restlet 1.1-SNAPSHOT. Can anybody provide insight as to what I am doing wrong? If you can provide your config files that would be great too. Thank you for help! Cheers _________________________________________________________________ Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008