3

我有一个使用 2 个 Spring 上下文的 Spring MVC Java Web 应用程序。根应用程序上下文,通过 ContextLoaderListener 和 servlet 上下文加载。

我正在使用 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]

我该如何解决这个问题?

4

1 回答 1

1

嗯,这确实是一个小错误。我提交了错误,不到一天就解决了!

https://bugs.eclipse.org/bugs/show_bug.cgi?id=408723

将在 9.0.4 中解决

于 2013-05-23T07:45:07.493 回答