java – 应用程序仅在Tomcat重启后才有效

我有一个奇怪的问题.我部署了一个webapplication …当我启动tomcat时,web应用程序出现没有错误.但是,如果我在tomcat管理器中停止/启动webapplication,我会收到一个classnotfound异常…

Tomcat启动日志:

2015-12-13 22:13:03 Commons Daemon procrun stdout initialized
2015-12-13 22:13:16,466 | INFO  | localhost-startStop-1 | o.s.w.c.ContextLoader | Root WebApplicationContext: initialization started
2015-12-13 22:13:16,761 | INFO  | localhost-startStop-1 | o.s.w.c.s.XmlWebApplicationContext | Refreshing Root WebApplicationContext: startup date [Sun Dec 13 22:13:16 CET 2015]; root of context hierarchy
2015-12-13 22:13:16,911 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/root-context.xml]
2015-12-13 22:13:17,381 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-security.xml]
2015-12-13 22:13:17,441 | INFO  | localhost-startStop-1 | o.s.s.c.SpringSecurityCoreVersion | You are running with Spring Security Core 4.0.1.RELEASE
2015-12-13 22:13:17,455 | INFO  | localhost-startStop-1 | o.s.s.c.SecurityNamespaceHandler | Spring Security 'config' module version is 4.0.1.RELEASE
2015-12-13 22:13:17,965 | INFO  | localhost-startStop-1 | o.s.s.c.h.AuthenticationConfigBuilder | No login page configured. The default internal one will be used. Use the 'login-page' attribute to set the URL of the login page.
2015-12-13 22:13:17,977 | INFO  | localhost-startStop-1 | o.s.s.c.h.HttpSecurityBeanDefinitionParser | Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 200, Root bean: class [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 400, Root bean: class [org.springframework.security.web.header.HeaderWriterFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 500, Root bean: class [org.springframework.security.web.csrf.CsrfFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 600, Root bean: class [org.springframework.security.web.authentication.logout.LogoutFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 700, <org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0>, order = 1100, Root bean: class [org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1300, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1500, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1600, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2000, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2100, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2200, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 2300]
2015-12-13 22:13:18,007 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-jpa.xml]
2015-12-13 22:13:18,865 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-tx.xml]
2015-12-13 22:13:18,920 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from class path resource [spring-couchdb.xml]
2015-12-13 22:13:18,935 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from class path resource [spring-mail.xml]
2015-12-13 22:13:18,945 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from class path resource [spring-jms.xml]
2015-12-13 22:13:20,393 | INFO  | localhost-startStop-1 | o.s.o.j.LocalContainerEntityManagerFactoryBean | Building JPA container EntityManagerFactory for persistence unit 'default'
2015-12-13 22:13:30,764 | INFO  | localhost-startStop-1 | o.s.s.w.DefaultSecurityFilterChain | Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.SecurityContextPersistenceFilter@2b0fabfa, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@70e6913d, org.springframework.security.web.header.HeaderWriterFilter@53ad62dc, org.springframework.security.web.csrf.CsrfFilter@2235eed, org.springframework.security.web.authentication.logout.LogoutFilter@54a56528, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@108e79f8, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@280d42b7, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@3041a56d, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@4fb21a68, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2c90fbdf, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6eca0c00, org.springframework.security.web.session.SessionManagementFilter@531db679, org.springframework.security.web.access.ExceptionTranslationFilter@c238728, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2746cb70]
2015-12-13 22:13:31,691 | INFO  | localhost-startStop-1 | o.s.c.s.DefaultLifecycleProcessor | Starting beans in phase 2147483647
2015-12-13 22:13:31,701 | INFO  | localhost-startStop-1 | o.s.w.c.ContextLoader | Root WebApplicationContext: initialization completed in 15225 ms
2015-12-13 22:13:31,751 | INFO  | localhost-startStop-1 | o.s.w.s.DispatcherServlet | FrameworkServlet 'appServlet': initialization started
2015-12-13 22:13:31,756 | INFO  | localhost-startStop-1 | o.s.w.c.s.XmlWebApplicationContext | Refreshing WebApplicationContext for namespace 'appServlet-servlet': startup date [Sun Dec 13 22:13:31 CET 2015]; parent: Root WebApplicationContext
2015-12-13 22:13:31,756 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-servlet-context.xml]
2015-12-13 22:13:32,305 | INFO  | localhost-startStop-1 | o.s.b.f.s.DefaultListableBeanFactory | Overriding bean definition for bean 'businessMaximizerStartup': replacing [Generic bean: class [com.mleitner.businessmaximizer.security.BusinessMaximizerStartup]; scope=singleton; abstract=false; lazyInit=false; autowireMode=1; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\maxi\WEB-INF\classes\com\mleitner\businessmaximizer\security\BusinessMaximizerStartup.class]] with [Generic bean: class [com.mleitner.businessmaximizer.security.BusinessMaximizerStartup]; scope=; abstract=false; lazyInit=false; autowireMode=1; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=init; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/spring/spring-servlet-context.xml]]
2015-12-13 22:13:32,305 | INFO  | localhost-startStop-1 | o.s.s.c.SecurityNamespaceHandler | Spring Security 'config' module version is 4.0.1.RELEASE
2015-12-13 22:13:32,335 | INFO  | localhost-startStop-1 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-rest.xml]
2015-12-13 22:13:33,640 | INFO  | localhost-startStop-1 | c.m.b.s.BusinessMaximizerStartup | BusinessMaximizerStartup init called...
2015-12-13 22:13:33,705 | INFO  | localhost-startStop-1 | c.m.b.s.AuthenticationDefaultSetup | AuthenticationDefaultSetup set up defaultusers...
2015-12-13 22:13:38,054 | INFO  | localhost-startStop-1 | o.s.w.s.m.m.a.RequestMappingHandlerMapping | Mapped <removed, because to big>
2015-12-13 22:13:38,521 | INFO  | localhost-startStop-1 | o.s.w.s.m.m.a.RequestMappingHandlerAdapter | Looking for @ControllerAdvice: WebApplicationContext for namespace 'appServlet-servlet': startup date [Sun Dec 13 22:13:31 CET 2015]; parent: Root WebApplicationContext
2015-12-13 22:13:38,661 | INFO  | localhost-startStop-1 | o.s.w.s.m.m.a.RequestMappingHandlerAdapter | Looking for @ControllerAdvice: WebApplicationContext for namespace 'appServlet-servlet': startup date [Sun Dec 13 22:13:31 CET 2015]; parent: Root WebApplicationContext
2015-12-13 22:13:38,721 | INFO  | localhost-startStop-1 | o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver | Detected @ExceptionHandler methods in laraGlobalExceptionHandler
2015-12-13 22:13:38,851 | INFO  | localhost-startStop-1 | o.s.c.s.DefaultLifecycleProcessor | Starting beans in phase 2147483647
2015-12-13 22:13:38,963 | INFO  | localhost-startStop-1 | o.s.w.s.DispatcherServlet | FrameworkServlet 'appServlet': initialization completed in 7212 ms

