Dipocse | 27 Nov 03:50

initialize the log4j system properly


Hi All
I've a database (PRJ) and I'm trying to connect from Asterisk server to that
database. In the shell script i used a log4j-1.2.11.jar with all others jar
files. 

The shell script for runagi.sh is :

#!/bin/sh 

JARS="curtin.jar:/lib/log4j-1.2.11.jar:/lib/jta.jar:/lib/antlr-2.7.6rc1.jar:/lib/ehcache-1.1.jar:/lib/cglib-2.1.3.jar:/lib/dom4j-1.6.1.jar:/lib/mail.jar:/lib/commons-lang-1.0.1.jar:/lib/mysql-connector-java-3.1.10-bin.jar:/lib/asm-attrs.jar:/lib/commons-logging-1.0.4.jar:/lib/commons-collections-2.1.1.jar:/lib/mailet_1_0.jar:/lib/asterisk-java-0.2.jar:/lib/jdom.jar:/lib/rome-0.7.jar:/lib/asm.jar:/lib/hibernate3.jar:/lib/activation.jar:/lib/c3p0-0.9.0.jar"

RUNCLASS="curtin.control.VAEAGIServer"

export VAECONFIG="/vad/VAE.conf"

echo "Script: Removing old log files"

rm -f ./logs/VAEServer.log
rm -f ./logs/ChannelSessionManager.log
rm -f ./logs/ThreadManager.log

echo "Script: Deleting old dynamic audio files"
rm -f /var/lib/asterisk/sounds/TMP*.gsm

java -cp $JARS $RUNCLASS NOWAVE

when i run the above shell script (./runagi.sh). It shows me the following
warnings........

(Continue reading)

Juha Laiho | 4 Dec 17:06
Favicon

Re: initialize the log4j system properly

Dipocse wrote:
> I've a database (PRJ) and I'm trying to connect from Asterisk server to that
> database. In the shell script i used a log4j-1.2.11.jar with all others jar
> files. 
...
> when i run the above shell script (./runagi.sh). It shows me the following
> warnings........
> 
> 
> Warning:
> 
> 
> 
> log4j:WARN No appenders could be found for logger
> =(net.sf.hibernate.cfg.Environment)
>  
> 
> 
> log4j:WARN Please initialize the log4j system properly
> 
> would anyone tell me how can i solve it?

Log4j cannot find its configuration file anywhere on the provided classpath.

Create a configuration file, and either explicitly tell Log4j about it
(via log4j.configuration system property), or place it in a directory
contained in the classpath.

Details in the docs:
http://logging.apache.org/log4j/1.2/manual.html
(Continue reading)


Gmane