activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Configuring log4j in 4.1
Date Tue, 12 Dec 2006 09:49:17 GMT
On 12/12/06, John Heitmann <> wrote:
> After upgrading our systems from 4.0 to 4.1 I am having a tough time
> figuring out how to configure log4j. Our old system had a
> file in a custom spot that we had ActiveMQ pull in
> with "--extdir /some/config/dir".

Hmm, not completely sure why. Just adding the directory containing the
config files to the classpath should do the trick

> This doesn't seem to be working
> anymore. ActiveMQ can't find the properties file on the classpath
> when it's not in the standard spot. Any idea on what could be going
> wrong? You can reproduce this by-- in the binary distribution--
> moving conf/ to config/, and then
> play around with the -classpath and --extdir settings. None seem to
> work.
> I dug into the code a bit and saw this new check in the activemq-
> console class loader:
> if( files[j].getName().endsWith(".zip") || files[j].getName().endsWith
> (".jar")  ){
>      try{
>          System.out.println("Adding to classpath: " + files
> [j].getCanonicalPath()); }catch(Exception e){}
>          urls.add(files[j].toURL());
>       }
> }
> When I add ".properties" to the conditional I can see the printout
> saying the properties file is added, however when I query the class
> loader later in one of our custom beans running alongside the broker
> it can't get the "" resource.

AFIAK log4j will look on the classpath for - so will
end up looking in the directories on the classpath. So the directory
containing the file needs to be on the classpath - not the properties
files. Adding files to the classpath is only relevant for jars and



View raw message