I'm using Borland JBuilderX and Weblogic8.1 to develop EJBs, and I want to use log4j in EJBs, but I don't know how to configure it.
any help appreciated!
-
how to configure log4j for EJB (8 messages)
- Posted by: Robert Strong
- Posted on: September 07 2004 16:41 EDT
Threaded Messages (8)
- how to configure log4j for EJB by Neeraj Pandey on September 08 2004 05:22 EDT
- how to configure log4j for EJB by Sohail Sikora on September 08 2004 11:10 EDT
- Thank you!! by Sreenivasa Majji on January 06 2005 23:58 EST
-
Problems... by Arjun Reddy on April 18 2005 02:05 EDT
-
Solved... by Arjun Reddy on April 19 2005 10:06 EDT
- facing same proble by purushottam hegde on June 28 2005 07:13 EDT
- facing same proble by purushottam hegde on June 28 2005 07:14 EDT
- I am facing the same problem while using log4j with WL8.1SP5 by Srinivasa Rao Banda on April 05 2008 01:18 EDT
-
Solved... by Arjun Reddy on April 19 2005 10:06 EDT
-
Problems... by Arjun Reddy on April 18 2005 02:05 EDT
- Thank you!! by Sreenivasa Majji on January 06 2005 23:58 EST
-
how to configure log4j for EJB[ Go to top ]
- Posted by: Neeraj Pandey
- Posted on: September 08 2004 05:22 EDT
- in response to Robert Strong
I'm using Borland JBuilderX and Weblogic8.1 to develop EJBs, and I want to use log4j in EJBs, but I don't know how to configure it.any help appreciated!
Well, I don't see any problem in doing do. You need to have log4j.jar and configure the appenders you want to use in log4.properties. Rest everything is done by the framework. -
how to configure log4j for EJB[ Go to top ]
- Posted by: Sohail Sikora
- Posted on: September 08 2004 11:10 EDT
- in response to Robert Strong
In WebLogic 8.1:
If deployment is in EAR files, put the log4j config file (I use the XML version) in the App-inf/classes folder and put log4j jar file in app-inf/lib folder. -
Thank you!![ Go to top ]
- Posted by: Sreenivasa Majji
- Posted on: January 06 2005 23:58 EST
- in response to Sohail Sikora
Thank you very much for your suggesstion. I am able to configure log4j in my .ear file (which has 3 subsystems and each subsystem should be configured differently).
-Sreenivasa Majji. -
Problems...[ Go to top ]
- Posted by: Arjun Reddy
- Posted on: April 18 2005 14:05 EDT
- in response to Sreenivasa Majji
I seem to be having difficulty trying to accomplish what seems to be a very simple task: loading log4j configuration from a file using an EJB. I am using org.apache.commons.logging.
I am using Weblogic 8.1 SP2 (both the WLW and the Server). I have log4j-1.2.8.jar in APP-INF/lib and I have my log4j.properties in APP-INF/classes.
In my EJB I have the following imports and log initialization:
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.PropertyConfigurator;
public class MyEJB extends GenericSessionBean implements Session Bean {
private static final Log log = LogFactory.getLog(MyEJB.class);
I then invoke log statements in the normal way, i.e.
log.info("Is the log working?");
I can make it work by using either BasicConfigurator.configure() or PropertyConfigurator.configure(props) with a Properties object built at runtime in ejbCreate(), however, for the life of me, I can't get it to load the configuration from the log4j.properties file! Any suggestions welcome...
Thanks -
Solved...[ Go to top ]
- Posted by: Arjun Reddy
- Posted on: April 19 2005 10:06 EDT
- in response to Arjun Reddy
Ok, I've got it now. A server-level configuration was overriding my own. After making the necessary adjustments, I can now load properties from APP-INF/classes. -
facing same proble[ Go to top ]
- Posted by: purushottam hegde
- Posted on: June 28 2005 07:13 EDT
- in response to Arjun Reddy
Hi,
i am facing same proble. -
facing same proble[ Go to top ]
- Posted by: purushottam hegde
- Posted on: June 28 2005 07:14 EDT
- in response to Arjun Reddy
Hi,
i am facing same proble.
will you please tell me how did you solved this?
or else will you mail me to
[email protected] -
I am facing the same problem while using log4j with WL8.1SP5[ Go to top ]
- Posted by: Srinivasa Rao Banda
- Posted on: April 05 2008 01:18 EDT
- in response to Arjun Reddy
Could you please tell me what configuration you have done for logging the messages to file.