logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Overlapping Classes
Date Sat, 08 Feb 2014 23:18:48 GMT
Actually, let me follow that up with a further question: is this in a log4j
1.2.17 environment only, or is this when paired with log4j 2.0?


On 7 February 2014 20:25, Matt Sicker <boards@gmail.com> wrote:

> Using an OSGi framework would help. It has separate class loaders for each
> bundle you install. Check out Apache Felix or Eclipse Equinox or some other
> implementation.
>
> Matt Sicker
>
> > On Feb 7, 2014, at 16:35, Chris Veal <cmveal@gmail.com> wrote:
> >
> > I'm using the maven shade plugin with apache-log4j-extras-1.2.17
> > and log4j-1.2.17. That plugin takes the project artifacts and all its
> > dependencies and puts them in a single jar. During compilation, the
> plugin
> > states:
> >
> > [WARNING] apache-log4j-extras-1.2.17.jar, log4j-1.2.17.jar define 126
> > overlappping classes:
> > [WARNING]   - org.apache.log4j.xml.DOMConfigurator$2
> > [WARNING]   - org.apache.log4j.xml.DOMConfigurator$5
> > [WARNING]   - org.apache.log4j.NDC$DiagnosticContext
> > [WARNING]   - org.apache.log4j.spi.AppenderAttachable
> > [WARNING]   - org.apache.log4j.spi.ErrorHandler
> > [WARNING]   - org.apache.log4j.spi.RootCategory
> > [WARNING]   - org.apache.log4j.pattern.PatternConverter
> > [WARNING]   - org.apache.log4j.TTCCLayout
> > [WARNING]   - org.apache.log4j.RollingCalendar
> > [WARNING]   - org.apache.log4j.spi.Configurator
> > [WARNING]   - 116 more...
> > [WARNING] maven-shade-plugin has detected that some .class files
> > [WARNING] are present in two or more JARs. When this happens, only
> > [WARNING] one single version of the class is copied in the uberjar.
> > [WARNING] Usually this is not harmful and you can skeep these
> > [WARNING] warnings, otherwise try to manually exclude artifacts
> > [WARNING] based on mvn dependency:tree -Ddetail=true and the above
> > [WARNING] output
> > [WARNING] See http://docs.codehaus.org/display/MAVENUSER/Shade+Plugin
> >
> > If I exclude apache-log4j-extras-1.2.17, then my code complains about not
> > having the updated RollingAppender.
> >
> > If I exclude log4j-1.2.17, then my code complains that it can't find
> > RendererMap.
> >
> > Any ideas on how to get this code to work properly with the overlapping
> > classes?
> >
> > Thanks,
> >
> > Chris
>



-- 
Matt Sicker <boards@gmail.com>

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