WebApp停止/启动日志:

2015-12-13 22:14:20,971 | INFO  | http-nio-8080-exec-3 | o.s.w.c.s.XmlWebApplicationContext | Closing WebApplicationContext for namespace 'appServlet-servlet': startup date [Sun Dec 13 22:13:31 CET 2015]; parent: Root WebApplicationContext
2015-12-13 22:14:20,976 | INFO  | http-nio-8080-exec-3 | o.s.c.s.DefaultLifecycleProcessor | Stopping beans in phase 2147483647
2015-12-13 22:14:21,436 | INFO  | http-nio-8080-exec-3 | o.s.w.c.s.XmlWebApplicationContext | Closing Root WebApplicationContext: startup date [Sun Dec 13 22:13:16 CET 2015]; root of context hierarchy
2015-12-13 22:14:21,436 | INFO  | http-nio-8080-exec-3 | o.s.c.s.DefaultLifecycleProcessor | Stopping beans in phase 2147483647
2015-12-13 22:14:21,446 | WARN  | http-nio-8080-exec-3 | o.s.c.a.CommonAnnotationBeanPostProcessor | Invocation of destroy method failed on bean with name 'broker': java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException
2015-12-13 22:14:21,451 | WARN  | http-nio-8080-exec-3 | o.s.b.f.s.DisposableBeanAdapter | Invocation of destroy method 'destroy' failed on bean with name 'broker': java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException
2015-12-13 22:14:21,456 | INFO  | http-nio-8080-exec-3 | o.s.o.j.LocalContainerEntityManagerFactoryBean | Closing JPA EntityManagerFactory for persistence unit 'default'
2015-12-13 22:14:37,232 | INFO  | http-nio-8080-exec-5 | o.s.w.c.ContextLoader | Root WebApplicationContext: initialization started
2015-12-13 22:14:37,522 | INFO  | http-nio-8080-exec-5 | o.s.w.c.s.XmlWebApplicationContext | Refreshing Root WebApplicationContext: startup date [Sun Dec 13 22:14:37 CET 2015]; root of context hierarchy
2015-12-13 22:14:37,667 | INFO  | http-nio-8080-exec-5 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/root-context.xml]
2015-12-13 22:14:38,037 | INFO  | http-nio-8080-exec-5 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-security.xml]
2015-12-13 22:14:38,069 | INFO  | http-nio-8080-exec-5 | o.s.s.c.SpringSecurityCoreVersion | You are running with Spring Security Core 4.0.1.RELEASE
2015-12-13 22:14:38,079 | INFO  | http-nio-8080-exec-5 | o.s.s.c.SecurityNamespaceHandler | Spring Security 'config' module version is 4.0.1.RELEASE
2015-12-13 22:14:38,294 | INFO  | http-nio-8080-exec-5 | o.s.s.c.h.AuthenticationConfigBuilder | No login page configured. The default internal one will be used. Use the 'login-page' attribute to set the URL of the login page.
2015-12-13 22:14:38,304 | INFO  | http-nio-8080-exec-5 | o.s.s.c.h.HttpSecurityBeanDefinitionParser | Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 200, Root bean: class [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 400, Root bean: class [org.springframework.security.web.header.HeaderWriterFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 500, Root bean: class [org.springframework.security.web.csrf.CsrfFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 600, Root bean: class [org.springframework.security.web.authentication.logout.LogoutFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 700, <org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0>, order = 1100, Root bean: class [org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1300, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1500, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1600, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2000, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2100, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2200, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 2300]
2015-12-13 22:14:38,339 | INFO  | http-nio-8080-exec-5 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-jpa.xml]
2015-12-13 22:14:39,135 | INFO  | http-nio-8080-exec-5 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-tx.xml]
2015-12-13 22:14:39,185 | INFO  | http-nio-8080-exec-5 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from class path resource [spring-couchdb.xml]
2015-12-13 22:14:39,195 | INFO  | http-nio-8080-exec-5 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from class path resource [spring-mail.xml]
2015-12-13 22:14:39,205 | INFO  | http-nio-8080-exec-5 | o.s.b.f.x.XmlBeanDefinitionReader | Loading XML bean definitions from class path resource [spring-jms.xml]
2015-12-13 22:14:40,440 | INFO  | http-nio-8080-exec-5 | o.s.o.j.LocalContainerEntityManagerFactoryBean | Building JPA container EntityManagerFactory for persistence unit 'default'
2015-12-13 22:14:49,729 | INFO  | http-nio-8080-exec-5 | o.s.s.w.DefaultSecurityFilterChain | Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.SecurityContextPersistenceFilter@31a5e97c, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@1a82f575, org.springframework.security.web.header.HeaderWriterFilter@1092658, org.springframework.security.web.csrf.CsrfFilter@28a53e0, org.springframework.security.web.authentication.logout.LogoutFilter@1c7ab4c4, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@11dec363, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@592d0ce6, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@9684170, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@407d080d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@27df0eba, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@16a46c9b, org.springframework.security.web.session.SessionManagementFilter@5d8cdcfe, org.springframework.security.web.access.ExceptionTranslationFilter@75999a22, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2a6cf0f5]
2015-12-13 22:14:50,126 | WARN  | http-nio-8080-exec-5 | o.s.w.c.s.XmlWebApplicationContext | Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at 

有人有想法吗?

包膜蛋白的相关信息:

> Windows 7操作系统
> Java 1.8.0_25
> Tomcat 8.0.30
> WebApp使用Spring,Active MQ,CouchDB,Hibernate ……
>某些像ActiveMQ这样的库没有打包到war文件中.它们被放入一个单独的文件夹中.此文件夹将添加到catalina.properties中的common.loader
>某些配置文件未打包到war文件中.它们被放入一个单独的文件夹中.此文件夹已添加到shared.loader.

Spring-Lib详细信息(所有spring * .jar文件):

> activemq-spring-5.13.0
> org.ektorp.spring-1.4.2
> spring-aop-4.1.6.RELEASE
> spring-beans-4.1.6.RELEASE
> spring-context-4.1.6.RELEASE
> spring-core-4.1.6.RELEASE
> spring-data-commons-1.10.0.RELEASE
> spring-data-jpa-1.8.2.RELEASE
> spring-expression-4.1.6.RELEASE
> spring-jdbc-4.1.6.RELEASE
> spring-jms-4.1.6.RELEASE
> spring-messaging-4.1.6.RELEASE
> spring-orm-4.1.6.RELEASE
> spring-security-config-4.0.1.RELEASE
> spring-security-core-4.0.1.RELEASE
> spring-security-web-4.0.1.RELEASE
> spring-tx-4.1.6.RELEASE
> spring-web-4.1.6.RELEASE
> spring-webmvc-4.1.6.RELEASE
> xbean-spring-3.7

Catalina.properties(评论版本有效,但它很脏):

#common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar","${catalina.home}/bmstuff/lib","${catalina.home}/bmstuff/lib/*.jar","${catalina.home}/webapps/maxi/WEB-INF/lib","${catalina.home}/webapps/maxi/WEB-INF/lib/*.jar"

common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"
server.loader=
shared.loader="${catalina.base}/bmstuff/","${catalina.base}/bmstuff/lib","${catalina.base}/bmstuff/lib/*.jar"

更新 – 找到脏解决方案:
我找到了一个肮脏的解决方案…如果我将catalina属性的lib应用程序的lib文件夹添加到common.loader中,我可以启动和停止我的web应用程序而不会出现任何错误.

KR

最佳答案 至少有两个弹簧罐有4.0.9版本:

> spring-orm
> spring-jdbc

Spring Security有它自己的版本,所以应该没问题.

Springg数据我不确定,但可能没问题.

点赞