You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "Matt Sicker (JIRA)" <ji...@apache.org> on 2017/06/12 15:00:00 UTC

[jira] [Commented] (LOG4J2-1936) ClassNotFoundException when making all loggers asynchronous under OSGi environment

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

Matt Sicker commented on LOG4J2-1936:
-------------------------------------

Do you get a similar error when using the normal context selector? The stack trace sounds like it wouldn't work, async or not.

> ClassNotFoundException when making all loggers asynchronous under OSGi environment
> ----------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1936
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1936
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.8.2
>         Environment: Windows 10
> Eclipse 4.4
> JDK 1.8.0_102
>            Reporter: Helber Belmiro
>            Priority: Blocker
>              Labels: bug
>
> Can't find AsyncLoggerContextSelector when making all Log4j loggers asynchronous on an OSGi environment.
> java.lang.ClassNotFoundException: org.apache.logging.log4j.core.async.AsyncLoggerContextSelector cannot be found by org.apache.logging.log4j.api_2.8.2
>     at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
>     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
>     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
>     at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>     at java.lang.Class.forName0(Native Method)
>     at java.lang.Class.forName(Class.java:264)
>     at org.apache.logging.log4j.util.LoaderUtil.loadClass(LoaderUtil.java:141)
>     at org.apache.logging.log4j.util.LoaderUtil.newInstanceOf(LoaderUtil.java:180)
>     at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOf(LoaderUtil.java:201)
>     at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOfProperty(LoaderUtil.java:226)
>     at org.apache.logging.log4j.core.impl.Log4jContextFactory.createContextSelector(Log4jContextFactory.java:97)
>     at org.apache.logging.log4j.core.impl.Log4jContextFactory.<init>(Log4jContextFactory.java:58)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>     at java.lang.Class.newInstance(Class.java:442)
>     at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:94)
>     at teste.Activator.start(Activator.java:26)
>     at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
>     at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
>     at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
>     at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:936)
>     at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:319)
>     at org.eclipse.osgi.container.Module.doStart(Module.java:571)
>     at org.eclipse.osgi.container.Module.start(Module.java:439)
>     at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
>     at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
>     at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
>     at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
>     at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
>     at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>     at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)