Tomcat 6で実行されるSpring Integrationアプリケーションがあります。それはmessage-driven-channel-adapter
リモートのActive MQサーバーと通信します。これまでのところ、私は自分の仕事をすることができます。
ただし、Tomcat をシャットダウンすると、catalina ログで次の例外が無限にループします。
Exception in thread "org.springframework.jms.listener.DefaultMessageListenerContainer#0-178" Exception in thread "org.springframework.jms.listener.DefaultMessageListenerContainer#0-179"
java.lang.NullPointerException
at org.apache.log4j.LogManager.getLogger(LogManager.java:188)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
at org.apache.commons.logging.impl.Log4JLogger.trace(Log4JLogger.java:166)
at org.springframework.jms.support.JmsUtils.closeMessageConsumer(JmsUtils.java:158)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1111)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:971)
at java.lang.Thread.run(Thread.java:722)
java.lang.NullPointerException
at org.apache.log4j.LogManager.getLogger(LogManager.java:188)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
at org.apache.commons.logging.impl.Log4JLogger.trace(Log4JLogger.java:166)
at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:115)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1112)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:971)
at java.lang.Thread.run(Thread.java:722)
Nov 13, 2012 7:23:37 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.apache.log4j.spi.VectorWriter. The eventual following stack trace is ca
used by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:154)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at org.apache.commons.logging.impl.Log4JLogger.warn(Log4JLogger.java:234)
at org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerSetupFailure(DefaultMessageListenerContainer.java:831)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:981)
at java.lang.Thread.run(Thread.java:722)
これについて何か考えがありますか?Tomcat をシャットダウンする前に、Spring コンテキストを閉じるか破棄する必要がありますか?
あなたの助けに感謝
ありがとう、ケス