Possible Bug

Aug 2, 2011 at 4:38 PM
Edited Aug 2, 2011 at 4:38 PM

Following the steps in the help (.chm) for the Spring Security Single-SignOn Filter it gives the following XML

<bean id="negotiateSecurityFilterProvider" class="waffle.servlet.spi.NegotiateSecurityFilterProvider">
    <constructor-arg ref="waffleWindowsAuthProvider" />
    <property name="protocols">

Anytime I use that XML I get the following Exception:

Ignoring constructor [public waffle.servlet.spi.SecurityFilterProviderCollection(java.lang.String[],waffle.windows.auth.IWindowsAuthProvider)] of bean 'waffleSecurityFilterProviderCollection':
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'waffleSecurityFilterProviderCollection' defined in ServletContext resource [/WEB-INF/waffle-servlet.xml]:
Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String[]]: Could not convert constructor argument value of type [java.util.ArrayList] to required type [[Ljava.lang.String;]:
Failed to convert value of type 'java.util.ArrayList' to required type 'java.lang.String[]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [waffle.servlet.spi.NegotiateSecurityFilterProvider] to required type [java.lang.String]:
no matching editors or conversion strategy found

I'm attempting to track down the root cause of the Exception so I'll post again if I have any updates. My goal was to force it to use NTLM first and to fall back on Negotiate if needed.
Aug 2, 2011 at 5:01 PM
Edited Aug 2, 2011 at 5:17 PM

Actually on second thought it seems like Spring is simply calling the wrong constructor. These are the two relevant constructors:



public SecurityFilterProviderCollection(SecurityFilterProvider[] providers) {
		for(SecurityFilterProvider provider : providers) {
			_log.info("using '" + provider.getClass().getName() + "'");
	public SecurityFilterProviderCollection(String[] providerNames, IWindowsAuthProvider auth) {
		for(String providerName : providerNames) {
			providerName = providerName.trim();
			_log.info("loading '" + providerName + "'");
			try {
				Class<SecurityFilterProvider> providerClass = (Class<SecurityFilterProvider>) Class.forName(providerName);
				Constructor c = providerClass.getConstructor(IWindowsAuthProvider.class);
				SecurityFilterProvider provider = (SecurityFilterProvider) c.newInstance(auth); 
			} catch (Exception e) {
				_log.error("error loading '" + providerName + "': " + e.getMessage());				
				throw new RuntimeException(e);

The error message indicates that the second of the above two is being called, but it seems to me that the first should be called according to the XML I showed above.

Aug 2, 2011 at 7:39 PM

Actually it turns out it was some sort of error with having the wrong jar files. By ensuring that my spring framework jars were all from correct versions, it started working again.


See http://stackoverflow.com/questions/4511902/spring-constructor-injection-error