Log4j is not picking up an appender

I configured a logger "mailLogger" in the properties file, and I defined an appender "mail".
In the code, I get the logger by name, and list all the appenders.
It tells me there are no appenders.
Shouldn't the "mail" appender be added by putting it in log4j.properties?
My log4j properties file:
log4j.rootLogger=INFO, xmlout
log4j.logger.mailLogger=ALL, mail
log4j.appender.xmlout=biz.minaret.log4j.DatedFileAppender
log4j.appender.xmlout.threshold=DEBUG
log4j.appender.xmlout.Directory=/app/usrlogs
log4j.appender.xmlout.Prefix=sfgpo.
log4j.appender.xmlout.Suffix=.log
log4j.appender.xmlout.Append=true
log4j.appender.xmlout.layout=org.apache.log4j.xml.XMLLayout
log4j.appender.mail=org.apache.log4j.net.SMTPAppender
log4j.appender.mail.To=[email protected]
log4j.appender.mail.From="SFG Application Mailer"
log4j.appender.mail.SMTPHost=myhost.myorg.com
log4j.appender.mail.Threshold=ERROR
log4j.appender.mail.BufferSize=1
log4j.appender.mail.Subject=SFG PO event notice
log4j.appender.mail.layout=com.moodys.sfg.utility.logger.MoodysHTMLLayout
log4j.additivity.mailLogger=true
log4j.appender.mail.layout.LocationInfo=true
My java code:
import java.util.Enumeration;
import org.apache.log4j.Appender;
import org.apache.log4j.Logger;
import org.apache.log4j.net.SMTPAppender;
Logger logger = Logger.getLogger("mailLogger");
Enumeration en = logger.getAllAppenders();
System.out.println("Listing all appenders for the logger");
while (en.hasMoreElements())
     Appender a = (Appender)en.nextElement();
     String apName = a.getName();
     System.out.println(" Appender: name = " + apName);
System.out.println("End of appender list");
The console output is:
Llisting all appenders for the logger
End of appender list
Why does it not find my appender "mail"?
Thanks in advance.
Elliot

Hi Elliot.
I had the same trouble and I resolved when I commented out the "rootLogger line", as follow below:
# disabling line
# log4j.rootLogger=INFO, xmlout
I hope that helps you.
Gui Pereira.

