Error while sending the mail( Database error for ADDR_PERS_COMP_COMM_GE)

Hello guys,
I am facing the error    " Database error for <ADDR_PERS_COMP_COMM_GET> <0> " as a pop-up message.
below is my program.
types: BEGIN OF t_p0002,
        pernr type PERSNO,       "Personnel number
        nachn TYPE PAD_NACHN,    "Last Name
        VORNA TYPE PAD_VORNA,    "First Name
        gbdat TYPE gbdat,        "Date of Birth
      END OF t_p0002.
*******************Data of an object which can be changed**************************************
data   S_maildata type SODOCCHGI1.
*******************Text field length 255: texts***********************************************
data : IT_MAILTXT1 type table of SOLISTI1 ,  "Internal table will contain texts of mail header
       WA_MAILTXT1 TYPE SOLISTI1,
       IT_MAILTXT2 type table of SOLISTI1 ,  "Internal table will contain texts of contents in the mail
       WA_MAILTXT2 TYPE SOLISTI1.
*******************Structure of the API Recipient List*****************************************
data : IT_MAILREC type table of SOMLRECI1,
       WA_MAILREC TYPE SOMLRECI1.
DATA : it_pa0002 TYPE TABLE OF t_p0002,
       wa_pa0002 type t_p0002.
data  Header_text type c LENGTH 15.
CONSTANTS  content_text type c LENGTH 35 VALUE 'Tomorrow is the birthday of'.
*******************Event start of selection***************************************************
start-of-selection.
  PERFORM get_birthdate.   " will give birthday details
  PERFORM document_details. " will give text and mail details
*&      Form  get_birthdate
      text : subroutine to get employee birthdate details
form get_birthdate.
  data : l_date like sy-datum.
  refresh it_pa0002.
  l_date = sy-datum + 1.
  SELECT pernr nachn vorna gbdat
    from pa0002
    INTO TABLE it_pa0002
    where gbdat = '19650302'.
ENDFORM.                    "get_birthdate
*&      Form  document_details
      text : subroutine to get texts and mail details.
FORM document_details.
  CLEAR: Header_text,
          wa_MAILREC.
  REFRESH  IT_MAILREC.
  S_maildata-obj_name = 'Birthday Reminder'.
  s_maildata-obj_descr = 'Birthday Reminder'.
  s_maildata-obj_langu = sy-langu.
  READ TABLE IT_MAILTXT1 INTO WA_MAILTXT1
  WITH KEY WA_MAILTXT1-line .
  WA_MAILTXT1-line = 'Birthday Reminder'.
  append WA_MAILTXT1 TO IT_MAILTXT1.
  CLEAR WA_MAILTXT1.
  LOOP at it_pa0002 INTO wa_pa0002.
    READ TABLE IT_MAILTXT2 INTO WA_MAILTXT2
     WITH KEY WA_MAILTXT2-line .
    CONCATENATE content_text ' ( ' wa_pa0002-pernr ' ) ' wa_pa0002-nachn wa_pa0002-vorna
    INTO  WA_MAILTXT2 SEPARATED BY ' '.
    append WA_MAILTXT2 TO IT_MAILTXT2.
    CLEAR WA_MAILTXT2.
    CLEAR wa_pa0002.
  ENDLOOP.
   LOOP AT IT_MAILREC INTO WA_MAILREC.
  WA_MAILREC-RECEIVER = 'Any mail id'.
  WA_MAILREC-rec_type = 'U'.
  append WA_MAILREC TO IT_MAILREC.
   ENDLOOP.
********************Function Mofule:To Send new Document*****************************************
  CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
  EXPORTING
  document_data = S_maildata
  DOCUMENT_TYPE = 'RAW'
  PUT_IN_OUTBOX = ' '
  COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
  tables
  OBJECT_HEADER = IT_MAILTXT1
  OBJECT_CONTENT = IT_MAILTXT2
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
  receivers = IT_MAILREC
   EXCEPTIONS
   TOO_MANY_RECEIVERS = 1
   DOCUMENT_NOT_SENT = 2
   DOCUMENT_TYPE_NOT_EXIST = 3
   OPERATION_NO_AUTHORIZATION = 4
   PARAMETER_ERROR = 5
   X_ERROR = 6
   ENQUEUE_ERROR = 7
   OTHERS = 8
  IF sy-subrc = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    "document_details
