tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Adding a webapp to a running embedded tomcat 7 with an 'improved' class loader results in missing classes?
Date Wed, 22 Jun 2011 14:00:25 GMT
On 22/06/2011 14:47, Benson Margulies wrote:
> The equivalent basic scheme worked perfectly fine in tomcat6. In
> Tomcat7, it looks like:
>             solrContext = tomcat.addWebapp("/solr",
> solrWebapp.getCanonicalPath());
>             WebappLoader solrLoader = new
> WebappLoader(LSHDemoLauncher.class.getClassLoader());
>             solrContext.setLoader(solrLoader);
> I am pulling my hair out because some classes sitting in the
> WEB-INF/lib dir of the solr webapp are not found. I've debugged into
> the class loader sufficiently to see that the right jars are in the
> right place.

Some classes or all classes? If some, which ones? Are some JARs falling
foul of WebappClassLoader#validateJarFile()?

> It occurs to me that this might be just as silly as that I need to get
> the class loader set inside of addWebapp so that it is in place before
> the call to host.addChild(). If anyone happens to have any advice, I'd
> be grateful, else I'll be going ahead to perform experiments.

Unlikely. As long as the class loader is set before the Context starts
you should be fine.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message