Similar Messages

  • System is not picking up approvers from BADI in Item level workflow

    Hi All,
    My problem is that
    1. when I creat the shopping cart the system is picking up the correct approver from BADI and showing it in approval preview.
    2. My first level approver is a general task so Workitem going to the correct persons.
    3. after first level approver I am fillng approver in BADI for 2 nd level.
    4. But after first approval the SC is directly getting approved finally as system is not picking up approvers from the BADI.
    I dont understand the problem. even We applied SP9 as well, but the problem is not resolved.
    Please suggest something.
    Thanks
    Smita

    Hi ,
    I am pasting the code of my BADI.  Let me know if i need to do some changes.
    Regards,
    smita
    if lv_wf = '4'.
    1st approval step executed for indices 1 and 0
          IF actual_approval_index LE 1.
    First approval step (General task)
    endif.
    2. approval step executed for indices 2,1 and 0
          IF actual_approval_index LE 2.
    *break-point.
    **get the approver for the commodity
             LOOP AT lt_item INTO ls_item WHERE del_ind IS INITIAL.
    We consider only items, which are not deleted (del_ind = 'X')
    Set the product category
                MOVE ls_item-category_id TO lv_call_value1.
    Find the approver of this item based on the customizing table ZCOMMODITY
    CALL FUNCTION 'ZWF_COMODITY_ITEM_APPROVAL_GET'
       EXPORTING
         SC_GUID                          = ls_header-guid
         ITEM_GUID                        = ls_item-guid
       APPROVAL_DESCRIPTION             =
        HIDE_ITEMS_NOT_RESPONSIBLE       = 'X'
         CRITERION1                       = 'COMMODITY'
         CATEGORY_ID                      = ls_item-category_id
         ITEM_VALUE                       = ls_item-VALUE
         APPROVAL_INDEX                   = '2'
       CHANGING
         APPROVAL_TABLE                   = approval_table
         ITEM_APPROVAL_TABLE              = item_approval_table
        ITEM_APPROVAL_OBJ                = item_approval_obj
    endloop.
    *ELSEIF actual_approval_index EQ 2.
    don't process 2nd step
             no_further_approval_needed = 'X'.
    endif.
    endif. " if lv_wf = '4'.
    FUNCTION ZWF_COMODITY_ITEM_APPROVAL_GET.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(SC_GUID) TYPE  BBP_GUID
    *"     VALUE(ITEM_GUID) TYPE  BBP_GUID
    *"     VALUE(APPROVAL_DESCRIPTION) TYPE  BBP_STEP_DESCRIPTION OPTIONAL
    *"     VALUE(HIDE_ITEMS_NOT_RESPONSIBLE) TYPE  BOOLEAN OPTIONAL
    *"     REFERENCE(CRITERION1) TYPE  BBP_WFL_APP_CRITERION
    *"     VALUE(CATEGORY_ID) TYPE  ZBBP_CATEGORY_ID
    *"     VALUE(ITEM_VALUE) TYPE  BBP_VALUE
    *"     VALUE(APPROVAL_INDEX) TYPE  SWH_NUMC10
    *"  CHANGING
    *"     REFERENCE(APPROVAL_TABLE) TYPE  BBPT_WFL_APPROVAL_TABLE_BADI
    *"     REFERENCE(ITEM_APPROVAL_TABLE) TYPE  BBPT_WFL_ITEM_APPROVAL_BADI
    *"     REFERENCE(ITEM_APPROVAL_OBJ) TYPE  BBPT_WFL_ITEM_APPROVAL_OBJ
    *"       OPTIONAL
    this Function Module is for getting the commodity approvers
    for the commodity items, in the Shopping cart
      DATA:
        ls_approval_table      TYPE bbp_wfl_approval_table_badi,
        ls_item_approval_table TYPE bbps_wfl_item_approval,
        ls_approval_def        TYPE bbpt_wfl_lia_def,
        ls_item_approval_obj   TYPE BBPS_WFL_ITEM_APPROVAL_OBJ.
      DATA:
        lv_app_obj_guid   TYPE bbp_guid_32,
        lv_is_new_approval_object TYPE boolean.
    **structure for commodity data
    data : ls_commodity type zcommodity.
    data : lv_value1 type BBP_WFL_APP_PROPERTY.
      CONSTANTS:
          c_agent_is_user TYPE otype VALUE 'US'.
    First find the right approval object the item belongs to.
    All items of an approval object are approved togheter in
    this approval step, and therefore only one workitem is
    created for this items. IF possible use this standard function
    BBP_WFL_DIN_APP_OBJ_GET for creating the approval object.
    lv_value1 = category_id.
    CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
      EXPORTING
        SC_GUID                      = sc_guid
        CRITERION1                   = criterion1
      CRITERION2                   = ''
      CRITERION3                   = ''
       VALUE1                       = lv_value1
      VALUE2                       = ''
      VALUE3                       = ''
    IMPORTING
       APPROVAL_OBJ_GUID            = lv_app_obj_guid
      IS_NEW_APPROVAL_OBJECT       =
      TABLES
        ITEM_APP_OBJ                 = item_approval_obj
                  CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
                    EXPORTING
                      SC_GUID                      = sc_guid
                      CRITERION1                   = criterion1
                     CRITERION2                   = ''
                     CRITERION3                   = ''
                     VALUE1                       = lv_value1
                     VALUE2                       = ''
                     VALUE3                       = ''
                     IV_ITEM_VALUE                = ITEM_VALUE
                   IMPORTING
                     APPROVAL_OBJ_GUID            = lv_app_obj_guid
                     IS_NEW_APPROVAL_OBJECT       =
                    TABLES
                      ITEM_APP_OBJ                 = item_approval_obj.
    CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
       EXPORTING
         sc_guid                 = sc_guid
         criterion1              = criterion1
      CRITERION2              = ''
      CRITERION3              = ''
         value1                  = category_id
      VALUE2                  = ''
      VALUE3                  = ''
      IMPORTING
    If 2 items of the same shopping cart have the same
    values for the criterias, this function returns the
    same (!!!) approval object guid
        approval_obj_guid       = lv_app_obj_guid
       TABLES
    This table saves the criterias  for which the approval object
    was created. For example:
    |approval object1| "cost center" | 1000   |
    |approval object2| "cost center" | 1200   |
    |approval object3| "prod categ " | office |
        item_app_obj            = item_approval_obj
    Check if this approval object already exists in the approval
    table
      READ TABLE approval_table INTO ls_approval_table
              WITH KEY approval_object_guid = lv_app_obj_guid
                       approval_index       = approval_index.
      IF sy-subrc EQ 4.
        lv_is_new_approval_object = 'X'.
      ENDIF.
      IF lv_is_new_approval_object = 'X'.
    Now read your own approval table based on your criteria's
    **now check whether the category id is a commodity material and
    *find the responsible person for that and
    *check if the amount of item is falling in the approval limit of the comodity manager
    select single * from zcommodity into ls_commodity
    where CATEGORY_ID = category_id
    and ( ZFROMAMT <= item_value and ZTOAMT >= item_value ).
       SELECT * FROM bbpt_wfl_lia_def
                INTO CORRESPONDING FIELDS OF ls_approval_def
                WHERE
                      app_crit_name1  = criterion1 AND
                      app_crit_value1 = value1
       ENDSELECT.
        IF sy-subrc NE 4.
    Fill approval table (who is responsible for which approval
    object in which approval step)
          ls_approval_table-approval_index       = approval_index.
         CONCATENATE c_agent_is_user ls_approval_def-approval_agent1
                                 INTO ls_approval_table-approval_agent.
    CONCATENATE c_agent_is_user ls_commodity-person
                                  INTO ls_approval_table-approval_agent.
          ls_approval_table-name = ls_commodity-name.
          ls_approval_table-approval_description = approval_description.
          ls_approval_table-approval_object_guid = lv_app_obj_guid.
          ls_approval_table-hide_items_not_responsible =
                                  hide_items_not_responsible.
          APPEND ls_approval_table TO approval_table.
         IF ls_approval_def-approval_agent2 IS NOT INITIAL.
    Second approver for the same workitem exists
           CONCATENATE c_agent_is_user ls_approval_def-approval_agent2
                               INTO ls_approval_table-approval_agent.
           ls_approval_table-name = ls_approval_def-agent_string2.
           APPEND ls_approval_table TO approval_table.
         ENDIF.
        ENDIF.
      ENDIF.
    Fill item table (Which items belongs to which approval object)
      ls_item_approval_table-approval_object_guid = lv_app_obj_guid.
      ls_item_approval_table-approval_item_guid   = item_guid.
      APPEND ls_item_approval_table TO item_approval_table.
    **Fill Item approval object
    ls_item_approval_obj-sc_guid = sc_guid.
    ls_item_approval_obj-APP_CRIT_NAME1 = CRITERION1.
    ls_item_approval_obj-APP_CRIT_VALUE1 = CATEGORY_ID.
    ls_item_approval_obj-APPROVAL_OBJECT_GUID = lv_app_obj_guid.
    append ls_item_approval_obj to ITEM_APPROVAL_OBJ.

  • Weblogic 10.3.2.0 installation does not pick the right JDK

    The installation does not pick up the right jdk version that is jdk 11.6.0_11 . Although the machine is running the same. Instead it picks up jdk 1.6.0_14. have tested the machine many times. I am Installing Oracle SOA Suite 11g.

    Inside "startWebLogic.sh" file add the JAVA_HOME like following (just below the "setDomainEnv.sh" call):
    JAVA_HOME=C:\bea103\jdk1.6.0_17
    See if this helps.
    Thanks

  • I have an old iphone 3G that I want to use as an ipod touch. It does have a sim card and it has been reset but for some reason it will not pick up my wireless network, or any other wireless network.  What is the problem?

    I have an old iphone 3G that I want to use as an ipod touch.  It does have a sim card in it and it has been reset. For some reason it will not pick up my wireless network in my house, or any other wireless network.  What could be the problem?

    Is this the problem:
    iOS: Wi-Fi or Bluetooth settings grayed out or dim

  • AP - Payment Process not picking up Invoices

    Hi All,
    I am running the payment process from AP(Payments Manager).I have created 5 Invoices on 12-Dec-2013 and have attached the Pay Group. Once i run the payment process with the pay group none of my invoices has been picked up for processing.I have given the date range from 01-Dec-2013 to 13-Dec-2013
    Please help i need close this task ASAP
    Regards

    Hi,
    What are the payment terms on the invoices? If these are not IMMEDIATE, and the payment is not due, the system would not pick them up until they are due.
    What is the payment method on the invoice and in the PPR? Are you running the PPR for electronically paid invoices but the invoices are set to be paid by check?
    Are there any holds on the suppliers you are trying to pay?
    What are the other parameters you gave when running the PPR? It helps to check those against the invoice to make sure they would qualify.
    Information about the pararameters you are using and one of the invoices to be selected would be helpful.
    Cheryl

  • Document type KR is not picking to Clear GL account with T-code F-03

    Hi all,
    My client wants to clear GL account Cash-in-Transit which is open item managed. He has posted two items. One is with KR document type like Intercompnay adjustment account debit (40) and Cash-in-Transit account credit (50). Second item is with SA document type like Cash-in-Transit accont debit (40) and Intercompany adjustment account credit (50). He did not give vendor number and appropriate posting key (31) while postings. With document type KR, he posted with posting keys 40 and 50. Now while clearing the GL account through T-code F-03, system is picking only SA document type. The system is not picking document type KR. He wants to clear the items with each other. I have checked the document type settings. Check boxes Intercompany postings and trading partner are active in both above document types.
    How can the GL account be cleared ? Are any configuration settings missing ? Kindly advice as soon as possible.
    Thanks in advance.
    Regards,
    K.S.K

    Hi,
    First of all..why would system need a Exchange gain/Loss Account..If your local currency is INR and you posted a debit and a credit document both in INR..then there is no question of a foreign exchange gain/loss account..
    BUT, if you have posted the document in any currency other than INR, ie: your local currency...then the system would need a exchnage gain/loss account when you try to clear the debits and credits.. i am giving an example below to explain better..
    You posted a debit of 100 USD @ 40 = Rs. 4000.00
    You posted a Credit of 100 USD @ 42 = Rs. 4200.00
    Now, if you clear this debit and credit then there is no difference in 100 USD, as the debit and credit is netting off.. but if you see INR there is a difference of Rs. 200.00 which system posts to Exchange gain/loss account..which we maintain in OB09.
    Hope it is clear to you now..
    Regards,
    SAPFICO.

  • Vendor account not picked in F110 payment run

    Hi Sap Experts,
    i have assigned two payment methods to vendor master X,Y,which i do payment run for X for currency USD all the documents are picked for payment and when i run another payment run same time for Y  for currency INR its not picking up in payment run even all the open item s are due,
    could help me to solve the issue
    Laxmi

    Hi,
    Delete the current proposal of the payment run. Enter parameters once again. In Free selection tab restrict the currency to INR field. Run the proposal once again. If it still does pick up line items, check the following things
    1. Parameters of the first payment run. Did you restrict the payment run only for the first payment method
    2. Also see the dates entered in parameter tab of both runs
    Regards,
    radha

  • TDS liability line items are not picking in u2013 J1INCHLN

    Hi Experts
    During depositing of TDS through J1INCHLN it is not picking all line items i.e. available in Ledger (FBL3N). We came to know after reconciliation even as all line items are available in table With_item as uncleared.
    We are facing this problem as the data from 01.03.2009u2026. Previously everything was working fine.
    One more thing I will stress here that we have started Purchase Order based invoice verification also from this period.
    Pl help ASAP.
    Regards
    Kuldeep Dubey

    check the line of TDS is having the Business Place, if the business place is not capturng in TDS line items , then the create the substitution for Business Place & Section Code.
    without business place in TDS line items you can't make the TDS payment.
    Regards
    Akmal

  • Document not picked in F110

    Invoice doc: 5000000001
    Due on: 12/30/2008
    Baseline date: 11/10/2008
    Payment terms: 50 days net due
    Vendor master details:
    Vendor: 241344
    Payment method: E
    Payment proposal Details:
    Payment run on 12/29/2008 through F110 t-code
    Parameters:
    Identification:MTR1
    Payment method: E
    Vendor:1 to 99999999
    Result : above invoice doc not picked
    Second payment executed on same day 12/29/2008
    Parameters:
    MTR2
    Payment method: C
    Vendor: 1 to 99999999
    Result: above invoice picked in proposal but not cleared giving error u201CPmnt methods for this run are not specified in master record or in itemu201D.
    Again same executed on 30th but not picked but finally picked on 01/02/2009
    My question is why document is not picked in MTR1 which has correct values.

    Hi
    In F110 , when ever you run Payment Proposal , it picks the invoices which are due for the Payment Run date. It also depends on the Next Run Date , Based on the Discount periods of the Payment terms.
    In both MTR1 & MTR2 , check your Next Run date.
    Regards
    Venkat

  • Document not picked in f110 payment

    Invoice doc: 5000000001
    Due on: 12/30/2008
    Baseline date: 11/10/2008
    Payment terms: 50 days net due
    Vendor master details:
    Vendor: 241344
    Payment method: E
    Payment proposal Details:
    Payment run on 12/29/2008 through F110 t-code
    Parameters:
    Identification:MTR1
    Payment method: E
    Vendor:1 to 99999999
    Result : above invoice doc not picked
    Second payment executed on same day 12/29/2008
    Parameters:
    MTR2
    Payment method: C
    Vendor: 1 to 99999999
    Result: above invoice picked in proposal but not cleared giving error u201CPmnt methods for this run are not specified in master record or in itemu201D.
    Again same executed on 30th but not picked but finally picked on 01/02/2009
    My question is why document is not picked in MTR1 which has correct values.

    Hi
    Check the base line date for this IV - I dont think the document is overdue in MRT1 that is the reason it is not picked up (in frist payment run). It is overdue in the payment run (in January you run).
    Check the invoice date for document getting picked up ( i hope it is with in the date), check the base line date for payment for payment proposal (I hope on 30th it is not overdue).
    Thanks

  • HT1477 I am trying to install a new iPod Shuffle and my pc does not pick it up.  My pc is running windows 8.1 os.  I do not see that os in the list of operating systems.

    I am trying to install a new iPod Shuffle and my pc does not pick it up.
    My operating system is Windows 8.1 and windows 8 does not appear
    in the list of operating systems.

    You are referring to OFFICE 2010, not Windows XP or 7.
    And which version of Windows do you have?
    NEVER begin before you have a backup, ideally one you have tested and know works.
    You don't really install Boot Camp, the Assistant is a partition tool utility.
    You may just want Office 2008 for Mac.
    If you need Office for Windows, perhaps run Windows in a VM like Parallels or Fusion.
    Buy some backup drives and start using TimeMachine for one backup, then weekly backup with SuperDuper.
    IF there is now a partition for Windows, all you need is to buy Windows, and I would recommend Windows 7 Home Premium (retail) which is about US$149.
    Has nothing to do with free space. Office 2010 isn't to boot from. In fact, you can copy the disc to a folder (1.25GB) and run SETUP from there.

  • G/L account not picking automatically in  PO with account ***. cat. M

    Dear Gurus ,
    I am creating PO manually with account assignment category M in which Consumption posting indicator is blank , when i am trying to create PO GL account is not Picking automatically , if i am giving Stock G/L account manually and creating GR in MIGO  , accounting entry Posting as
    22000000
    Stock  -Raw Material
    KBS
    17001060
    Gr/Ir  -  Finish
    WRX
    with this accounting entries material is coming in sale order stock , as per my knowledge stock account should trigger with Tnn Key BSX.  but account entry is created with KBS.
    My requirement is  G/L should pick automatically in PO from BSX transaction key and  stock value should be hit to Stock G/L with Tnn Key BSX.
    Please guide me because this scenario is new for me.
    Thanks & Regards,
    Akshay

    Dear Sir ,
    for BSX I have check in OBYC there is already G/L account assign to valuation class.
    Valuation Modifire
    valuation class
    G/L account.
    001
    3000
    22000000
    but when i have add G/L in GBB VKA  , it is picking automatically G/L 
    but as per scenario Stock G/L should Post through BSX. which is not coming In PO.  Please guide..
    Thanks & Regards,
    Akshay

  • F110 AUTOMATIC PAYMENT PROGRAM  NOT PICKING PAYMENT METHOD

    hi guru's
    F110 - Running payment program proposal list going to exeption list , House bank not picking up from VENDOR master. if not maintaing house bank in vendor master
    proposal list is coming but 2nd house bank picking but i need 1 house bank. i maintained ranking order in FBZP.
    pls suggest me this issue.
    raj.

    Hi,
    I had an other problem with payment methods and in that case it was important how you fill it in the vendor and in the payment run. prhaps this helps you to found a solution or to understand how it is working
    I have set-up a new payment method "E" for splitting euro payments under EUR 50,000 (K is for the other and non iban payments)
    For this I have made the following settings in the Bank determination:
    PM Rank order House bank
    E 1 733BE
    K 2 733BE
    In the vendor masterdata I will fill in EK (to make it easy for users)
    When I run the payment method with KE the system is using K and not E. when I fill in EK the IBAN payments are going with E and and the other one's with K what is correct.
    Why is the Rank order not working for this? (look first to E and when E is not permitted go use K)
    Paul

  • F110 Automatic Payment Run Is Not Picking Documents.

    Hi,
    I have a foreign based vendor for whom i have assigned a payment method recently (previously there was no payment method assigned) and also checked the foreign business partners allowed checkbox in the payment method for company codes screen.
    However when i create new vendor invoices for the vendor the documents are not selected for payment in the F110 payment run. The error message shown is "No valid payment method". However when i directly assign a payment method to the vendor document manually, the F110 payment run can select this document.
    However the way it shd work is that once the payment method is assiged to the vendor master data then any new documents created for the vendor should be selected for payment in the F110 payment screen.
    may i know why this is not working like this?
    Edited by: Raja Kumar on Jun 24, 2009 9:32 AM

    Hi Raja,
    For the Vendor to whom you are posting invoices, if the vendor balance is in debit, then system cant understand for which document it needs to do payment. It might happened that some credit memos are issued for that vendor. That is the reason in APP, its not picking the documents automatically. If the vendor balance is in credit, then it will pick automatically the house bank. Do one thing, make the balance of vendor as credit (H), then if post any invoice it will automatically pick in APP.
    Hope u understood, Let me know if u still need any clarification.
    Regards
    Srikanth

  • While creating the Transfer Order system is not picking Sale order stock?

    Hi All,
    In the B2B  process the system is not picking the stock from from sale order stock while creating the transfer order? Please suggest.
    Summary : Here we are creating the PR in the sale order and STO is created using the same PR to procure the materials from the WM plant to sale order plant. Since here intialy we are moving the stock to our sale order in WM plant and then picking the same. But while creating the Transfer order system is not picking the sale order stock in WM plant.
    Regards.

    C S Javali
    Check in schedule line in transaction flow whether Transfer Req /assembly is checked or not
    Regards
    Pradeep

Maybe you are looking for

  • After using hibernation, it does not start up and has black screen

    My computer was fine for 2 yrs or so,now it will not startup!  After it was in hibernation, I came back a few hrs later and turned on the power and it has a black screen.  The only things that are lit are the left side blue dot and the f12 button. Th

  • How to get the Dreamweaver CC interface to floating pallets

    ie: no large grouped clunky window, just loose windows you can navigate to desktop easily Hello ... Ok i am one of those who hates the gropuped palets, its just to difficult to get to windows underneath, slows work down. I tried pulling all the palle

  • Displaying more than one icon in a dialog.

    How can display a dialog that contains more than one icon?

  • BP opening

    hi all,         i add balance of creditors and debtors through (system initialization-opening balance-BP opening balance).         I use +ve amount for debit and -ve amount for credit but problem is when i check JE for same it shows me +ve amount in

  • ? getColumnName()

    I can't figure out why the column names are not showing up on my table. Here is the code. package mytablemain; import javax.swing.table.AbstractTableModel; import java.util.List; import java.util.ArrayList; class MyTableModel extends AbstractTableMod