After I pressed the exit button the program is getting terminated but still this mail is comming to sost transaction code.
If I will comment the message code which is after sy-subrc the popup will not come and program will work without any interruption.
Can anybody please solve this problem?

Resolved

Similar Messages

  • Error while sending the email notifcation

    Hi All
    I am getting this error while sending the email notifcation.If any one of you have any idea regarding this please suggest
    [2012-09-12T03:55:41.288-10:00] [soa_server1] [ERROR] [SDP-26102] [oracle.sdp.messaging.driver.email] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingdriver-email] Error while writing e-mail message content.[[
    java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
         at java.util.Vector.elementAt(Vector.java:427)
         at javax.mail.Multipart.getBodyPart(Multipart.java:157)
         at javax.mail.internet.MimeMultipart.getBodyPart(MimeMultipart.java:256)
         at oracle.sdpinternal.messaging.driver.email.EmailDriver.getHeaderEncoding(EmailDriver.java:1079)
         at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:670)
         at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
         at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
         at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
         at sun.reflect.GeneratedMethodAccessor2553.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy346.onMessage(Unknown Source)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:379)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
         at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
         at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    [2012-09-12T03:55:41.331-10:00] [soa_server1] [WARNING] [SDP-25107] [oracle.sdp.messaging.engine.store] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingserver] Message ID bac38bd50a1f32a129c5c739335a7855 in Status object does not match previously recorded Message ID b7e259a30a1f32a12c981a3ffd343f6d.
    [2012-09-12T03:55:41.362-10:00] [soa_server1] [ERROR] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Error status received from UMS.[[
    Status detail :
         Status type : DELIVERY_TO_GATEWAY:FAILURE,
         Status Content : Failed to set message headers: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0,
         Addressed to : EMAIL:[email protected],
         UMS Driver : Farm_base_domain/base_domain/soa_server1/usermessagingdriver-email:oracle_sdpmessagingdriver_email#Email-Driver,
         UMS Message Id : b7e259a30a1f32a12c981a3ffd343f6d,
         Gateway message Id : ,
         Status Received at : Wed Sep 12 03:55:41 HST 2012.
    Check status details and fix the underlying reason, which caused error.
    [2012-09-12T03:55:51.492-10:00] [soa_server1] [WARNING] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Could not find notification record corresponding to failed notification : (Channel message id) : b7e259a30a1f32a12c981a3ffd343f6d[[
    Hence it will not be retried.
    Possible cause could be purging of notification data after sending out notification, but before receiving status.
    ]]

    Are you using your email address to send the email notifications if it Is not configured with AD? Have you populated the mail attribute in weblogic console-->realms-->my realms-->users
    In addition are you sure you have configured the 'Email Driver Properties' correctly in EM ?? have you specified the Notification Mode to Email ?
    Please make sure that the outgoing mail server and port along with the username and password are correct.
    Also validate the workflow settings in your EM?
    In addition, please validate that when you logon to BPM worklist using the admin account and click on the name for e.g. weblogic, you see the email attribute populated properly.
    Thanks
    ACM

  • Failed to send the mail message error code: -49

    Hi,
    When sending mail outside the company (outside the domain), getting this error: Failed to send the mail message error code: -49
    When sending mail internally (within the domain) successfully submitted.
    I was looking for notes relating to the subject but could not find anything that helped me
    I would appreciate your help,
    Hilla

    Hi Gordon,
    The problem was solved, the customer changed his ip adress on the server and it's OK now!
    Thank you !!
    Hilla.

  • Error while filling the set up table for 2LIS_11_VAITM

    Dear Experts,
    i am facing an error while filling the set up table for 2LIS_11_VAITM in the source system.
    The error was "Company code for sales org 9000 does not exist (document 1326)".
    when i checked the document in the Header table VBAK,company code was blank for the document .
    Company code was there in the selections for the setup table.
    The error means that company code should be maintained for the sales document as per my knolwedge.i think document was not created properly in the source system.
    Could you please help me out to over come the problem.
    Regards,
    Sunil...

    in the selection screen for filling the setup table, there is a parameter No. tolerated faulty documents
    you'll have to enter at least '1' here in your case
    it might be that there are other erronuous records, in that case it will crash again, and you'll have to increase the value for this parameter
    (under "normal" circumstances, all documents in the source should be correct... but apparently it's possible to circumvent this)

  • Error while getting the ORACLE user account for your concurrent request

    Hi ,
    When I am submitting the Concurrent Program from OAF page Iam getting
    Error
    Encountered an error while getting the ORACLE user account for your concurrent request. Contact your system administrator.
    When we will face this error.
    Not able to submit the Request
    Krishna

    Krishna
    Try like this
    public int submitCPRequest(String shipmentId) {
    System.out.println("into submitCPRequest");
    try {
    OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
    OADBTransaction transaction = am.getOADBTransaction();
    Connection conn = transaction.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(conn);
    cr.setDeferred();
    String applnName = new String("XXAPL"); //Application that contains the concurrent program
    System.out.println("ApplName"+ applnName);
    String cpName = new String("SHIP_REQ"); //Concurrent program name
    System.out.println("Concc Name"+ cpName);
    // String cpDesc = new String("Shipping Request"); // concurrent Program description
    // Pass the Arguments using vector
    // Here i have added my parameter headerId to the vector and passed the
    //vector to the concurrent program
    Vector cpArgs = new Vector();
    cpArgs.addElement(shipmentId);
    System.out.println("Args"+ cpArgs);
    After this it is going into exception
    // Calling the Concurrent Program
    int requestId = cr.submitRequest(applnName, cpName, null, null, false, cpArgs);
    System.out.println("Req Id"+ requestId);
    tx.commit();
    return requestId;
    catch (SetDeferredException e)
    throw new OAException("SetDeferredException " + e.getMessage(),OAException.ERROR);
    catch (RequestSubmissionException e) {
    System.out.println("Into Exception");
    OAException oe = new OAException(e.getMessage());
    oe.setApplicationModule(this);
    throw oe;
    }Thanks
    AJ

  • Encountered an error while getting the ORACLE user account for your concurrent request. Contact your system administrator

    Dear Techies,
    We have registered an Extra Information Type as self service OAF page and did some validations using user hook which are working fine. But for some requests EIT creation page is throwing below errors.
    1. Encountered an error while getting the ORACLE user account for your concurrent request. Contact your system administrator.
    2. An unexpected situation occurred while executing routine FND_DATA_SECURITY.GET_SECURITY_PREDICATE_HELPER.The cause was: The parameter 'p_object_name' cannot be 'GLOBAL'.
    System throws these errors whenever user hook suppose to throw our customized validation messages.Since we are at UAT instance, we are bouncing apache and oacore to get rid of these errors every time they appear. But we cannot bounce once it is moved to production.
    Kindly share some ideas  to fix these errors as we are very close to Go-Live and we are facing this issue with all EIT's and SIT's.
    Thanks and Regards
    Dileep Kumar.

    Hi Mahesh,
    Thanks for reply.
    I have gone through the link that you have suggested. But our EIT user hook validations doesn't  have any code related to submission of concurrent programs. More over our error is not stable. If we bounce the apache and oacore, the system will work fine without unexpected errors for some time. We are not even able to replicate these errors.
    Thanks and Regards
    Dileep Kumar.

  • Error while executing the reversal in KO88 for an internal order

    Hi Experts,
    I am getting  the below error while doing the Actual settlement : order reverse through t code KO88. we are currently using the SAP ECC 5.0 and i found the SAP notes 215944 and 335428, which are upto release 4.6C.
    System error - deletion not possible
    Message no. AAPO186
    i can see that the doc has generated for the settlement and for reversal it is giving the error. Can some one help me who has faced this type of problem earlier.
    Thanks & Regards,
    Venkat

    Hi,
    Additionally, try to check 300273 note.
    Regards,
    Eli

  • Error while calling the Mapping function module for BW Extraction

    Hi
    iam getting runtime error while calling the BW mapping function
    The error description is as shown below.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    <b>Short text</b>
        Type conflict during structure parameter transfer at CALL FUNCTION.
    <b>What happened?</b>
        Error in the ABAP Application Program
        The current ABAP program "GP466CV1Y7W2VML1PJ3VB80KDOP" had to be terminated
         because it has
        come across a statement that unfortunately cannot be executed.
    <b>Error analysis</b>   
    An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
         not caught in
        procedure "CALL_MAPPING_FUNCTION" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        In the function "CMS_CB_BW_MAP", the STRUCTURE parameter "EXTRACT_DATA" is
         typed in such a way
        that only actual parameters are allowed, which are compatible in Unicode
         with respect to the fragment view. However, the specified actual
        parameter " " has an incompatible fragment view.
    I am passing the EXTRACT_DATA  parameter as specification LIKE with the associated type  - corresponding structure
    Please let me know how can i resolve this issue
    Regards
    Leon

    Dear benarji ,
    I'm having the  same problem help me to correct . I have mentioned below as what error i got.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    Short text
         Type conflict during structure parameter transfer at CALL FUNCTION.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "ZDLROUTSTANDING_COPY" had to be terminated because it
          has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
          not caught in
         procedure "PDF" "(FORM)", nor was it propagated by a RAISING clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         In the function "/1BCDWB/SF00000080", the STRUCTURE parameter "IT_WORKS_SF" is
          typed in such a way
         that only actual parameters are allowed, which are compatible in Unicode
          with respect to the fragment view. However, the specified actual
         parameter "SFTWORKS" has an incompatible fragment view.
    Missing RAISING Clause in Interface
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     876
        Module type                             (FORM)
        Module Name                             PDF
    Trigger Location of Exception
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     894
        Module type                             (FORM)
        Module Name                             PDF
    Source Code Extract
    Line  SourceCde
      864 **            i_logo             = 'ENJOYSAP_LOGO'
      865 *            IT_LIST_COMMENTARY = I_LIST_COMMENTS1.
      866
      867 ENDFORM.                    "alv_top_of_page1
      868 *&---------------------------------------------------------------------*
      869 *&      Form  PDF
      870 *&---------------------------------------------------------------------*
      871 *       text
    872 *----------------------------------------------------------------------*
    873 *  -->  p1        text
    874 *  <--  p2        text
    875 *----------------------------------------------------------------------*
    876 FORM pdf .
    877
    878 *  *** Smartforms & PDF ***
    879
    880   ssfctrlop-no_dialog = 'X'.
    881   ssfctrlop-preview   = 'X'.
    882   ssfctrlop-getotf    = 'X'.
    883   ssfcompop-tddest = 'ERP7'.
    884   DATA : mcheck LIKE sy-subrc.
    885   CLEAR : fm_name.
    886
    887   "Get Function module name for given smartform
    888   CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    889     EXPORTING
    890       formname = 'ZSFDLOS1'
    891     IMPORTING
    892       fm_name  = fm_name.
    893
    >>>>   CALL FUNCTION fm_name
    895   EXPORTING
    896         control_parameters   = ssfctrlop
    897         output_options       = ssfcompop
    898         mrefno               = mrefno
    899 *       P_TITLE              = MTITLE
    900   IMPORTING
    901         document_output_info = st_document_output_info
    902         job_output_info      = st_job_output_info " IT_OTF_DATA
    903         job_output_options   = st_job_output_options
    904   TABLES
    905         it_works_sf          = sftworks
    906   EXCEPTIONS
    907         formatting_error     = 1
    908         internal_error       = 2
    909         send_error           = 3
    910         user_canceled        = 4
    911     OTHERS               = 5.
    912
    913   IF sy-subrc NE 0.
    Advance Thanks

  • Error while deriving the currencyfrom table T001P for International payrol

    Dear Experts,
    when i run the payroll in simulation mode. im geting an error msg as ' error while deriving the currency from table T001P'
    I have checked all PA assignement with compnay code and country grouping (molga =99), which is correct and also i have checked all bellow tables.
    V_T510F_B
    T500W
    T500C
    Transaction code OE00
    In Trasaction code OE00, system not allowing me to give the currency (LKR - Srilankan Rupees). its giving an error msg as ' maximum of 2entries are allowed for each country in table T500c'(Its not alowing me to save it)
    I dont knw how to over come from this issue.
    I have chnaged the company code and tried but still im getting the same error while running the payroll.
    Any idea from Anyone....?
    Regards
    Dinesh.

    HI Mohan,
    Thz for your reply.i have checked all tables which u have mentioned. but currency (LKR- Srilankan Rupees) has been assigned.
    In V_CURC.. there are no 2 entires. but when i try to assign the currency in T-Code OE00. its giving an error msg " A maximum 2 entries are allowed for each country in Table T500C"
    I have tried to make one more intry in the same table and the same currency then its giving an error msg as " An entry already exist with the same key"
    V_TCURR  is currency exchnage rate...  Is it necesory?
    Thz,
    Dinesh.

  • Error while sending the data using input schedule

    Dear Friends,
    I am unable to send the data using input schedule due to following error is occur while sending the data.
    The Error Message : Member (H1) of dimension (ENTITY) is not a base member (parent or formula)
    Can anyone please help me to resolve the above error.
    Thanks and regards,
    MD.

    Hi,
    You are trying to send data to a parent/node, you can only send data in BPC to lowest-level children (base mamabers) of any dimension.
    "H1" is a parent in the entity dimension so you should try sending to a child.
    Tom.

  • How to automatically send the mail without popping for send

    Hi,
    I am providing proper values in system parameters of report6. viz.
    Desformat=pdf
    Destype=mail
    mode=bitmap
    desname=Valid email id
    I am using MS MAPI (Microsoft Outlook)
    When I run the report, I get the composed mail with the pdf attachment. When I press the SEND button of the composed mail, I shall be able to send the mail.
    Is there a way to SEND the mail automatically through reports?
    Regds
    Prakash H L

    hi ,
    Try running your report in batch mode, provide batch=yes on the command line for your report. This will suppress any user interaction and will mail the report without the need for the user to click on the send button of the mail composer.
    Regards
    Oracle Reports Team.

  • Error while sending E-Mail -- 501 Syntax error in parameters or arguments

    Dear Friends,
    I was trying to send E-Mail using the NTLM Authentication mechanism using the below program:
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.mail.PasswordAuthentication;
    import java.util.Date;
    import com.sun.mail.smtp.*;
    public class MailerWithAuthentication
         private String     smtpServer;
         private String      fromEmailId;
         private String      toEmailId;
         private String      ccEmailId;
         private String      bccEmailId;
         private String      subject;
         private String      message;
         private String host;
         public MailerWithAuthentication(String toemail, String msg,String sub,String fromId,String host)
              this.toEmailId = toemail;;
              this.subject = sub;
              this.message = msg;
              this.fromEmailId=fromId;
              this.host=host;
    public void sendMail()
              String mailContent = "";
              try
                   Authenticator authenticator = new Authenticator();
                   Properties props = new Properties();
              props.put("mail.smtp.host",this.host );
              props.put("mail.smtp.port", "25");
              props.put("mail.smtp.auth", "true");
              props.put("mail.smtp.auth.mechanisms", "NTLM");
              props.put("mail.smtp.auth.ntlm.flags", "0x00000200");          
              props.put("mail.smtp.auth.ntlm.domain","sal.ad");
              props.put("mail.debug", "true");
              Session session = Session.getDefaultInstance(props,authenticator);
    Message msg = new MimeMessage(session);          
              MimeMessage message = new MimeMessage(session);
              message.setContent("This is a test", "text/plain");
              message.setFrom(new InternetAddress(this.fromEmailId));
              message.addRecipient(Message.RecipientType.TO,new InternetAddress(this.toEmailId));
              Transport.send(message);
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println("Exception in MailerThread : run: " + e.getMessage());               
    private class Authenticator extends javax.mail.Authenticator {
              private PasswordAuthentication authentication;
              public Authenticator() {
                   String username= "sal.ad\mailuser";
                   String password = "mail@123";          
                   authentication = new PasswordAuthentication(username, password);
              protected PasswordAuthentication getPasswordAuthentication() {
                   return authentication;
    public static void main(String args[])
              try
                   System.out.println(" Usage : java MailerWithAuthentication <To-Email> <Message> <Subject> <From-Email> <Mail-Server-IP>");
                   MailerWithAuthentication mailer = new MailerWithAuthentication (args[0],args[1],args[2],args[3],args[4]);
                   mailer.sendMail();
              catch(Exception e)
                   e.printStackTrace();
    Following is the output while running the program:
    DEBUG: JavaMail version 1.4ea
    DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.providers (No such file or directory)
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.providers
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.address.map (No such file or directory)
    Mechanishm = NTLM
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: trying to connect to host "192.168.14.6", port 25, isSSL false
    220 ****************************************************************************
    DEBUG SMTP: connected to host "192.168.14.6", port: 25
    EHLO
    501 Syntax error in parameters or arguments -
    HELO
    501 Syntax error in parameters or arguments -
    javax.mail.MessagingException: 501 Syntax error in parameters or arguments -
    =================================
    The error is :
    EHLO
    501 Syntax error in parameters or arguments -
    HELO
    501 Syntax error in parameters or arguments -
    =================================
    Please tell me what went wrong here. Is it due to any mistake in the program ?
    Thanks in advance.

    hello Anirudh Pucha,
    thanks for your message,
    i'm downloading all the files you advised and one more doubt regarding SOA installation,
    i'm using BPEL Process manager 10.1.3.1.0 installed on my machine and not installed SOA Suite (problem in installing AS Middle tier), i send voice,sms through BPEL PM which works fine, and faced problem in e-mail notification only, according to me with out installing SOA suite we can use BPEL PM or please let me know the procedure to install the downloading files.
    if possible please send me a details in word documents to my mail "[email protected]".
    Thanks again

  • Error While Restoring the Oracle Database using Cloud Backup

    Hello,
    I have been facing a serious error while oracle restoration. I have Backed up Complete Database. For Testing restoration, the DBA removed all the DBF, logs and Control File from there orignal Position.
    He restarted the Database in "Startup nomount" mode. No i am not able to connect to target database from my Backup Server remotely.
    Whenever i try to restore, it shows following error:-
    ***RMAN-04005: error from target database:***
    ***ORA-12528: TNS:listener: all appropriate instances are blocking new connections***
    ***ORA-12528: TNS:listener: all appropriate instances are blocking new connections***
    ***"ORA-12528: TNS:listener: all appropriate instances are blocking new connections***
    I am using Oracle 11g R2 x64-bit database and on Windows Platform with Windows Server 2008 R2.
    Can Anyone help me by connecting, rman to the remote target database when it is in nomount mode.
    I am not able to connect the sqlplus remotely.\
    Thanks in Advance...
    Regards
    Pravesh Upadhyay

    Devika,
    You have to stop all your adapters, your repository, close all IStudio client and stop all sessions connected to this schema before running the oaiimport.
    If you don't do this the oaiimport will not work properly as the script will not be able to drop the user and will try to re-create existing objects.
    Tip : use the following select to list the session using oaihub902 user (and get rid off them)
    select username, count(*)
    from V$session
    where username in ('OAIHUB902')
    group by username
    order by count(*) desc, username
    JL

  • Error while sending the messages to JMS Queue

    Hi ,
    I am trying to pick the file from JMS Queue and send the response xml as outbound message to JMS Queue again using XAI Sender
    I Created XAI Sender, Outbound Message Type(DM-RCVRESP) and configured these two with External System.
    I am able to pick the file from JMS Queue but unable to send the message through XAI Sender (Real-time)
    Plz find below the error trace getting.
    [Wed Jun 15 16:12:09 IST 2011] Error while processing sender "UPLOADSTG" : Unable to update response in staging table: Row id not given.
    com.splwg.mpl.sending.SameThreadSendingManager$ProcessException
         at com.splwg.mpl.sending.SameThreadSendingManager.processDestination(SameThreadSendingManager.java:341)
         at com.splwg.mpl.sending.SameThreadSendingManager.sendResponse(SameThreadSendingManager.java:293)
         at com.splwg.mpl.sending.SameThreadSendingManager.doSend(SameThreadSendingManager.java:249)
         at com.splwg.mpl.server.async.ExecSendRequestProcessor.ProcessRequest(ExecSendRequestProcessor.java:61)
         at com.splwg.mpl.server.async.RequestProcessingThreadAdapter.run(RequestProcessingThreadAdapter.java:46)
         at com.splwg.mpl.server.PooledThread.run(PooledThread.java:91)
         at java.lang.Thread.run(Thread.java:662)
    Please guide me in this regard..
    Thanks,
    sukumar

    What have you configured for the response tab for the sender? Are you using the MPL or the MDB?
    Take a look at:
    MPL Best Practices (Doc Id 1308165.1)
    Oracle WebLogic JMS Integration (Doc Id: 1308181.1)

  • Error while sending E-Mail Notification

    hi,
    when i tried to send mail from BPEL i faced error, where i configured the outlook with gmail server its working fine,here i paste the ns-emails.xml and the error code is server.
    ns_emails.xml
    <EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    EmailMimeCharset=""
    NotificationMode="ALL">
    <EmailAccount>
    <Name>Default</Name>
    <GeneralSettings>
    <FromName>my name</FromName>
    <FromAddress>my email address</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>smtp.gmail.com</SMTPHost>
    <SMTPPort>587</SMTPPort>
         <AuthenticationRequired>true</AuthenticationRequired>
    <UseTLS>true</UseTLS>
    </OutgoingServerSettings>
    <IncomingServerSettings>
    <Server>pop.gmail.com</Server>
    <Port>995</Port>
    <Protocol>pop3</Protocol>
    <UserName>my email address</UserName>
    <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">my password</Password>
    <UseSSL>true</UseSSL>
    <Folder>Inbox</Folder>
    <PollingFrequency>1</PollingFrequency>
    <PostReadOperation>
    <MarkAsRead/>
    </PostReadOperation>
    </IncomingServerSettings>
    </EmailAccount>
    </EmailAccounts>
    Error in server:
    javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS
    command first. a4sm326251tib.11
    at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTran
    sport.java:1020)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTranspor
    t.java:716)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTrans
    port.java:388)
    at oracle.tip.pc.services.notification.email.EmailDriver
    .sendMessage(EmailDriver.java:215)
    at oracle.tip.pc.services.notification.email.EmailDriver
    .send(EmailDriver.java:185)
    at oracle.tip.pc.services.notification.DefaultNotificati
    onServiceImpl.sendEmailNotification(DefaultNotificationServiceImpl.java:251)
    at oracle.tip.pc.services.notification.NotificationServi
    ceImpl.sendEmailNotification(NotificationServiceImpl.java:271)
    at oracle.bpel.services.notification.queue.sender.MDBCon
    sumer.deliverNotification(MDBConsumer.java:256)
    at oracle.bpel.services.notification.queue.sender.MDBCon
    sumer.onMessage(MDBConsumer.java:137)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
    ethod)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMet
    hodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Deleg
    atingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoin
    PointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContext
    Impl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterce
    ptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContext
    Impl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContext
    ActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContext
    Impl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(
    InvocationContextPool.java:55)
    at com.evermind.server.ejb.MessageDrivenConsumer.onMessa
    ge(MessageDrivenConsumer.java:347)
    at com.evermind.server.ejb.MessageDrivenConsumer.process
    Messages(MessageDrivenConsumer.java:233)
    at com.evermind.server.ejb.MessageDrivenConsumer.run(Mes
    sageDrivenConsumer.java:169)
    at com.evermind.util.ReleasableResourcePooledExecutor$My
    Worker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    please help me out to resolve the issue.
    thanks in Advance
    Aswath Thaniga

    hello Anirudh Pucha,
    thanks for your message,
    i'm downloading all the files you advised and one more doubt regarding SOA installation,
    i'm using BPEL Process manager 10.1.3.1.0 installed on my machine and not installed SOA Suite (problem in installing AS Middle tier), i send voice,sms through BPEL PM which works fine, and faced problem in e-mail notification only, according to me with out installing SOA suite we can use BPEL PM or please let me know the procedure to install the downloading files.
    if possible please send me a details in word documents to my mail "[email protected]".
    Thanks again

Maybe you are looking for

  • The weblogic.security.Security.runAs() and JAAS Subject

    Let say that I have Java client with some JAAS code that authenticates the user. The LoginContext generates a Subject containing the Principal name of the authenticated user, but also some private credentials that makes the Subject secure. Now I want

  • Taking an hour to create thumbnails for 5 minute movie ! Any Fix ?

    When I import a short 5 minute mp4 file why does imovie take so long just to create the thumbnails - this alone is making the imovie unusable for me - so much for being the quick and easy movie editor !

  • Wireless PCIe Adapter on Mac Pro Mid 2012

    Hi MP Folks I would like to know if anyone ever tried adding a wireless adapter into a PCI Express slot in Mac Pro Mid 2012? I need to have two wireless connections for my Mac Pro. One is for Internet access, the other is for internal RDP access. A P

  • Optimal disk format for archived images, future access?

    Using a 2T WD green for off site archived images only. Is there a preferred partition scheme and format for maximum access for the unforeseeable future ? Thanks for advice !

  • Unable to send or recive email Internal & Externa ... Exchange 2013

    Hi all duo to some previse problem I hade to recover the server hard drive with a backup image. I recover the server with the windows installation cd &  backup image that I stored  on external HD the recover was done successfully & fix this issue and