标题:JBoss启动时无法转换DailyRollingFileAppender类的解决办法
取消只看楼主
bagger
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:33
帖 子:891
专家分:0
注 册:2005-8-16
 问题点数:0 回复次数:0 
JBoss启动时无法转换DailyRollingFileAppender类的解决办法
错误现象:

12:49:46,251 INFO [STDOUT] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "o
ache.log4j.spi.ErrorHandler" variable.
12:49:46,252 INFO [STDOUT] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
12:49:46,252 INFO [STDOUT] log4j:ERROR [WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:

] whereas object of type
12:49:46,253 INFO [STDOUT] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.se
NoAnnotationURLClassLoader@183f74d].
12:49:46,299 INFO [STDOUT] log4j:ERROR Could not create an Appender. Reported error follows.
12:49:46,300 INFO [STDOUT] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
12:49:46,302 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)

........................

解决办法:

编辑D:\jboss-4.0.5.GA\server\default\deploy\jbossweb-tomcat55.sar\META-INF\jboss-service.xml文件,修改Java2ClassLoadingCompliance和UseJBossWebLoader为true,即:

      <attribute name="Java2ClassLoadingCompliance">true</attribute>
      <attribute name="UseJBossWebLoader">true</attribute>

重启服务器即可.
搜索更多相关主题的帖子: JBoss INFO spi 
2007-12-18 23:27



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-193245-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.540919 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved