Thanks for entering the jira issue for me! I pulled from svn and built my own jar with only two changes and I think it's working now (the client hasn't called to complain yet :-) ).
All I did was change two places that use EmptyResultDataAccessException to use the next superclass up, which is IncorrectResultSizeDataAccessException. The two classes that I changed were FilterBasedLdapUserSearch (imports and line 126) and LdapTemplate (imports and line 248). I don't know if this would be a suitable fix for the general population, but it seems pretty self contained. The LdapTemplate throws and the FilterBasedLdapUserSearch catches it and rethrows as a UsernameNotFoundException. I think this change would be fine for general release, but the author of the code should definitely make that call. Thanks for the quick response. Ben PS: I just heard from the client and they're back in business with my patched jar. Ray Krueger wrote: > http://opensource.atlassian.com/projects/spring/browse/SEC-288 > > I made it a blocker for 1.0.1 > This means that the 1078 people that have downloaded 1.0.0 to this > point cannot use Ldap correct? > > On 5/31/06, Carlos Sanchez <[EMAIL PROTECTED]> wrote: > >>I'm afraid it's true. It no longer compiles under Spring 1.2.7. >>Something to log in JIRA for a 1.0.1. >> >>On 5/31/06, Ben Munat <[EMAIL PROTECTED]> wrote: >> >>>Hi, >>> >>>We upgraded to the 1.0 final jar the other day and things worked fine on our >>>dev build, >>>which uses an InMemoryDao implementation. However, last night we tried to >>>push out a build >>>to the client and the context will no longer start due to a NoClassDefFound >>>in the Acegi >>>code. (FilterBasedLdapUserSearch) >>> >>>I googled for the class -- >>>org/springframework/dao/EmptyResultDataAccessException -- and >>>it's only in Spring 2.0! I hope 1.0 final hasn't presumed that people will >>>switch to >>>Spring 2.0. Is there something I need to change ldap-wise when moving from >>>1.0 rc2 to 1.0 >>>final? >>> >>>Stacktrace below. Any help greatly appreciated. Heh, this was supposed to be >>>the real >>>production deploy with the client hitting the system hard tomorrow morning >>>(and needing to >>>do some admin setup today). >>> >>>thanks, >>> >>>Ben >>> >>>2006-05-31 00:34:15,900 INFO >>>org.springframework.web.context.ContextLoader - Root >>>WebApplicationContext: initialization started >>> 2006-05-31 00:34:15,902 INFO >>>org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/totaltime] >>> - Loading Spring root WebApplicationContext >>> 2006-05-31 00:34:15,952 INFO org.springframework.core.CollectionFactory >>>- JDK 1.4+ collections available >>> 2006-05-31 00:34:15,962 INFO org.springframework.core.CollectionFactory >>>- Commons Collections 3.x available >>> 2006-05-31 00:34:16,119 ERROR >>>org.springframework.web.context.ContextLoader - Context initialization >>>failed >>> org.springframework.beans.factory.BeanDefinitionStoreException: Error >>>registering bean with name 'userSearch' defined in ServletContext >>>resource >>>[/WEB-INF/config/acegi/fragments/ldapAuthenticationProviderCommon.xml]: >>>Class that bean class >>>[org.acegisecurity.ldap.search.FilterBasedLdapUserSearch] depends on not >>>found; nested exception is java.lang.NoClassDefFoundError: >>>org/springframework/dao/EmptyResultDataAccessException >>>java.lang.NoClassDefFoundError: >>>org/springframework/dao/EmptyResultDataAccessException >>> at java.lang.Class.forName0(Native Method) >>> at java.lang.Class.forName(Class.java:242) >>> at org.springframework.util.ClassUtils.forName(ClassUtils.java:109) >>> at >>>org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:466) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:432) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:347) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:197) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.importBeanDefinitionResource(DefaultXmlBeanDefinitionParser.java:374) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:338) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:197) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.importBeanDefinitionResource(DefaultXmlBeanDefinitionParser.java:374) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:338) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:197) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.importBeanDefinitionResource(DefaultXmlBeanDefinitionParser.java:374) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:338) >>> at >>>org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:197) >>> at >>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295) >>> >>> >>>_______________________________________________ >>>Home: http://acegisecurity.org >>>Acegisecurity-developer mailing list >>>[email protected] >>>https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer >>> >> >> >>-- >>I could give you my word as a Spaniard. >>No good. I've known too many Spaniards. >> -- The Princess Bride >> >> >>_______________________________________________ >>Home: http://acegisecurity.org >>Acegisecurity-developer mailing list >>[email protected] >>https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer >> > > > > _______________________________________________ > Home: http://acegisecurity.org > Acegisecurity-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer _______________________________________________ Home: http://acegisecurity.org Acegisecurity-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
