2016-03-24 97 views
0

我在單機模式下使用Wildfly 10,當我開始Wildfly,我看到了錯誤信息,說Wildfly 10 ClassNotFoundException的:org.jboss.logging.appender.DailyRollingFileAppender

java.lang.ClassNotFoundException: org.jboss.logging.appender.DailyRollingFileAppender from [Module "org.jboss.log4j.logmanager:main" from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: /opt/jboss/modules,/opt/jboss/modules/system/layers/base))] 

我解壓的jar文件在模塊目錄下,似乎DailyRollingFileAppender類不在org.apache.log4j,而是org.jboss.logging。我不確定是否需要進行任何配置。

另一件事是:這個錯誤信息只顯示在控制檯上,而不是在我的日誌文件中,不知道爲什麼。其他錯誤消息顯示在我的日誌文件中。

以下是堆棧跟蹤:

10:26:21,167 ERROR [stderr] log4j:ERROR Could not create an Appender. Reported error follows. 
10:26:21,174 ERROR [stderr] java.lang.ClassNotFoundException: org.jboss.logging.appender.DailyRollingFileAppender from [Module "org.jboss.log4j.logmanager:main" from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: /opt/jboss/modules,/opt/jboss/modules/system/layers/base))] 
10:26:21,174 ERROR [stderr]  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) 
10:26:21,174 ERROR [stderr]  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) 
10:26:21,174 ERROR [stderr]  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) 
10:26:21,174 ERROR [stderr]  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) 
10:26:21,174 ERROR [stderr]  at java.lang.Class.forName0(Native Method) 
10:26:21,175 ERROR [stderr]  at java.lang.Class.forName(Class.java:264) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:247) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1001) 
10:26:21,175 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:867) 
10:26:21,176 ERROR [stderr]  at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:794) 
10:26:21,176 ERROR [stderr]  at org.jboss.as.logging.deployments.LoggingConfigDeploymentProcessor.configure(LoggingConfigDeploymentProcessor.java:238) 
10:26:21,176 ERROR [stderr]  at org.jboss.as.logging.deployments.LoggingConfigDeploymentProcessor.processDeployment(LoggingConfigDeploymentProcessor.java:114) 
10:26:21,176 ERROR [stderr]  at org.jboss.as.logging.deployments.LoggingConfigDeploymentProcessor.processDeployment(LoggingConfigDeploymentProcessor.java:144) 
10:26:21,176 ERROR [stderr]  at org.jboss.as.logging.deployments.AbstractLoggingDeploymentProcessor.deploy(AbstractLoggingDeploymentProcessor.java:67) 
10:26:21,176 ERROR [stderr]  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147) 
10:26:21,176 ERROR [stderr]  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) 
10:26:21,176 ERROR [stderr]  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) 
10:26:21,176 ERROR [stderr]  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
10:26:21,177 ERROR [stderr]  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
10:26:21,177 ERROR [stderr]  at java.lang.Thread.run(Thread.java:745) 

謝謝,海倫

回答

1

我得到的幫助來自社會各界的Jboss,我擁有的log4j.xml戰爭文件,並用組織內打包的應用程序。 jboss.logging.appender.DailyRollingFileAppender。這個log4j.xml導致了這個錯誤信息。在standalone.xml日誌子系統中將use-deployment-logging-config設置爲false可以解決此問題。

海倫

相關問題