Re: Barracuda: Patch for Log4jInit servlet
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Stefan, Hmm..... That's curious. When you say "deploying as a .war file" do you mean to say that you used catalina's manager deploy command or did you create a context that looked something like.... <Context path="/mypath" docBase="myapp.war" /> I'm not completely sure about what happens to a deployed app when it is deployed via Tomcat's manager app since I never do deploys, only installs with the manager app. The latter case where you specify the docBas="myapp.war" is, under Tomcat's default settings, is the only way to deploy a .war file without expanding the .war to a directory structure and then deploying the directory structure. Can you explain how you deployed so that I can reproduce the error. Sounds like it may be a bug in Log4j. BTW, are you using the Log4j-1.2.7a.jar from Barracuda/WEB-INF/lib? It isn't an official release, but contains a patch to the entity resolver which makes it so that log4j.jar isn't locked after the app is Tomcat manager removed from Tomcat. In the official release of logj4-1.2.7, even after a LogManager.shutdown(), the log4j.jar is still locked so one can't do a clean build until Tomcat is shut down. It might be good to test both the official release and the unofficial logj4-1.2.7a version included in Barracuda. I'll apply your patch on BaracudaMVC.org (once it is up and running) since the CVS at enhydra.org will not be updated anymore. Jake At 06:09 AM 1/13/2003 +0100, you wrote: >Hi, > >during the last days, I had had some trouble configuring logging in a >Barracuda app when deploying as .war file. Deployment with the install >(not using .war) command was fine. In tomcat's logs I could just find a >message like "now appenders found for >org.enhydra.barracuda.plankton.data.ObjectRepositoryAssembler" but no >further reason for this. >I looked at Log4jInit.java and changed the code according to the >attached patch. Now it wrote a message like "log4j.dtd" not found to >catalina.log. So I removed the Doctype statement in log4j.xml and >deployed the .war file, logging was fine then. > >Regards, >Stefan >