Author |
Message
|
tamagawa |
Posted: Tue Nov 04, 2003 5:41 pm Post subject: log4j not logging when java process is triggered |
|
|
Novice
Joined: 09 May 2003 Posts: 13
|
Hi,
The java program generates a log file (using log4j) when run from the command line, but not when it's triggered. Anyone else encounter this?
Thanks,
Bob |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 05, 2003 5:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Does the userid that the triggered process is being run as have permissions on the file?
Whenever you see differences in program behavior between running triggered and running manually, it's almost always going to be a security or environment issue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
tamagawa |
Posted: Wed Nov 05, 2003 12:08 pm Post subject: |
|
|
Novice
Joined: 09 May 2003 Posts: 13
|
Well, I'm assuming the process is running under MUSR_MQADMIN, and I don't see anything special about the file...seems log4j is not being configured properly on startup, but i'm not sure why it (log4j) is able to find it's property file when run manually, but not thru the trigger - IF in fact that is what's happening.
Thanks for the input - will keep trying. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 05, 2003 12:20 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That may be an issue with what the 'current working directory' of the program is when run by the trigger monitor. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
tamagawa |
Posted: Wed Nov 05, 2003 12:51 pm Post subject: |
|
|
Novice
Joined: 09 May 2003 Posts: 13
|
log file WAS being generated - it was hiding in C:\WINNT\system32. which is where it should be since the working directory was C:\WINNT\system32 when triggered.
Thanks for pointing me in the right direction.
bb |
|
Back to top |
|
 |
yaravind |
Posted: Mon Nov 10, 2003 7:04 am Post subject: Steps to resolve the issue |
|
|
Apprentice
Joined: 17 Jun 2002 Posts: 25
|
We use Log4j in a Java application that gets triggered by MQSeries. We had the same issue and the following is what we have done
1. Make sure the directory (in which the log files are created) have write permissions set to the userid underwhich the MQ is running.
2. Make sure the script that gets triggered includes the dir where the log4j.properties is residing in the CLASSPATH |
|
Back to top |
|
 |
|