how to fix version mismatch error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to fix version mismatch error

Sandeep Gupta
Hello,

 I am new to java ecosystem and was handed this small code which
launches a webserver. It gives a log4j version mismatch error that I
am not able to debug further.
 For compilation, I am using log4j 2.12.1 version.

java.lang.ExceptionInInitializerError
    application stacktrace
Caused by: java.lang.UnsupportedOperationException: Log4J2 version mismatch
    at io.netty.util.internal.logging.Log4J2Logger.<init>(Log4J2Logger.java:58)
    at io.netty.util.internal.logging.Log4J2LoggerFactory.newInstance(Log4J2LoggerFactory.java:33)
    at io.netty.util.internal.logging.InternalLoggerFactory.getInstance(InternalLoggerFactory.java:93)
    at io.netty.util.internal.logging.InternalLoggerFactory.getInstance(InternalLoggerFactory.java:86)
    at io.netty.channel.MultithreadEventLoopGroup.<clinit>(MultithreadEventLoopGroup.java:35)
    ... 3 more

How do i figure out which version of log4j does netty or jvm requires.

Thank you for helping
San

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: how to fix version mismatch error

Ralph Goers
The exception is coming from Netty, not Log4j 2. You would have to look at the Log4j2Logger class there and find out why it is throwing an exception.

Ralph

> On Feb 27, 2020, at 1:35 AM, Sandeep Gupta <[hidden email]> wrote:
>
> Hello,
>
> I am new to java ecosystem and was handed this small code which
> launches a webserver. It gives a log4j version mismatch error that I
> am not able to debug further.
> For compilation, I am using log4j 2.12.1 version.
>
> java.lang.ExceptionInInitializerError
>    application stacktrace
> Caused by: java.lang.UnsupportedOperationException: Log4J2 version mismatch
>    at io.netty.util.internal.logging.Log4J2Logger.<init>(Log4J2Logger.java:58)
>    at io.netty.util.internal.logging.Log4J2LoggerFactory.newInstance(Log4J2LoggerFactory.java:33)
>    at io.netty.util.internal.logging.InternalLoggerFactory.getInstance(InternalLoggerFactory.java:93)
>    at io.netty.util.internal.logging.InternalLoggerFactory.getInstance(InternalLoggerFactory.java:86)
>    at io.netty.channel.MultithreadEventLoopGroup.<clinit>(MultithreadEventLoopGroup.java:35)
>    ... 3 more
>
> How do i figure out which version of log4j does netty or jvm requires.
>
> Thank you for helping
> San
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]