Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [repost] Anyone using multiple webapps with log4j under Eclipse? - help please
[repost] Anyone using multiple webapps with log4j under Eclipse? - help please [message #262958] Wed, 21 July 2004 20:10
Eclipse UserFriend
Originally posted by: bill.harrelson.accordare.com

Sorry for the repost but it seems like two days is a life-time on this list with no answer, I hoping
that someone with knowledge just missed the first post.

I've looked through the archives and can't find any answer to this question, so I'm hoping
someone on this list can help me.

I'm trying to set up log4j contexts for two applications under Tomcat.

I have webapp1 and webapp2. I have log4j.jar in webapp1/WEB-INF/lib, and also in
webapp2/WEB-INF/lib. According to the log4j mailing lists, this appears to be the correct
configuration to maintain separate repositories and logs for each application.

I also have log4j.properties in each WEB-INF/classes directory.

When I run Tomcat stand-alone, it all works just beautifully. (I do not specify the
location of the log4j.jar files in any classpath setting). Each classloader finds the jar
in the /lib directory.

When I try to run under Eclipse (2.1.2 with Lomboz), I get Class Not Found errors unless
I specifically include the jar locations in the Eclipse run-time classpath.

However, when I do, only one of the two loggers executes correctly, indicating to me that
Eclipse is using the first jar it finds in the classpath to load the classfiles, and because
of static context in log4j this results in one repository.

I saw something on another list for WebSphere Studio about this that suggested that the
class-loader parameter default in WebSphere Studio had to be changed to Parent-last to
conform to the default webapp classloader behavior, and that solved the problem there.

Is there a way to do a similar thing in Eclipse, or some other solution? I've run out of things
that I can think to do.

Thanks,

Bill
Previous Topic:OSGI manifest generation
Next Topic:Property Sheet only picks up selection after focus in RCP
Goto Forum:
  


Current Time: Fri Apr 26 13:13:15 GMT 2024

Powered by FUDForum. Page generated in 0.02954 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top