Translated message

A translation of this page exists in English.

JBoss EAP 上で Spring アプリケーションをアンデプロイすると、log4j:WARN "No appenders could be found for logger" と "Please initialize the log4j system properly" というログが出力されます

Solution Verified - Updated -

Issue

JBoss EAP 上で Spring ベースの Web アプリケーションをアンデプロイすると、以下のような log4j WARN ログが出力されます。

INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) undeploy, ctxPath=/myapp
INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myapp]] (HDScanner) Shutting down log4j
INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myapp]] (HDScanner) Closing Spring root WebApplicationContext
ERROR [STDERR] (HDScanner) log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.XmlWebApplicationContext).
ERROR [STDERR] (HDScanner) log4j:WARN Please initialize the log4j system properly.
ERROR [STDERR] (HDScanner) log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

log4j のライブラリと設定ファイル (log4j.properties または log4j.xml) は WAR のクラスパス (WEB-INF/libWEB-INF/classes など) 上に配置されています。何が原因でしょうか? その解決方法は?

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
  • Spring

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content