Announcement Announcement Module
Collapse
No announcement yet.
The requested resource (/j_security_check) is not available Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I've tried that, but that that does not help. Any other ideas?

    Comment


    • #17
      What was the cache problem?

      Comment


      • #18
        It was the following error when starting Tomcat:


        Code:
        2007-01-07 20:54:00,687 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationProcessingFilter' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot create inner bean 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1798928' while setting bean property 'userCache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1798928' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot create inner bean 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
        Caused by: 
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot create inner bean 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1798928' while setting bean property 'userCache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1798928' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot create inner bean 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
        Caused by: 
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot create inner bean 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1798928' while setting bean property 'userCache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1798928' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot create inner bean 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
        Caused by: 
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1798928' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Cannot create inner bean 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
        Caused by: 
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#151dcd6' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
        Caused by: 
        org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
        Caused by: 
        java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
        	at org.springframework.cache.ehcache.EhCacheFactoryBean.<init>(EhCacheFactoryBean.java:64)
        Last edited by hirschs; Jan 9th, 2007, 10:00 AM. Reason: Surround with code tags

        Comment


        • #19
          I would presume either you don't have ecache on the classpath or you have an old version of it.

          Comment


          • #20
            Yes, I neede to used ehcache1.2.

            I finally got the authentication to work using a simple user.properties
            file.

            There were several problems. Firstly I needed to put the full path
            '/za.gov.statssa.cmr.ui.Cmr/j_acegi_security_check' in the acegi config
            file,
            while only 'j_acegi_security' check in the form action. I also needed
            to
            remove the CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON in the
            filterChainProxy
            because of the mixed case in the URL.

            Thanks everyone for your assistance.

            Comment


            • #21
              can you show your web.xml? do you write in web.xml configs, for example
              Code:
              <login-config>
              		<auth-method>FORM</auth-method>
              		<realm-name>MyFirst Protected Area</realm-name>
              		<form-login-config>
              			<form-login-page>/login.jsp</form-login-page>
              		</form-login-config>
              	</login-config>
              
              
              
              <filter-name>Acegi Authentication Processing Filter</filter-name>
                <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
                <init-param>
                  <param-name>targetClass</param-name>
                  <param-value>org.acegisecurity.ui.webapp.AuthenticationProcessingFilter</param-value>
                </init-param>
              </filter>
              
              <filter-mapping>
                <filter-name>Acegi Authentication Processing Filter</filter-name>
                <url-pattern>/*</url-pattern>
              </filter-mapping>
              Last edited by LexeY; Nov 6th, 2007, 05:38 AM.

              Comment

              Working...
              X