Log4J and embedded OC4J
413838Nov 22 2004 — edited Nov 26 2004I'm trying to get Log4J running in our ADF/UIX web application in JDev 10g 9.0.5.2
In the document http://www.oracle.com/technology/tech/java/oc4j/904/doc_library/servlet-devguide-904-preview.pdf,
chapter "Open Source Frameworks and Utilities", the section "Configuration and Use of Jakarta log4j in OC4J" says:
" To package the log4j library for a specific Web application, copy the log4j-1.2.8.jar file from the log4j lib directory into the standard
/WEB-INF/lib directory of your Web application. "
Is this procedure written assuming that you are running your webapp on the stand-alone OC4J or IAS? Am I correct to assume that stand-alone OC4J and IAS will automatically detect files in the standard WEB-INF/lib and WEB-INF/classes directories (like other J2EE webservers?)
The problem is that I'm developing/testing the application locally, using the embedded OC4J (simply running the application, without creating .war or .ear files).
I put the log4J.jar file in /WEB-INF/lib and the log4J.properties file in the /WEB-INF/classes directory, thinking that the embedded OC4J server would automatically detect those files.
But when I compile the webapp locally using the embedded OC4J, it doesn't pick up these files.
So I tried to add the .jar file as a project library (tools -> project properties -> profiles -> development -> Libraries), but still compilation failed ("cannot access directory org\apache\log4j; verify that directory is reachable from the classpath and/or sourcepath")
So I added the location of the .jar file to the application classpath (tools -> project properties -> profiles -> development -> Paths -> additional classpath).
But still I got the same compilation errors.
How do I get the embedded OC4J to detect the log4j.jar within the WEB-INF/lib directory?
I can get it to work if I place the .jar file in another directory, but I would like to keep it in the WEB-INF/lib directory so that it conforms to usual webapp standards.
Any help would be SOOOOO appreciated!
THanks very much,
J