I fixed the NPE, now you just get the "real" exception:

ERROR StatusLogger Cannot start ShutdownCallbackRegistry, already shutting
down.
ERROR StatusLogger Unable to create class
org.apache.logging.log4j.core.impl.Log4jContextFactory specified in
provider URL null
 java.lang.IllegalStateException: Shutdown in progress
        at
java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:66)
        at java.lang.Runtime.addShutdownHook(Runtime.java:211)
        at
org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry.addShutdownHook(DefaultShutdownCallbackRegistry.java:156)
        at
org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry.start(DefaultShutdownCallbackRegistry.java:142)
        at
org.apache.logging.log4j.core.impl.Log4jContextFactory.initializeShutdownCallbackRegistry(Log4jContextFactory.java:125)
        at
org.apache.logging.log4j.core.impl.Log4jContextFactory.<init>(Log4jContextFactory.java:92)
        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
org.apache.logging.log4j.core.Log4j1222Test$ShutdownHook$Holder.<clinit>(Log4j1222Test.java:42)
        at
org.apache.logging.log4j.core.Log4j1222Test$ShutdownHook.trigger(Log4j1222Test.java:53)
        at
org.apache.logging.log4j.core.Log4j1222Test$ShutdownHook.run(Log4j1222Test.java:49)

But if you run the test by itself, it's fine:

mvn test -Dtest=LogEventFactoryTest -pl log4j-core

INFO] Running org.apache.logging.log4j.core.LogEventFactoryTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
0.015 s - in org.apache.logging.log4j.core.LogEventFactoryTest

Gary

On Tue, Jun 20, 2017 at 7:11 AM, Matt Sicker <[email protected]> wrote:

> Doesn't sound too serious. Probably had the process killed before it fully
> shut down.
>
> On 19 June 2017 at 21:53, Gary Gregory <[email protected]> wrote:
>
> > Hi All:
> >
> > I just saw this go by with a local build:
> >
> > [INFO] Running org.apache.logging.log4j.core.Log4j1222Test
> > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> > 0.002 s - in org.apache.logging.log4j.core.Log4j1222Test
> > ERROR StatusLogger Cannot start ShutdownCallbackRegistry, already
> shutting
> > down.
> > Exception in thread "Thread-0" java.lang.ExceptionInInitializerError
> >         at org.apache.logging.log4j.core.Log4j1222Test$ShutdownHook$
> > Holder.<clinit>(Log4j1222Test.java:42)
> >         at org.apache.logging.log4j.core.Log4j1222Test$ShutdownHook.
> > trigger(Log4j1222Test.java:53)
> >         at org.apache.logging.log4j.core.Log4j1222Test$ShutdownHook.
> > run(Log4j1222Test.java:49)
> > Caused by: java.lang.NullPointerException
> >         at org.apache.logging.log4j.LogManager.<clinit>(
> > LogManager.java:97)
> >         ... 3 more
> > [INFO] Running org.apache.logging.log4j.core.LogEventFactoryTest
> >
> > Thoughts?
> >
> > Gary
> >
>
>
>
> --
> Matt Sicker <[email protected]>
>

Reply via email to