[phoenix] excalibur-logger jar in container lib directory
Peter Royal <[email protected]> Sat, 15 Mar 2003 13:36:45 -0500
| Newsgroups | gmane.comp.jakarta.avalon.phoenix.devel |
|---|---|
| Message-ID | <12D729B8-5715-11D7-AB8D-000393B61B56__39692.2513530173$1047765400@apache.org> |
This breaks if you also include excalibur-logger in your application
jar (if say, you have your own child containers)...
java.lang.ClassCastException:
org.apache.avalon.excalibur.logger.factory.FileTargetFactory
at
org.apache.avalon.excalibur.logger.DefaultLogTargetFactoryManager.config
ure(DefaultLogTargetFactoryManager.java:177)
at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerU
til.java:239)
at
org.apache.avalon.excalibur.logger.LogKitLoggerManager.setupTargetFactor
yManager(LogKitLoggerManager.java:262)
at
org.apache.avalon.excalibur.logger.LogKitLoggerManager.configure(LogKitL
oggerManager.java:227)
at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerU
til.java:239)
at
org.apache.avalon.phoenix.components.logger.DefaultLogManager.createHier
archy(DefaultLogManager.java:77)
at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:282)
A "solution" would be to create the LoggerManager for applications in
DefaultLogManager using the application classloader. I think this won't
work fully as the application classloader and the container-private
classloader aren't connected at all and thus they won't share a common
view of the interface. If excalibur-logger was broked out into two
jars, one for interface one for impl, the interface jar could go into
the common classloader with the impl only in the container-private
classloader. I don't know if there will be enough benefit to make it
worth the effort.
Any objections to just moving excalibur-logger.jar back into the common
lib directory?
-pete
--
peter royal -> [email protected]