How to use log4j into weblogic 10.3

Hi,
I am migrating an enterprise application from JBoss 4.3 + JBossCache to WebLogic 10.3+Coherence.
I am blocked since I can't get log4j to work inside WL.
I enabled log4j inside the administration console, as stated in the user guide.
Googling I've also found that I have to copy these 2 jars
wllog4j.jar
llog4j-1.2.14.jar
inside my domain lib directory (that is C:\Oracle\Middleware\user_projects\domains\base_domain\lib), and I did it.
Now where should I put the log4j.xml configuration file and how can I tell to WL to use that xml as log4j configuration ?
To give you more information, my classes use log4j in this way:
Logger log = Logger.getLogger(MyClass.class);
And I am constantly getting this error:
log4j:WARN No appenders could be found for logger (it.ltm.ejba.session.EjbAServiceBean).
log4j:WARN Please initialize the log4j system properly.
I hope someone can help me.
I apologize for this stupid question, but really I didn't find a good guide/tutorial on the net.
Thanks in advance.
Edited by: e.gherardini on 3-mar-2010 3.16

Hi Jay, thanks for helping me.
In fact what I am trying to do is a server-wide log4j configuration.
Your solution implies writing-deploying-maintaining 1 log4j configuration file for each application developed inside the application server.
This is not what I want to do.
Digging around WL 10.3 installation folders, I've found a log4j.properties file inside the medrec example application (C:\Oracle\Middleware\wlserver_10.3\samples\domains\medrec).
It uses this properties file setting a startup parameter to the server (file setDomainEnv.cmd):
set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dlog4j.configuration=file:%LOG4J_CONFIG_FILE%
I would like to do the same starting the server from eclipse 3.5.
I am working on this, I hope you can give some hints.
Thanks a lot

