-1

从 Spring 3.0.5 移到 Spring 3.1.1 现在我的应用程序无法运行,有人可以告诉我发生了什么吗?我删除了所有 3.0.5 罐子并添加了 3.1.1 罐子

2012-05-14 12:01:41,195 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.context.ApplicationContextException: Couldn't locate: org.springframework.ldap.core.support.BaseLdapPathContextSource.  If you are using LDAP with Spring Security, please ensure that you include the spring-ldap jar file in your application; nested exception is java.lang.ClassNotFoundException: org.springframework.ldap.core.support.BaseLdapPathContextSource
    at org.springframework.security.config.ldap.ContextSourceSettingPostProcessor.postProcessBeanFactory(ContextSourceSettingPostProcessor.java:34)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:664)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.springframework.ldap.core.support.BaseLdapPathContextSource
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
    at org.springframework.security.config.ldap.ContextSourceSettingPostProcessor.postProcessBeanFactory(ContextSourceSettingPostProcessor.java:32)
    ... 21 more
May 14, 2012 12:01:41 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.context.ApplicationContextException: Couldn't locate: org.springframework.ldap.core.support.BaseLdapPathContextSource.  If you are using LDAP with Spring Security, please ensure that you include the spring-ldap jar file in your application; nested exception is java.lang.ClassNotFoundException: org.springframework.ldap.core.support.BaseLdapPathContextSource
    at org.springframework.security.config.ldap.ContextSourceSettingPostProcessor.postProcessBeanFactory(ContextSourceSettingPostProcessor.java:34)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
4

1 回答 1

3

您是否按照它的建议进行操作并验证您的应用程序中包含 spring-ldap ?那显然是有问题的班级所在的地方。我的猜测是您盲目地删除了所有名为 spring-* 的 jar 并添加到所有 3.1 spring-* jar 文件中,但 spring-ldap不包含在基本 spring 3.1 发行版中。事实上,它的版本控制是完全独立的,目前是 1.3.1 版本

于 2012-05-14T16:10:15.410 回答