On Thu, Oct 20, 2016 at 12:58 PM, Gary Gregory <garydgreg...@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?