Hello:
I am completely new to web development and spring. I am trying to set up a form that uses acegisecurity classes. My servlet xml looks like:
<bean id="authenticationMananger" class="org.acegisecurity.providers.ProviderManager ">
<property name="providers">
<list>
<ref bean="daoAuthenticationProvider"/>
</list>
</property>
</bean>
<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenti cationProvider">
<property name="userDetailsService" ref="authenticationDao"/>
<property name="passwordEncoder">
<bean class="org.acegisecurity.providers.encoding.Md5Pas swordEncoder" />
</property>
<property name="saltSource">
<bean class="org.acegisecurity.providers.dao.salt.System WideSaltSource">
<property name="systemWideSalt" value="ABC123XYZ789" />
</bean>
</property>
<property name="userCache">
<bean class="org.acegisecurity.providers.dao.cache.EhCac heBasedUserCache">
<property name="cache" ref="ehcache"/>
</bean>
</property>
</bean>
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheFa ctoryBean">
<property name="cacheManager" ref="cacheManager" />
<property name="cacheName" value="userCache" />
</bean>
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheMa nagerFactoryBean">
<property name="configLocation" value="classpath:ehcache.xml" />
</bean>
<bean id="authenticationDao" class="org.acegisecurity.userdetails.memory.InMemo ryDaoImpl">
<property name="userMap">
<value>
someuser=someuserpwd,ROLE_ADMIN
</value>
</property>
</bean>
I get the following error:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'authenticationMananger' defined in ServletContext resource [/WEB-INF/MicroarrayDBGui-servlet.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/MicroarrayDBGui-servlet.xml]: Cannot create inner bean 'org.acegisecurity.providers.dao.cache.EhCacheBase dUserCache#4c057cc6' of type [org.acegisecurity.providers.dao.cache.EhCacheBased UserCache] while setting bean property 'userCache'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.acegisecurity.providers.dao.cache.EhCacheBase dUserCache#4c057cc6' defined in ServletContext resource [/WEB-INF/MicroarrayDBGui-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
Is there anything wrong with my bean definitions?
Any help would be greatly appreciated. thanks
I am completely new to web development and spring. I am trying to set up a form that uses acegisecurity classes. My servlet xml looks like:
<bean id="authenticationMananger" class="org.acegisecurity.providers.ProviderManager ">
<property name="providers">
<list>
<ref bean="daoAuthenticationProvider"/>
</list>
</property>
</bean>
<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenti cationProvider">
<property name="userDetailsService" ref="authenticationDao"/>
<property name="passwordEncoder">
<bean class="org.acegisecurity.providers.encoding.Md5Pas swordEncoder" />
</property>
<property name="saltSource">
<bean class="org.acegisecurity.providers.dao.salt.System WideSaltSource">
<property name="systemWideSalt" value="ABC123XYZ789" />
</bean>
</property>
<property name="userCache">
<bean class="org.acegisecurity.providers.dao.cache.EhCac heBasedUserCache">
<property name="cache" ref="ehcache"/>
</bean>
</property>
</bean>
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheFa ctoryBean">
<property name="cacheManager" ref="cacheManager" />
<property name="cacheName" value="userCache" />
</bean>
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheMa nagerFactoryBean">
<property name="configLocation" value="classpath:ehcache.xml" />
</bean>
<bean id="authenticationDao" class="org.acegisecurity.userdetails.memory.InMemo ryDaoImpl">
<property name="userMap">
<value>
someuser=someuserpwd,ROLE_ADMIN
</value>
</property>
</bean>
I get the following error:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'authenticationMananger' defined in ServletContext resource [/WEB-INF/MicroarrayDBGui-servlet.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/MicroarrayDBGui-servlet.xml]: Cannot create inner bean 'org.acegisecurity.providers.dao.cache.EhCacheBase dUserCache#4c057cc6' of type [org.acegisecurity.providers.dao.cache.EhCacheBased UserCache] while setting bean property 'userCache'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.acegisecurity.providers.dao.cache.EhCacheBase dUserCache#4c057cc6' defined in ServletContext resource [/WEB-INF/MicroarrayDBGui-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
Is there anything wrong with my bean definitions?
Any help would be greatly appreciated. thanks
Comment