You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Gayashan Amarasinghe <ch...@gmail.com> on 2015/02/04 21:09:41 UTC

Repercussions of using log4j.ignoreTCL=true property in a multiple classloader environment

Hi devs,

I have an OSGi environment where an application server(WSO2 App Server
5.2.1) it self uses log4j for logging and thus exposes the log4j classes in
to the class path. And an axis2 service is also using log4j and is packing
the library within it self and once deployed it causes [1]. This issue can
be solved by using log4j.ignoreTCL=true system property when starting the
application server. However i was unable to find any repercussions it might
have in regular log4j functionality. Any expert advice regarding this is
much appreciated.

Btw please note that i'm using log4j v1.2.17.

[1]
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable
to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [org.apache.axis2.deployment.DeploymentClassLoader@1431703e]
whereas object of type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
[org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4634c1b9
[org.wso2.carbon.logging:4.2.0(id=269)]].
log4j:ERROR Could not instantiate appender named "stdout".
log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not
assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [org.apache.axis2.deployment.DeploymentClassLoader@1431703e]
whereas object of type
log4j:ERROR "org.apache.log4j.RollingFileAppender" was loaded by
[org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4634c1b9
[org.wso2.carbon.logging:4.2.0(id=269)]].
log4j:ERROR Could not instantiate appender named "file".
[2015-02-04 22:10:40,578]  INFO
{org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2
service: v2/Service {super-tenant}
log4j:WARN No appenders could be found for logger
(org.sample.axis2.aar.Service).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
CAppAxisAarService Deployed!!!
log4j:WARN No appenders could be found for logger
(org.sample.axis2.aar.Service).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.

Regards,
Gayashan Amarasinghe