You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Rick McGuire (JIRA)" <ji...@apache.org> on 2009/11/18 12:27:39 UTC
[jira] Created: (OPENEJB-1111) Openejb Logging does not interact
well with PAX logging.
Openejb Logging does not interact well with PAX logging.
---------------------------------------------------------
Key: OPENEJB-1111
URL: https://issues.apache.org/jira/browse/OPENEJB-1111
Project: OpenEJB
Issue Type: Improvement
Reporter: Rick McGuire
Assignee: Rick McGuire
Fix For: 3.1.3
When used in an OSGi enabled environment where PAX logging is the enabled logging environment, the openejb components have problems because of a NoClassDefFound exception when attempting to initialize the logging environment. The PAX logging implementation provides a subset of the log APIs, but not the APIs for configuring the loggins environment. Because of these missing classes, the default Log4jLogStreamFactory class can't be loaded, resulting in a runtime exception. Openejb should have a more PAX friendly log stream factory available as an option.
Also, there's a small bug in the Logger code that initlizes the environment. The following code
public static void configure() {
String factoryName = System.getProperty("openejb.log.factory");
Class<?> factoryClass = null;
if (factoryName != null) {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader != null) {
try {
factoryClass = classLoader.loadClass(factoryName);
} catch (ClassNotFoundException e) {
}
}
if (factoryClass != null) {
try {
factoryClass = Class.forName(factoryName);
} catch (ClassNotFoundException e) {
}
}
}
Will load the factoryClass using the context class loader, and if that is successful, will load again using Class.forName(), wiping out the first load event. The factoryClass test should be ==, not !=.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (OPENEJB-1111) PAX friendly LogStreamFactory for use
in OSGi environments
Posted by "David Blevins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENEJB-1111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Blevins closed OPENEJB-1111.
----------------------------------
Resolution: Fixed
> PAX friendly LogStreamFactory for use in OSGi environments
> ----------------------------------------------------------
>
> Key: OPENEJB-1111
> URL: https://issues.apache.org/jira/browse/OPENEJB-1111
> Project: OpenEJB
> Issue Type: Improvement
> Components: osgi
> Reporter: Rick McGuire
> Assignee: Rick McGuire
> Fix For: 3.1.3
>
>
> When used in an OSGi enabled environment where PAX logging is the enabled logging environment, the openejb components have problems because of a NoClassDefFound exception when attempting to initialize the logging environment. The PAX logging implementation provides a subset of the log APIs, but not the APIs for configuring the loggins environment. Because of these missing classes, the default Log4jLogStreamFactory class can't be loaded, resulting in a runtime exception. Openejb should have a more PAX friendly log stream factory available as an option.
> Also, there's a small bug in the Logger code that initlizes the environment. The following code
> public static void configure() {
> String factoryName = System.getProperty("openejb.log.factory");
> Class<?> factoryClass = null;
> if (factoryName != null) {
> ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
> if (classLoader != null) {
> try {
> factoryClass = classLoader.loadClass(factoryName);
> } catch (ClassNotFoundException e) {
> }
> }
> if (factoryClass != null) {
> try {
> factoryClass = Class.forName(factoryName);
> } catch (ClassNotFoundException e) {
> }
> }
> }
> Will load the factoryClass using the context class loader, and if that is successful, will load again using Class.forName(), wiping out the first load event. The factoryClass test should be ==, not !=.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENEJB-1111) PAX friendly LogStreamFactory for
use in OSGi environments
Posted by "David Blevins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENEJB-1111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Blevins updated OPENEJB-1111:
-----------------------------------
Component/s: osgi
Summary: PAX friendly LogStreamFactory for use in OSGi environments (was: Openejb Logging does not interact well with PAX logging. )
> PAX friendly LogStreamFactory for use in OSGi environments
> ----------------------------------------------------------
>
> Key: OPENEJB-1111
> URL: https://issues.apache.org/jira/browse/OPENEJB-1111
> Project: OpenEJB
> Issue Type: Improvement
> Components: osgi
> Reporter: Rick McGuire
> Assignee: Rick McGuire
> Fix For: 3.1.3
>
>
> When used in an OSGi enabled environment where PAX logging is the enabled logging environment, the openejb components have problems because of a NoClassDefFound exception when attempting to initialize the logging environment. The PAX logging implementation provides a subset of the log APIs, but not the APIs for configuring the loggins environment. Because of these missing classes, the default Log4jLogStreamFactory class can't be loaded, resulting in a runtime exception. Openejb should have a more PAX friendly log stream factory available as an option.
> Also, there's a small bug in the Logger code that initlizes the environment. The following code
> public static void configure() {
> String factoryName = System.getProperty("openejb.log.factory");
> Class<?> factoryClass = null;
> if (factoryName != null) {
> ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
> if (classLoader != null) {
> try {
> factoryClass = classLoader.loadClass(factoryName);
> } catch (ClassNotFoundException e) {
> }
> }
> if (factoryClass != null) {
> try {
> factoryClass = Class.forName(factoryName);
> } catch (ClassNotFoundException e) {
> }
> }
> }
> Will load the factoryClass using the context class loader, and if that is successful, will load again using Class.forName(), wiping out the first load event. The factoryClass test should be ==, not !=.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.