Similar Messages

  • How to use log4j logging

    Hi all,
    i'm very new to the world of software devlopment.I'm currently working on devloping banking application in JAVA.
    I wanted to log all the exceptions thrown by the code.
    Could any one of you tell me as to how to use log4j logging in my project. Also where to find the jar file. I searched the entire web but i didn't find it anywhere.
    Thanks

    You should find what you need on the Log4j Project Page.

  • How to integrate JMS into WebLogic ?

    I want to use JMS for Messaging but I don't know how to integrate it into my WebLogic Server.
    Can anyone please tell me how I should integrate JMS into WebLogic?

    Java Message Service (JMS) is a standard API for accessing enterprise messaging systems.
    And WebLogic JMS is an enterprise-class messaging system that is tightly integrated into the WebLogic Server platform. It fully supports the JMS Specification.
    Please refer to the following links to get more information on this and how to configure the jms resources:
    http://docs.oracle.com/cd/E15051_01/wls/docs103/jms/fund.html
    http://middlewaremagic.com/weblogic/?page_id=1976
    Thanks,
    Patrick

  • How to use INSERT INTO ALL statement in jdbc prepared statement with beans

    Kindly give me some example that how we can use "INSERT INTO ALL STATEMENT" in jdbc prepared statement inside a jsf bean?
    Actually i want to take employee id's of present employees using single jsf page and using one textbox for each employee id.
    How can i use INSERT INTO ALL statement to achieve this?
    Following is my code snippet.
    AttendanceBean.java:
    public class AttendanceBean {
    private int atteid;
    private String attdname;
    private int attday;
    private int attmonth;
    private int attyear;
    public static Connection getAttConnection() throws Exception {
    String driver = "oracle.jdbc.driver.OracleDriver";
    String url = "jdbc:oracle:thin:@localhost:1521:globldb3";
    String username = "scott";
    String password = "tiger";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(url, username, password);
    return conn;
    public String addAttendance(){
    Connection conn = null;
    PreparedStatement pstmt = null;
    boolean committed = false;
    try {
    conn = getAttConnection();
    conn.setAutoCommit(false);
    String query = "INSERT ALL INTO attendance VALUES (?,?,?,?,?)";
    pstmt = conn.prepareStatement(query);
    pstmt.setInt(1,this.atteid);
    pstmt.setString(2,this.attdname);
    pstmt.setInt(3,this.attday);
    pstmt.setInt(4,this.attmonth);
    pstmt.setInt(5,this.attyear);
    pstmt.executeUpdate();
    conn.commit();
    conn.setAutoCommit(true);
    committed = true;
    return "home.xhtml";
    } catch (Exception e) {
    e.printStackTrace();
    return "CRM.xhtml";
    } finally {
    try{
    if (!committed) conn.rollback();
    if (pstmt != null) pstmt.close();
    if (conn != null) conn.close();
    }catch(Exception e){
    e.printStackTrace();
    }

    Check this program for some info on Push buttons:
    1-DEMO_DYNPRO_PUSH_BUTTON
    2-DEMO_DYNPRO_MODULE
    3-DEMO_DYNPRO_ON_CONDITION
    Suppose Your screen is 101
    Then in that screen create one push button and assign it a function code.
    Now in the PAI of the 101 screen
    Create Module for user command
    Inside that module checc the sy-ucomm if sy-ucomm eq <Function code of your push button>
    Insert the values in database.
    *& Module USER_COMMAND_0101 INPUT
    process after input for screen 0101 *
    MODULE USER_COMMAND_0101 INPUT.
    CASE OK_CODE.
    WHEN 'SAVE'.
    *Insert the values here
    WHEN 'DISP'.
    ENDCASE.
    CLEAR OK_CODE.
    ENDMODULE. " USER_COMMAND_0101 INPUT
    Regards
    Neha
    Edited by: Neha Shukla on Dec 3, 2008 1:02 AM
    Edited by: Neha Shukla on Dec 3, 2008 1:02 AM
    Edited by: Neha Shukla on Dec 3, 2008 1:06 AM

  • How to use ADF with weblogic Portal 10.3.2

    Hello All,
    I want to use ADF with Weblogic Portal 10.3.2. Can anyone guide me ?
    Thanks,
    *(' ')sman*

    Hello,
    To use ADF with WLP 10.3.2 you will need a WebCenter WSRP producer running the portlet, which you can then consume as a remote portlet in WLP. The documentation on how to do that is here:
    http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14235/chap_webcenter_interop.htm#BABDBJBD
    Kevin

  • How to use log4j in struts project

    Hi, all
    I want to use log4j and pooling in my running project based on struts-tomcat.
    Can any one tell me all the process in details step by step,to apply in my project
    i m wait for any rply

    Another day, another jargon-dump

  • How to use log4j in an EJB Module??

    I have included the log4j.jar in libraries;
    added log4j.xml in the sources folder;
    but I m getting an error:
    <Apr 22, 2014 11:07:50 AM PKT> <Warning> <EJB> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception is:
    java.lang.NoClassDefFoundError: org/apache/log4j/Logger.
    java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at test.MyMessageBean.onMessage(MyMessageBean.java:39)
        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:575)
        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:375)
        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
        Truncated. see log file for complete stacktrace
    Kindly guide  me how to resolve this???
    Thank you!

    "I have included the log4j.jar in libraries"  -> what does that actually mean? What steps did you take and where?
    Because one thing is for certain: the jar is not deployed to the proper location so it is on the application's classpath or else you wouldn't be running into this issue.

  • How to use a webservice (WebLogic?)

    I want my application to use a WebLogic built webservice. The documention says to create aControl from the WSDL, but the only ways it seems to use the control is by dragging it into a pageflow in design view. I need to access it via a POJO. I'm new to Web Services, so I'm not sure how to go about it. I have this in my code
    * @common:control
    private myWebServiceControl myControl;
    But when I try to use myControl it throws a Null Pointer exception. It won't let me do myControl = new myWebServiceControl () or anything like that to initialize it so I don't know what to do about that.

    Hi, Iam learning to use weblogic and sevlets. I compiled my first "HelloWorld" program inside WEB-INF, inside WebApp in a directory in C drive. I created a user id and password to use Weblogic.
    Then I started the server and opened the file. I added the servlet name and code to "HelloWorld", I then saved, deployed. And tried to run my program in a browser giving,
    http://localhost:7001/bbb/HelloWorld
    I get an error 404, I wish you guys help me sort my problem. What else I must do to make Servlets work?

  • How to use "insert into & select" in format search

    Hello,
    I am just wonderring whether you can help me solve this issue.
    I want to change the value of a field in the title area for a sales quotation. however, this field is not shown up on the interface.
    For example, there is a field in the title area, "OQUT.Ref1". You actually cannot see this field from the quotation interface or any other doc. Now I want to update the value of this field.
    What I am now trying to do is to create an field named "update" in the title area, use format search to update. the code for the command will be something like
    Insert into $[OQUT.Ref1.0]
    select $[OQUT.U_MFG#]
    here, U_MFG# is UDF. as you may understand, I want to copy the value in the U_MFG# to the field of "Ref1".
    However, when I run "Execute", it gives me error. I believe there is something wrong with the code of "Insert into $[OQUT.Ref1.0]
    Does anyone know how to write the code?
    many thanks
    Stanley

    Thanks both Suda and sagar. The reason I wanted to do this is because I wanted to have UDF info be shown on the  MS word-templated quotation document.
    As you know, when you click the word symbol, a word-templated doc will be generated. The client needs two completely different format of quotation printout. thus I plan to print one type from PLD and other type by clicking the Word symbol. but later, I found out that the UDF field cannot be selected on the MS word template, or only system fields.
    Thus, the only way I can do is to copy the value from udf to some unused sytem fields and then show that system fields on the MS word template.
    any idea do you have?
    I wanted to tell SAP that It is not useful if the udf fields cannot be inserted into word template.
    thanks
    Stanley

  • Problem in Using Log4J with Weblogic 9.2

    I am using Weblogic 9.2 and Log4j.
    By using Admin console I set the Severity Level to WARNING and inside my java code is given below:
    Logger logger = Log4jLoggingHelper.getLog4jServerLogger();
    if (logger.isEnabledFor(Priority.DEBUG)){
    logger.debug("DEBUG - Test Debug message");
    logger.info("DEBUG - Test Info Message");
    logger.warn("DEBUG - Test Warning Message");
    logger.error("DEBUG - Test Error Message");
    logger.fatal("DEBUG - Test Fatal Message");          
    Somehow the logger.isEnabledFor(Priority.DEBUG) returning 'TRUE' and the follwoing message is displayed.
    <Nov 29, 2006 2:44:04 PM EST> <Warning> org.apache.log4j.Category> <000000> <DEBUG - Test Warning Message>
    <Nov 29, 2006 2:44:04 PM EST> <Error> <org.apache.log4j.Category> <000000> <DEBUG - Test Error Message>
    <Nov 29, 2006 2:44:04 PM EST> <Info> <org.apache.log4j.Category> <000000> <DEBUG - Test Fatal Message>
    <b><i>NOTE - The logger.debug() and logger.info() methods are not invoked because of the severity level to 'WARNING' in the console.</i></b>
    <b>I would like to know why the Somehow the logger.isEnabledFor(Priority.DEBUG) is having a value of 'TRUE'.</b>
    I expected only the Somehow the logger.isEnabledFor(Priority.ERROR) will have the value of 'TRUE'.

    Did you get an answer to your question? I have the same problem with WebLogic 10.0.

  • How to use CMP in Weblogic 9.2 with MySQL?

    Hello all...
    So I've been tasked wiith moving an Oracle/Weblogic installation to a MySQL/Weblogic platform. Things are moving along well, except that in my CMP (Container-Managed Persistence) descriptors, the database-type is set to "Oracle" and there are references to columns of type "OracleBlob" and "OracleClob".
    I changed database-type to "MySQL" and those columns to "Blob" and "Clob", but it doesn't work -- Weblogic reports that MySQL doesn't support Blobs and Clobs (which is untrue, but perhaps Weblogic 9.2 doesn't know how to deal with MySQL Blobs and Clobs).
    Has anyone encountered this before? Is there a workaround? I've Google'd it and looked here, and it doesn't seem like many people use this combination of MySQL and Weblogic, so there's not much discussed on this topic.
    Any help would be much appreciated!
    - Tim Bessie

    First you need to make sure that you are using supported configuration. CMP (WebLogic feature) is supported with MySql4 with Connect/J
    http://edocs.bea.com/platform/suppconfigs/configs92/92_over/supported_db.html#1177621
    Thanks,
    Jayesh
    Yagna Sys

  • How to use Log4J in EP for log info

    HI Frndz ..
    As per my requirment i have to give a report of all login users log information. In Java we have  Log4J.jar as per miine it is the best API for generating Log information .
    Actualy am trying to place this code and JAR file in com.sap.portal,runtime.logon.par but am not getting any needful output.
    Colud anyonr suggest me how can  we get the Log data usiing Log4J in Portal.
    Thanks in Advance
    Regards
    Rajesh

    Hi Rajesh,
    please check the below link it might be helpful to you.
    Use Class Log4j for logging java application
    Regards
    Narendra

  • How to use insert into...select * from...if source table is huge in size

    The source tables are having crores of data (growing tables). Tables with 4crores, 17cr. We want these tables to be copied frequently to our local database. Previously it was done by export-import through windows scheduled task. but now we are planning to do it as database jobs. We are fetching the datas with query
    insert into dest_tablee( select * from source_table@dblink) when we tried with this it was throwing exception like enough table space is not there. And also it was found that frequent commits has to be used while populating datas from big tables. So tried with cursor But it was very slow and again we got the exception like 'the table space unable to extend segment by 16 in undo tablespace 'UNDOTBS1'.
    After that we tried with the group by. In this case we got the exception like unable to extend table and also index in the table space. For this the solution is to add datafile. Again we have increase the table space. Now the procedure is running very slow(taking much time. It might be because of the conditions used in the query).
    Is there any other option to copy the datas from such a big tables? can we use the same sort of query?
    Friends please help me to sort it out.
    Thanks in Advance

    Hi,
    you have lot of data DONT use cursor, did you try using the COPY command.
    How frequently you will be doing the COPYING of the data ?
    If you have any constraints you can disable and enable after all the records have been copied.
    Please look at this link this should help.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5280714813869
    Thanks
    Message was edited by:
    hkandpal
    Link added

  • How to use log4j in our application

    Hi All,
    I have bit of confused while using the log4j in our java application.
    Please give me the sample code how do we logging our applications?
    Thanks in advance..........

    please give any suggestions........http://logging.apache.org/log4j/docs/documentation.html <- please read.

  • How to use jstl in weblogic 8.1

    I tried to use JSTL in my jsp file and I add
              <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> at the top line. But the server reported
              java.lang.NoClassDefFoundError: javax/servlet/jsp/el/VariableResolver
              how to solve this problem?

    WebLogic 8.1 supports JSP 1.2, which doesn't natively implement the JSTL or the expression language. If you download the Jakarta Taglibs implementation of the JSTL (for JSP 1.2, not JSP 2.0), then you can use the JSTL taglib as a normal taglib. Note that this doesn't give you the ability to use the other JSP 2.0 tag features, like using the expression language in body content.
              Make sure that you use the uri value specified in the tld that you're using. I believe the values are different between the JSP 1.2 and JSP 2.0 versions.

Maybe you are looking for