You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by "Stian Soiland-Reyes (JIRA)" <ji...@apache.org> on 2016/05/31 00:13:12 UTC

[jira] [Commented] (TAVERNA-886) log4j object "is not assignable"

    [ https://issues.apache.org/jira/browse/TAVERNA-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307027#comment-15307027 ] 

Stian Soiland-Reyes commented on TAVERNA-886:
---------------------------------------------

I can't reproduce this exact error anymore, but occasionally I see some logger setup warnings - I think it depends on the order the bundles are started in and who tries to log first. Add to this the mix of loggers.. Commons Logging, log4j, slf4j.. not sure which ones should be set up first, and perhaps set up outside OSGi? Deferred to 3.2.0.

> log4j object "is not assignable"
> --------------------------------
>
>                 Key: TAVERNA-886
>                 URL: https://issues.apache.org/jira/browse/TAVERNA-886
>             Project: Apache Taverna
>          Issue Type: Sub-task
>          Components: Taverna Command-line Tool
>    Affects Versions: osgi 0.2.1
>            Reporter: Stian Soiland-Reyes
>              Labels: logging
>             Fix For: command-line 3.2.0
>
>
> {code}
> 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.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@7486b455[log4j:1.2.17(id=43)]] whereas object of type 
> log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [sun.misc.Launcher$AppClassLoader@677327b6].
> log4j:ERROR Could not instantiate appender named "CONSOLE".
> log4j:WARN No appenders could be found for logger (org.springframework.osgi.extender.internal.boot.ChainActivator).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
> {code}
> Probably caused by log4j being initialized both outside OSGi (AppClassLoader) and inside OSGi.
> See {{Log4JConfiguration}} in incubator-taverna-osgi/taverna-app-configuration-impl - even though it has a static field to detect if it has already been initialized, this would probably be {{false}} inside OSGi as the class would appear 'new'.
> I believe the launcher is initializing it early so that logging is there before any of the OSGi services are initialized/configured.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)