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
behavior.
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-log4j,
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
"opejb.classloader.force-load=..."
in the System.properties, 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:
http://tomee-openejb.979440.n4.nabble.com/Question-about-TomcatWebAppBuilder-in-Tomee-tp4675841.html
Sent from the TomEE Users mailing list archive at Nabble.com.