I have an application bundled with Spring Security and it works perfectly when deployed on a Tomcat server.
However, when the same WAR is deployed to Websphere; application fails to start giving the following error.
The status of the application in Websphere shows deployed and started.Code:javax.servlet.ServletException: [springSecurityFilterChain]: Could not be initialized.
Using Spring Security 3.0.7 and Websphere 7.0.0.17
Here's my web.xml
I am using PreAuth Filter for Siteminder. Here's my security-app-context.xml:Code:<!-- Spring Security configuration Start--> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/app-servlet.xml, /WEB-INF/security-app-context.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- Spring Security configuration End-->
Code:<http use-expressions="true"> <intercept-url pattern="/admin/**" access="hasRole('ROLE_ADMIN')" /> <intercept-url pattern="/403.jsp" access="permitAll" /> <!-- Allow non-secure access to static resources --> <intercept-url pattern="/css/**" filters="none" /> <intercept-url pattern="/images/**" filters="none" /> <custom-filter ref="siteminderFilter" position="PRE_AUTH_FILTER"/> <!-- <form-login /> --> <logout logout-success-url="/index.jsp"/> </http> <beans:bean id="siteminderFilter" class="org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter"> <beans:property name="principalRequestHeader" value="SM_USER"/> <beans:property name="authenticationManager" ref="authenticationManager" /> <beans:property name="exceptionIfHeaderMissing" value="false"/> </beans:bean> <beans:bean id="AdminUserDetailsService" class="com.fw.security.auth.MyUserDetailsService"> </beans:bean> <beans:bean id="preauthAuthProvider" class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider"> <beans:property name="preAuthenticatedUserDetailsService"> <beans:bean id="userDetailsServiceWrapper" class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper"> <beans:property name="userDetailsService" ref="AdminUserDetailsService"/> </beans:bean> </beans:property> </beans:bean> <authentication-manager alias="authenticationManager"> <authentication-provider ref="preauthAuthProvider" /> </authentication-manager>


Reply With Quote
