Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 17A2F105D6 for ; Tue, 27 Aug 2013 07:19:59 +0000 (UTC) Received: (qmail 2940 invoked by uid 500); 27 Aug 2013 07:19:57 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 2433 invoked by uid 500); 27 Aug 2013 07:19:56 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 1234 invoked by uid 99); 27 Aug 2013 07:19:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Aug 2013 07:19:54 +0000 Date: Tue, 27 Aug 2013 07:19:53 +0000 (UTC) From: "Roland Weiglhofer (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (LOG4J2-373) Classloader issue in OSGi-environment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Roland Weiglhofer created LOG4J2-373: ---------------------------------------- Summary: Classloader issue in OSGi-environment Key: LOG4J2-373 URL: https://issues.apache.org/jira/browse/LOG4J2-373 Project: Log4j 2 Issue Type: Bug Components: API, Core Affects Versions: 2.0-beta9 Environment: OSGi R5 / R4 (Apache Felix 4.x) Reporter: Roland Weiglhofer Priority: Critical Using Log4j2 in a bundle causes following error: ERROR StatusLogger org.apache.logging.log4j.core.impl.Log4jContextFactory does not implement org.apache.logging.log4j.spi.LoggerContextFactory ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger printing the ClassLoaders in LogManager gives me following output: org.apache.logging.log4j.spi.LoggerContextFactory loaded by org.apache.logging.log4j-api [13] org.apache.logging.log4j.core.impl.Log4jContextFactory loaded by sun.misc.Launcher$AppClassLoader@35a16869 We have two different ClassLoaders. That's why the implementation is not assignable. The core uses the bootstrap-classloader and the api uses the bundle-classloader. Workaround needed. Thx -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org