1 Reply Latest reply on Feb 26, 2007 2:21 PM by robertd_tfccs

    Error in Using Log4j in Struts Application

    ashish.mishra16

      Hi All,
      I m using JBoss-4.0.4.GA. I m using Log4j for logging. When i deploy my application named MsgForum.war,I get the following error:

      3:20:59,828 INFO [TomcatDeployer] deploy, ctxPath=/MsgForum, warUrl=.../deploy/MsgForum.war/

      3:21:03,875 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apace.log4j.spi.ErrorHandler" variable.

      3:21:03,875 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by

      3:21:03,875 ERROR [STDERR] log4j:ERROR [WebappClassLoader
      delegate: false repositories:
      /WEB-INF/classes/
      ---------> Parent Classloader:
      java.net.FactoryURLClassLoader@1c83354
      whereas object of type

      3:21:03,875 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.No
      AnnotationURLClassLoader@291aff].

      3:21:03,984 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows.

      3:21:03,984 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender


      I get the above said problems. I had placed the log4j.jar of JBoss lib directory to my application's lib directory. Please tell me what could be the problems