logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Heiler <jeremyhei...@gmail.com>
Subject Re: IllegalAccessError on MapLookup.newMap
Date Thu, 20 Oct 2016 17:26:48 GMT
On Thu, Oct 20, 2016 at 12:58 PM, Gary Gregory <garydgregory@gmail.com>
wrote:
>
> From the stack trace, as you mention, this is the error:
>
> Caused by: java.lang.IllegalAccessError: tried to access method
>
org.apache.logging.log4j.core.lookup.MapLookup.newMap(I)Ljava/util/HashMap;
> from class org.apache.logging.log4j.core.lookup.MainMapLookup
>
> These two classes should come from the same package in the same jar.
> Log4jServletContainerInitializer is in a different jar, which should not
> matter.
>
> Hm... how can this error happen? Could each class be loaded from different
> versions of the core jar? How is that even possible? Or did the web
> container explode the jars somehow? ...

As I said, my project only contains the one version of log4j. (Unless
Tomcat is sneaking something in that I'm not seeing.)

I'm not sure how whether or not the jars are exploded makes a difference
with package accessibility?

Maybe there's something weird going on with the ClassLoader and the
LoggerContext?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message