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 19:04:08 GMT
On Thu, Oct 20, 2016 at 1:26 PM, Jeremy Heiler <jeremyheiler@gmail.com>
wrote:
>
> 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.)

Forgive me, for I have sinned. I never did a 'clean' after updating the
version in my POM. Apparently Inteillj's "rebuild project" feature does not
do that. So, the exploded WAR file in target/ had both versions of log4j.

Sorry for the noise...

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