I'm getting the error below. I'm using both the Servlet and the Spring 
extensions. I figure it must be an XML config file issue so I'm including my 
web.xml and the two bean container files. The web.xml and the 
idservlet-servlet.xml are both in the WEB-INF folder and the 
applicationContext.xml is in the src folder. Using JEE 2.1 M5.

SEVERE: Allocate exception for servlet idservlet
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 
'root' is defined
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:509)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
        at 
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1044)
        at 
org.restlet.ext.spring.RestletFrameworkServlet.getTargetRestlet(RestletFrameworkServlet.java:141)
        at 
org.restlet.ext.spring.RestletFrameworkServlet.initFrameworkServlet(RestletFrameworkServlet.java:163)
        at 
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:308)
        at 
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
        at javax.servlet.GenericServlet.init(GenericServlet.java:160)
        at 
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1189)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1103)
        at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:813)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
        at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2777981
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:util="http://www.springframework.org/schema/util";
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
       					   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       					   http://www.springframework.org/schema/util 
       					   http://www.springframework.org/schema/util/spring-util-2.5.xsd";>
	
       <import resource="classpath:applicationContext.xml"/>

</beans>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
		 xmlns="http://java.sun.com/xml/ns/javaee"; 
		 xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; 
		 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; 
		 id="WebApp_ID" 
		 version="3.0">
  <servlet>
  	<servlet-name>idservlet</servlet-name>
    <servlet-class>org.restlet.ext.spring.RestletFrameworkServlet</servlet-class>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>idservlet</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>
</web-app>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:util="http://www.springframework.org/schema/util";
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
       					   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
       					   http://www.springframework.org/schema/util 
       					   http://www.springframework.org/schema/util/spring-util-2.5.xsd";>

	<bean id="component" class="org.restlet.ext.spring.SpringComponent">
		<property name="name" value="APIUS Identity component" />
		<property name="description" value="Authentication and authorization. Session management." />
		<property name="owner" value="apius.org" />
		<property name="author" value="Paul Morris" />
		<property name="client" value="http" />
		<property name="defaultHost" ref="defaultHost" />
	</bean>
	
	<bean id="defaultHost" class="org.restlet.ext.spring.SpringHost">
		<constructor-arg ref="component" />
		<property name="defaultAttachment" ref="openAmSessionApplication" />
	</bean>
	
	<bean id="componentChildContext" class="org.restlet.Context">
		<lookup-method name="createChildContext" bean="component.context" />
	</bean>
	
	<bean id="openAmSessionApplication" class="org.restlet.Application">
		<constructor-arg ref="componentChildContext" />
		<property name="name" value="OpenAM Session Application"/>
		<property name="description" value="The APIUS session API meets the OpenAM RESTful API." />
		<property name="owner" value="apius.org" />
		<property name="author" value="Paul Morris" />
		<property name="inboundRoot">
			<bean class="org.restlet.ext.spring.SpringRouter">
				<constructor-arg ref="openAmSessionApplication" />
				<property name="attachments">
					<map>
						<entry key="/session" value="openAmSession" />
						<entry key="/session/attributes" value="openAmSessionAttributes" />
					</map>
				</property>
			</bean>
		</property>
	</bean>
	
	<bean id="engine" class="org.restlet.engine.Engine" factory-method="getInstance">
		<property name="registeredAuthenticators">
			<list merge="true">
				<bean class="org.apius.identity.session.SessionAuthenticatorHelper" />
			</list>
		</property>
	</bean>
	
	<bean id="openAmSession" class="org.apius.identity.session.openam.SessionImpl">
		<constructor-arg ref="openAmSessionProvisionerProxy" />
		<constructor-arg ref="openAmAuthenticator" />
	</bean>
	
	<bean id="openAmResponseParser" class="org.apius.identity.session.openam.ResponseParser">
		<property name="documentHelper" ref="documentHelper"/>
	</bean>
	
	<bean id="documentHelper" class="org.apius.xml.DocumentHelper" />
	
	<bean id="openAmSessionProvisionerProxy" class="org.apius.identity.session.openam.SessionProvisionerProxyImpl">
		<constructor-arg ref="openAmResponseParser" />
	</bean>
	
	<bean id="openAmSessionAttributes" class="org.apius.identity.session.openam.SessionAttributesImpl">
		<constructor-arg ref="openAmSessionProvisionerProxy" />
		<constructor-arg ref="openAmAuthenticator" />
	</bean>
	
	<bean id="openAmAuthenticator" class="org.apius.identity.session.filter.SessionAuthenticator">
		<constructor-arg ref="componentChildContext" />
		<constructor-arg value="nmpg" />
		<constructor-arg ref="openAmSessionVerifier" />
		<constructor-arg ref="openAmSessionProvisionerProxy" />
	</bean>
	
	<bean id="openAmAuthorizer" class="org.apius.identity.session.filter.SessionAuthorizer">
		<constructor-arg ref="openAmSessionProvisionerProxy" />
	</bean>
	
	<bean id="openAmSessionVerifier" class="org.apius.identity.session.SessionVerifier">
		<constructor-arg ref="openAmSessionProvisionerProxy" />
	</bean>
	
</beans>

Reply via email to