tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmmoon <>
Subject Question about TomcatWebAppBuilder in Tomee
Date Tue, 11 Aug 2015 23:51:07 GMT
Hi~ all.
Actually I have a question about TomcatWebAppBuilder behavior. 

At the line number 605 of org.apache.tomee.catalina.TomcatWebAppBuilder in
Tomee 1.7.1 
standardContext.setDelegate(true); is excuted. 

Although There is the comment about that code, I can not understand this
In case of ear, the classLoader is a instance of URLClassLoaderFirst which
loads clssses in the 
ear\lib, ejb.jar etc. 

When standardContext.setDelegate(true); is called 
WebAppClassLoader does not look up WEB-INF directory first. 
It just delegates to the parent classloader URLClassLoaderFirst. 

This makes some classloading problem. For example, in case of using
slf4j is loaded in the ${TomeeInstallDir}\lib and log4j library is loaded in
the WEB-INF 
so, log4j does not work well. 

I have had much googling about this problem, I have found
in the, but it doesn't work. 

Finally I deleted standardContext.setDelegate(true); line, then everything
became perpect. 

But I think tomee team have a reason to call this line and I worry that
threre might be 
a side-effect after deleting this line. 

I appreciate if I have an answer. 
Thank you. 

View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message