Version 2

    Problem:

     

    You see exceptions similar to:

     

     

     

    20:05:44,757 ERROR STDERR log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apache.log4j.spi.ErrorHandler" variable. 20:05:44,757 ERROR STDERR log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by 20:05:44,757 ERROR STDERR log4j:ERROR [WebappClassLoaderDelegateFalseRepositories/WEBINF/Classes/ParentClassloaderjava.net.FactoryURLClassLoader31c43f|WebappClassLoader   delegate: false   repositories:     /WEB-INF/classes/ -


    > Parent Classloader: java.net.FactoryURLClassLoader@31c43f ] whereas object of type 20:05:44,757 ERROR STDERR log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by Org.jboss.system.server.NoAnnotationURLClassLoaderab95e6. 20:05:44,820 ERROR STDERR log4j:ERROR Could not create an Appender. Reported error follows.

     

    Solution:

     

    These sort of exceptions occur if an application deployed on JBoss packages log4j and commons-logging related jars in its package. JBoss has its own versions of these jars in its lib folder which results in these conflicts.

     

    Removing the log4j and commons-logging jars from your application's package will solve this issue.