Announcement Announcement Module
Collapse
No announcement yet.
problem with HttpSessionContextIntegrationFilter.generateNew Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem with HttpSessionContextIntegrationFilter.generateNew

    Hi all,

    I am new to ACEGI Security and facing few problems:?. if anyone out there can help me out of this it would be of great effect to my work

    I have to implement the authentication module and i m facing the java.lang.NullPointerException
    at net.sf.acegisecurity.context.HttpSessionContextInt egrationFilter.generateNewContext(HttpSessionConte xtIntegrationFilter.java:288)


    I am using the 8.2 release and this exception might be due to null context in the generateNewContext method in the HttpSessionContextIntegrationFilter.

    here is my web.xml entries.
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <filter>
    <filter-name>HttpSessionContextIntegrationFilter</filter-name>
    <filter-class>net.sf.acegisecurity.context.HttpSessionCont extIntegrationFilter</filter-class>
    </filter>

    <filter>
    <filter-name>authenticationProcessingFilter</filter-name>
    <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
    <init-param>
    <param-name>targetClass</param-name>
    <param-value>net.sf.acegisecurity.ui.webapp.Authenticatio nProcessingFilter</param-value>
    </init-param>
    </filter>

    <filter-mapping>
    <filter-name>HttpSessionContextIntegrationFilter</filter-name>
    <url-pattern>/secure/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>authenticationProcessingFilter</filter-name>
    <url-pattern>/secure/*</url-pattern>
    </filter-mapping>

    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListe ner
    </listener-class>
    </listener>



    and my applicationContext.xml entries are

    <bean id="authenticationManager" class="net.sf.acegisecurity.providers.ProviderMana ger">
    <property name="providers">
    <list>
    <ref bean="daoAuthenticationProvider"/>
    </list>
    </property>
    </bean>

    <bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthe nticationProvider">
    <property name="authenticationDao"><ref bean="authenticationDAOImpl"/></property>
    </bean>

    <bean id="authenticationDAOImpl" class="com.apr.aol.acegi.authentication.Authentica tionDAOImpl">
    </bean>



    <bean id="authenticationProcessingFilter" class="net.sf.acegisecurity.ui.webapp.Authenticati onProcessingFilter">
    <property name="authenticationManager">
    <ref bean="authenticationManager"/>
    </property>
    <property name="authenticationFailureUrl">
    <value>/login.jsp</value>
    </property>
    <property name="defaultTargetUrl">
    <value>/</value>
    </property>
    <property name="filterProcessesUrl">
    <value>/secure/j_acegi_security_check.do</value>
    </property>
    </bean>

    Thanks in advance to all.

    Raval.

  • #2
    HttpSessionContextIntegrationFilter should not be called from web.xml. It needs to be used with FilterToBeanProxy, or preferably, FilterChainProxy. Please see the Contacts sample for how to configure it. Also, please upgrade to 0.8.3 as it contains an important fix.

    Comment

    Working...
    X