IBM Support

IV74422: SENDEMAIL() FUNCTION RETURNS NULL ERRORS IF CALLPROPS IS MISSING

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • product: Netcool/Impact
    Release: 7.1.0
    
    When ever an email is sent from Impact, the SendEmail function
    writes an error to the impactserver log and impactserver-errors
    log. The email is still sent successfully.
    
    ACTION TAKEN:
    
    
    ---email sent to custoemr ------------------
    Hi Trent,
    
    Unfortunately the impactserver.logs are too busy.  All 10 logs
    filled in
    less than a minute, and nothing about SendEmail.  Here is the
    time range
    found in the impactserver.logs:.
    18 Jun 2015 09:19:53,852 DEBUG
    18 Jun 2015 09:20:06,477 DEBUG
    These logs are full of message about the [JabberDriver],   And
    I don't
    see any messages about [SendEmailFunction]
    I see you changed the impactserver.log4j.properties from Trace
    to Debug.
    and you also added a log count from 5 to 10. But neither of
    these things
    helped.
    
    I'm going to have level 3 look at this PMR and suggest a better
    way to
    get the debug message we need in the impactserver.logs.
    OR maybe L3 can explain the the "null" error messages seen
    based on what
    is listed in the impact-server.log and the policylogger file.
    
    Best Regards,
    Joy
    
    
    Below is a review of what I saw in the logs for your last
    recreate (l
    from last recreate 18 Jun 2018 09:18
    ==================
    OnInsertAndUpdate    (sendemail function snippet from policy)
    ==================
    if (@Application == "Test")
        {
        Address = "[email protected]";
        Subject = "My New Subject";
        Message = "Body " + getServerName();
    log("Server Name: " + getServerName());
    
        sendEmail(NULL, Address, Subject, "Body", NULL, FALSE);
        }
    =======================
    NCI101_emailsender.log
    ======================
    18 Jun 2015 09:16:27,446: Initializing
    18 Jun 2015 09:18:15,102: Sent E-Mail to:
    [email protected]
    18 Jun 2015 09:20:00,571: Sent E-Mail to:
    [email protected]
    
    ========================================
    NCI101_policylogger_OnInsertAndUpdate.log
    ==========================================
    !----------( GetServerName: Post-Execution )-----------
    18 Jun 2015 09:18:14,805:
    [OnInsertAndUpdate][MessageProcessor-Dog#3]Parser log: Server
    Name:
    NCI101
    18 Jun 2015 09:18:14,805:
    [OnInsertAndUpdate][MessageProcessor-Dog#3]
    !++++++++++( SendEmail: Pre-Execution )+++++++++++
    !SendEmail-> Module: SendEmail
    !-----------
    !SendEmail-> OrgNode: NULL (Null)
    !SendEmail-> Address: [email protected] (String)
    !SendEmail-> Subject: My New Subject (String)
    !SendEmail-> TextMessage: Body (String)
    !SendEmail-> Sender: NULL (Null)
    !SendEmail-> ExecuteOnQueue: false (Boolean)
    !SendEmail-> FileToAttach: !SendEmail-> CallProperties:
    !SendEmail-> DataItem: null
    !SendEmail-> DataItems: null
    !----------( SendEmail: Pre-Execution )-----------
    18 Jun 2015 09:18:15,102:
    [OnInsertAndUpdate][MessageProcessor-Dog#3]
    !++++++++++( SendEmail: Post-Execution )+++++++++++
    !SendEmail-> Module: SendEmail
    !-----------
    !SendEmail-> OrgNode: NULL (Null)
    !SendEmail-> Address: [email protected] (String)
    !SendEmail-> Subject: My New Subject (String)
    !SendEmail-> TextMessage: Body (String)
    !SendEmail-> Sender: NULL (Null)
    !SendEmail-> ExecuteOnQueue: false (Boolean)
    !SendEmail-> FileToAttach: !SendEmail-> CallProperties:
    !SendEmail-> Dat
    aItem: null
    !SendEmail-> DataItems: null
    !----------( SendEmail: Post-Execution )-----------
    18 Jun 2015 09:18:15,102:
    [OnInsertAndUpdate][MessageProcessor-Dog#3]
    
    
    ================
    impactserver-errors.log
    ================
    18 Jun 2015 09:18:14,805 ERROR [SendEmailFunction] Unable to get
    additional parameters
    java.lang.NullPointerException
    ..
    18 Jun 2015 09:18:14,805 ERROR [SendEmailFunction] Unable to get
    additional parameters
    java.lang.NullPointerException
    ..
    18 Jun 2015 09:18:14,883 ERROR [SendEmailFunction] unable to
    get value
    for variable: EmailImages
    java.lang.NullPointerException
    ----------------------------------------------------------------
    -----
    
    
    - asked about improving log4j setting to get debug messages
    needed for
      "sendemail" during today's L3 meeting.  Jason said he could
    help with
       this.
    
    - sending over PMR for help in debuging PMR issue.
    
    ************************* Template to Engage Level 3
    *******************
    
    APAR being requested (y/N):  no
    Product:                  Impact
    Product Version:  7.1.0.2
    Fix/Build Level:Build date: 7.1.0.2 - 201503111600
    Test Fixes installed: n/a
    Target Component:  sendEmail() in a policy
    OS and version: Windows
    
    INTEGRATION DETAILS:
    
    SUMMARY OF PROBLEM:
    
    SendEmail function generates errors
    customer would like to stop error messages from occurring.
    
    Example of error messages seen in impact logs
    ===============================
    <Date Time stamp> ERROR [SendEmailFunction] Unable to get
    additional parameters java.lang.NullPointerException
    ..
    <Date Time stamp> ERROR [SendEmailFunction] Unable to get
    additional parameters java.lang.NullPointerException
    ..
    <Date Time Stamp>ERROR [SendEmailFunction] unable to get value
    for variable: EmailImages java.lang.NullPointerException
    

Local fix

  • The errors comes from callProps not being defined.  Please
    change the sendEmail function to look like the following.
    (This will make sure that CallProps is defined and empty. Which
    will  gets rid of the "null" errors)
    
    CallProps = NewObject();
    sendEmail(NULL, Address, Subject, "Body", NULL, FALSE, NULL,
    CallProps);
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Impact Users                                             *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * SENDEMAIL() FUNCTION RETURNS NULL ERRORS IF CALLPROPS IS     *
    * MISSING                                                      *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * As a workaround, create an empty CallProps object to use in  *
    * the SendEmail function.                                      *
    ****************************************************************
    The SendEmail function was not checking if the CallProps was
    null before trying to access it.
    

Problem conclusion

  • Added check for Null values.
    
    The fix for this APAR is contained in the following
    maintenance packages:
    |Fix Pack | 7.1.0-TIV-NCI-FP0003
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV74422

  • Reported component name

    NETCOOL/IMPACT

  • Reported component ID

    5724O59IS

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-06-22

  • Closed date

    2015-08-28

  • Last modified date

    2015-08-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • UNKNOWN
    

Fix information

  • Fixed component name

    NETCOOL/IMPACT

  • Fixed component ID

    5724O59IS

Applicable component levels

  • R710 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSCP78Y","label":"Netcool\/Impact"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
28 August 2015