|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMB v6 / XP / Java - can't find log4j output |
« View previous topic :: View next topic » |
Author |
Message
|
hopsala |
Posted: Mon Dec 10, 2007 12:02 pm Post subject: WMB v6 / XP / Java - can't find log4j output |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Hi guys (and gals), long time no see. I trust everyone is doing well.
My problem is simple - I can't find the output file for messages I send into log4j. I've read all the posts I could find here about log4j but couldn't find any reference to a similar problem.
Now, the same code works fine in any other system, and in the properties file I specify an absolute path. I've put the properties file into the jar (the one which goes to the bar file).
What's really strange, is that I don't crash even if I don't provide a properties file - when it isn't in the jar or anywhere else... ??
There are no relevant files in \common and in the EG libraries. I've even tried searching the entire computer for files changed recently (after running the mf), but to no avail. Meaning that for some reason writing is blocked.
Any ideas? Is there anything specific one has to do to make log4j work with WMB? Where should I put the properties file?
Thanks much,
Hop |
|
Back to top |
|
 |
TonyD |
Posted: Mon Dec 10, 2007 1:22 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
The name of the directory where the properties file is located should be in the broker's CLASSPATH. |
|
Back to top |
|
 |
ling_71_99 |
Posted: Tue Dec 11, 2007 8:22 am Post subject: Should use classpath if you put properties in jar file |
|
|
 Novice
Joined: 19 Nov 2007 Posts: 11 Location: Canada
|
// Use a PropertyConfigurator to initialize from a property file.
String resource = "/examples/lf5/InitUsingPropertiesFile/example.properties";
URL configFileResource =
<class name here>.class.getResource(resource);
PropertyConfigurator.configure(configFileResource);
Regards,
Michael _________________ Mike |
|
Back to top |
|
 |
hopsala |
Posted: Tue Dec 11, 2007 8:43 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Thanks, the CLASSPATH tip solved it.
took me a while to find where the broker sets its environment; I eventually found it under "C:\Documents and Settings\All Users\Application Data\IBM\MQSI\common\profiles". I set the CLASSPATH and it worked.
Cheers!
Hop |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|