Hi Kalpa,

> Am 09.05.2016 um 19:31 schrieb Christopher Schultz 
> <ch...@christopherschultz.net>:
> 
> Signierter PGP-Teil
> Kalpa,
> 
> On 5/9/16 6:26 AM, Kalpa Welivitigoda wrote:
> > Hi,
> >
> > I am using tomcat 8.0.28. I am using a custom valve which has a
> > dependency for slf4j (slf4j jar in in tomcat/lib). I also has a set
> > of webapps which uses different versions of slf4j (those
> > dependencies are in the WEB-INF/lib of those webapps). Due to the
> > different versions in tomcat/lib and webapps, I am getting errors
> > such as NoSuchMethodError.
> >
> > Is it possible to restrict some classes being loaded for webapps? I
> > am trying to see whether it is possible to load the slf4j classes
> > required for the webapps from the slf4j jar in WEB-INF/lib only and
> > not from the jar in tomcat/lib.
> >
> > Or is there any other recommended way to address this kind of
> > problems?
> 
> Ideally, there should be no problem, here: the web application should
> be using its own classes from WEB-INF/lib and Tomcat should be using
> its own separate classes for its internal operations (including
> running Valves).
> 
> Do you have a stack trace of the NSME? I wonder if there's a place in
> Tomcat where the context ClassLoader isn't being correctly-set.
> 
> -chris
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

Did you install slf4j.jar in $java_home/lib/ext folder? those libraries are in 
the class path before all other user libraries. you are able to determine from 
where will/has been is loaded.


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to