Thankx too much for the reply

- I'm using Oracle JDeveloper 9i release 3, the newest version of Oracle JDeveloper, I 
used the classpath settings several times without any complains.
- I tried also IBM Visual Age for Java 3.5.3 with jdk 1.2.2 & Log4J 1.2.7 the latest 
also the same problem ?!?!?!? ==> it is not the problem of IDE.

- Thankx for the hint about getFile()   :)))))

Ashraf Fouad Ayoub
Senior Developer
Raya Software

1 Abdel Hameed Lotfy St.,
Nasr City, Cairo 11371, Egypt
Phone:  *       (202) 670-3301/2/3/4/6/8 Ext. 295
Fax:    *       (202) 670-3296
Email:  * [EMAIL PROTECTED]
Web:     * http://www.rayasoftware.com/


-----Original Message-----
From: Steve Ebersole [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 2:30 PM
To: Log4J Users List
Subject: Re: NOONE TO ANSWER ? sorry for the previous mail


If #1 and #2 did not work, then the directory you think is in the classpath
is in fact not in the classpath.  When log4j initializes itself, it looks
for a config file named lo4j.properties in the classpath.

I would recheck what your IDE considers in the classpath versus not in the
class path.  Its not like this is a problem with log4j; this works for many
people in many places in many scenarios on many platforms, etc....




P.S., if you want the URL without the file:// URL protocol identifier, try
the URL.getFile() method (no need to do substringing on your own...).
String semiFullPath =
_my.getClass().getClassLoader().getResource( "xx_log4j.properties").getFile(
);




----- Original Message -----
From: "Ashraf Fouad" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 4:58 AM
Subject: RE: NOONE TO ANSWER ? sorry for the previous mail


yes, xx_log4j.properties is the properties file defined in my IDE classpath.

I tried yr ways, and here is my results:

1- Trial of renaming the the file to log4j.properties (Didn't work):
log4j:ERROR Could not read configuration file [log4j.properties].
java.io.FileNotFoundException: log4j.properties (The system cannot find the
file specified. )
void java.io.FileInputStream.open(java.lang.String)
native code
void java.io.FileInputStream.<init>(java.lang.String)
FileInputStream.java:64
void org.apache.log4j.PropertyConfigurator.doConfigure(java.lang.String,
org.apache.log4j.spi.LoggerRepository)
PropertyConfigurator.java:297
void org.apache.log4j.PropertyConfigurator.configure(java.lang.String)
PropertyConfigurator.java:315 0
[main] INFO  com.rsw.test.MyAppProperty  - Entering application. 140
[main] DEBUG com.rsw.test.Bar  - Did it again! 140
[main] WARN  com.rsw.test.MyAppProperty  - Hello world all ante7 fentakes
140
[main] WARN  com.rsw.test.MyAppProperty  - Hello world all ante7 fentakes
150
[main] WARN  com.rsw.test.MyAppProperty  - Hello world all ante7 fentakes
150
[main] INFO  com.rsw.test.MyAppProperty  - Exiting application.
void com.rsw.test.MyAppProperty.main(java.lang.String[])
MyAppProperty.java:19
log4j:ERROR Ignoring configuration file [log4j.properties].
Process exited with exit code 0.

2- I tried to set the -D options but also didn't work

3- It worked :))), I used the following:
String l_szfull =
_my.getClass().getClassLoader().getResource( "xx_log4j.properties").toExtern
alForm();
// Delete the first 6 characters from the path to delete "file:/"
// Still u will have
"drive_name:/whatever/path/u/specify/xx_log4j.properties"
PropertyConfigurator.configure( fullPath.substring( 6 ) );

Thankx a lot Steven, but I feel that there is something wrong I use, as all
is using log4j & didn't face such problem I don't know why?
anyway it worked, I insisted on writing the code so that others can benifit
from it


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to