You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Suran Jayathilaka <su...@wso2.com> on 2008/04/25 11:20:16 UTC

Missing log4j.xml file when running samples

Hi,

I'm in the middle of running the sample classes and came across this.
e.g. When invoking (or other classes)

$QPID_SRC_HOME/java/client/example/target/classes$ sh runSample.sh 
org.apache.qpid.example.amqpexample.direct.Listener

throws

log4j:ERROR Could not parse url 
[file:/usr/share/doc/rhm-0.2/java/log4j.xml].
java.io.FileNotFoundException: /usr/share/doc/rhm-0.2/java/log4j.xml (No 
such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at...........

I see line 26 of runSample.sh sets the default value of QPID_SAMPLE to 
"/usr/share/doc/rhm-0.2", and line 46
sets
QPID_PARAM="$QPID_PARAM 
-Dlog4j.configuration=file://$QPID_SAMPLE/java/log4j.xml",
which causes the above.
Why is this so? Why not set the default location of the log4j config 
file to $QPID_HOME/etc/log4j.xml which does have such a file?
Also, should the availability of rhm be pre-assumed?

Thanks.
Suran



Re: Missing log4j.xml file when running samples

Posted by Marnie McCormack <ma...@googlemail.com>.
Hi Suran,

You're quite correct - the setting of $QPID_SAMPLE in this script is
erroneous, and probably simple developer error.

Can you kindly raise as a JIRA and we can address, please ?

Thanks & Regards,
Marnie


On 4/25/08, Suran Jayathilaka <su...@wso2.com> wrote:
>
> Hi,
>
> I'm in the middle of running the sample classes and came across this.
> e.g. When invoking (or other classes)
>
> $QPID_SRC_HOME/java/client/example/target/classes$ sh runSample.sh
> org.apache.qpid.example.amqpexample.direct.Listener
>
> throws
>
> log4j:ERROR Could not parse url
> [file:/usr/share/doc/rhm-0.2/java/log4j.xml].
> java.io.FileNotFoundException: /usr/share/doc/rhm-0.2/java/log4j.xml (No
> such file or directory)
>       at java.io.FileInputStream.open(Native Method)
>       at java.io.FileInputStream.<init>(FileInputStream.java:106)
>       at java.io.FileInputStream.<init>(FileInputStream.java:66)
>       at...........
>
> I see line 26 of runSample.sh sets the default value of QPID_SAMPLE to
> "/usr/share/doc/rhm-0.2", and line 46
> sets
> QPID_PARAM="$QPID_PARAM
> -Dlog4j.configuration=file://$QPID_SAMPLE/java/log4j.xml",
> which causes the above.
> Why is this so? Why not set the default location of the log4j config file
> to $QPID_HOME/etc/log4j.xml which does have such a file?
> Also, should the availability of rhm be pre-assumed?
>
> Thanks.
> Suran
>
>
>