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

Roland Weiglhofer commented on LOG4J2-375:
------------------------------------------

Workaround:
1. check if log4j2 runs in an OSGI container.
Bundle mybundle = org.osgi.framework.FrameworkUtil.getBundle(MyClass.this);
2. if(mybundle != null), than get bundle-classloader.
mybundle.adapt(BundleWiring.class).getClassLoader();
                
> Classloader issue in OSGi-environment II
> ----------------------------------------
>
>                 Key: LOG4J2-375
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-375
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-beta9
>         Environment: OSGi R5 / R4 (Apache Felix 4.x)
>            Reporter: Roland Weiglhofer
>            Priority: Critical
>              Labels: ClassLoader, OSGi
>
> ERROR Error processing element FastRollingFile: CLASS_NOT_FOUND
> org.apache.logging.log4j.core.helpers.Loader uses the bootstrap-classloader 
> but has to use the bundle-classloader.

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to