我有一个使用2个Spring上下文的Spring MVC Java Web应用程序。根应用程序上下文,通过ContextLoaderListener加载,以及servlet Context。
我正在使用Jetty Maven插件加载应用程序而没有问题(9.0.0.RC2),但是当我尝试使用控制台扫描程序手动重新加载应用程序时(只需在控制台中输入),应用程序就会被加载再次,但没有调用ContextLoaderListener,我的servlet上下文失败,因为它没有在根上下文中找到bean。
初始加载中的日志如下:
2013-05-21 12:13:32.676:INFO:oejw.WebInfConfiguration:main: Adding virtual project first in resource base list
2013-05-21 12:13:33.149:INFO:oejpw.PlusConfiguration:main: No Transaction manager found - if your webapp requires one, please configure one.
2013-05-21 12:13:34.879:INFO:/:main: No Spring WebApplicationInitializer types detected on classpath
2013-05-21 12:13:36.241:INFO:/:main: Initializing log4j from [classpath:log4j.properties]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/j.calero/.m2/repository/org/slf4j/slf4j-log4j12/1.5.10/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Code/Java/sms/portal-licitacion/target/tmp/portal-notificaciones-0_0_3-SNAPSHOT_war1/WEB-INF/lib/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2013-05-21 12:13:36.690:INFO:/:main: Initializing Spring root WebApplicationContext
12:13:36,691 INFO ContextLoader:273 - Root WebApplicationContext: initialization started
12:13:37,068 INFO XmlWebApplicationContext:495 - Refreshing Root WebApplicationContext: startup date [Tue May 21 12:13:37 CEST 2013]; root of context hierarchy
12:13:37,372 INFO XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [context/applicationContext.xml]
在重装期间:
2013-05-21 09:59:28.179:INFO:oejw.WebInfConfiguration:Console scanner: Adding virtual project first in resource base list
2013-05-21 09:59:28.321:INFO:oejpw.PlusConfiguration:Console scanner: No Transaction manager found - if your webapp requires one, please configure one.
2013-05-21 09:59:28.831:INFO:Portal de Licitación:Console scanner: No Spring WebApplicationInitializer types detected on classpath
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/j.calero/.m2/repository/org/slf4j/slf4j-log4j12/1.5.10/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Code/Java/sms/portal-licitacion/target/tmp/portal-notificaciones-0_0_3-SNAPSHOT_war4/WEB-INF/lib/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2013-05-21 09:59:29.293:INFO:Portal de Licitación:Console scanner: Initializing Spring FrameworkServlet 'portal'
09:59:29,294 INFO DispatcherServlet:444 - FrameworkServlet 'portal': initialization started
09:59:29,316 INFO XmlWebApplicationContext:495 - Refreshing WebApplicationContext for namespace 'portal-servlet': startup date [Tue May 21 09:59:29 CEST 2013]; root of context hierarchy
09:59:29,353 INFO XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [context/portal-servlet.xml]
我该如何解决这个问题?
答案 0 :(得分:1)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=408723
将在9.0.4中解决