When deploying an ear file including log4j.jar into Glassfish3.x, following Exception is thrown:
javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=25;_ThreadName=Thread-2;|log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
Add log4j.jar to Glassfish lib, e.g. /domains/mydomain/lib/ext or /glassfish/lib and remove it from ear.
This problem is due to some classloader issues, which typically result from having two copies of log4j.jar within your ear, e.g. one in ear/lib/ and another one in /ear/war/META-INF/lib.
This can also happen, if you have only one single copy of log4j.jar within your ear, in this case it seems to be a Glassfish specific classloader problem.