Getting error while sending mail through javamail api

I can able to compile the following code successfully but while executing it showing the error
C:\Program Files\Java\javamail-1.4\demo>java msgsend -o [email protected] -M 203.112.158.188 [email protected]
Exception in thread "main" java.lang.NoClassDefFoundError: msgsend
import java.io.*;
import java.net.InetAddress;
import java.util.Properties;
import java.util.Date;
import javax.mail.*;
import javax.mail.internet.*;
public class msgsend {
public static void main(String[] argv) {
     String to, subject = null, from = null,
          cc = null, bcc = null, url = null;
     String mailhost = "null";
     String mailer = "msgsend";
     String file = null;
     String protocol = null, host = null, user = null, password = null;
     String record = null;     // name of folder in which to record mail
     boolean debug = false;
     BufferedReader in =
               new BufferedReader(new InputStreamReader(System.in));
     int optind;
     for (optind = 0; optind < argv.length; optind++) {
     if (argv[optind].equals("-T")) {
          protocol = argv[++optind];
     } else if (argv[optind].equals("-H")) {
          host = argv[++optind];
     } else if (argv[optind].equals("-U")) {
          user = argv[++optind];
     } else if (argv[optind].equals("-P")) {
          password = argv[++optind];
     } else if (argv[optind].equals("-M")) {
          mailhost = argv[++optind];
     } else if (argv[optind].equals("-f")) {
          record = argv[++optind];
     } else if (argv[optind].equals("-a")) {
          file = argv[++optind];
     } else if (argv[optind].equals("-s")) {
          subject = argv[++optind];
     } else if (argv[optind].equals("-o")) { // originator
          from = argv[++optind];
     } else if (argv[optind].equals("-c")) {
          cc = argv[++optind];
     } else if (argv[optind].equals("-b")) {
          bcc = argv[++optind];
     } else if (argv[optind].equals("-L")) {
          url = argv[++optind];
     } else if (argv[optind].equals("-d")) {
          debug = true;
     } else if (argv[optind].equals("--")) {
          optind++;
          break;
     } else if (argv[optind].startsWith("-")) {
          System.out.println(
"Usage: msgsend [[-L store-url] | [-T prot] [-H host] [-U user] [-P passwd]]");
          System.out.println(
"\t[-s subject] [-o from-address] [-c cc-addresses] [-b bcc-addresses]");
          System.out.println(
"\t[-f record-mailbox] [-M transport-host] [-a attach-file] [-d] [address]");
          System.exit(1);
     } else {
          break;
     try {
     if (optind < argv.length) {
          // XXX - concatenate all remaining arguments
          to = argv[optind];
          System.out.println("To: " + to);
     } else {
          System.out.print("To: ");
          System.out.flush();
          to = in.readLine();
     if (subject == null) {
          System.out.print("Subject: ");
          System.out.flush();
          subject = in.readLine();
     } else {
          System.out.println("Subject: " + subject);
     Properties props = System.getProperties();
     // XXX - could use Session.getTransport() and Transport.connect()
     // XXX - assume we're using SMTP
     if (mailhost != null)
          props.put("mail.smtp.host", mailhost);
     // Get a Session object
     Session session = Session.getInstance(props, null);
     if (debug)
          session.setDebug(true);
     // construct the message
     Message msg = new MimeMessage(session);
     if (from != null)
          msg.setFrom(new InternetAddress(from));
     else
          msg.setFrom();
     msg.setRecipients(Message.RecipientType.TO,
                         InternetAddress.parse(to, false));
     if (cc != null)
          msg.setRecipients(Message.RecipientType.CC,
                         InternetAddress.parse(cc, false));
     if (bcc != null)
          msg.setRecipients(Message.RecipientType.BCC,
                         InternetAddress.parse(bcc, false));
     msg.setSubject(subject);
     String text = collect(in);
     if (file != null) {
          // Attach the specified file.
          // We need a multipart message to hold the attachment.
          MimeBodyPart mbp1 = new MimeBodyPart();
          mbp1.setText(text);
          MimeBodyPart mbp2 = new MimeBodyPart();
          mbp2.attachFile(file);
          MimeMultipart mp = new MimeMultipart();
          mp.addBodyPart(mbp1);
          mp.addBodyPart(mbp2);
          msg.setContent(mp);
     } else {
          // If the desired charset is known, you can use
          // setText(text, charset)
          msg.setText(text);
     msg.setHeader("X-Mailer", mailer);
     msg.setSentDate(new Date());
     // send the thing off
     Transport.send(msg);
     System.out.println("\nMail was sent successfully.");
     // Keep a copy, if requested.
     if (record != null) {
          // Get a Store object
          Store store = null;
          if (url != null) {
          URLName urln = new URLName(url);
          store = session.getStore(urln);
          store.connect();
          } else {
          if (protocol != null)          
               store = session.getStore(protocol);
          else
               store = session.getStore();
          // Connect
          if (host != null || user != null || password != null)
               store.connect(host, user, password);
          else
               store.connect();
          // Get record Folder. Create if it does not exist.
          Folder folder = store.getFolder(record);
          if (folder == null) {
          System.err.println("Can't get record folder.");
          System.exit(1);
          if (!folder.exists())
          folder.create(Folder.HOLDS_MESSAGES);
          Message[] msgs = new Message[1];
          msgs[0] = msg;
          folder.appendMessages(msgs);
          System.out.println("Mail was recorded successfully.");
     } catch (Exception e) {
     e.printStackTrace();
public static String collect(BufferedReader in) throws IOException {
     String line;
     StringBuffer sb = new StringBuffer();
     while ((line = in.readLine()) != null) {
     sb.append(line);
     sb.append("\n");
     return sb.toString();
So please help me to resolve that error.

The directory that contains msgsend.class (usually the current directory)
is not in your CLASSPATH setting. Be sure that "." is included as one of the
entries in CLASSPATH.

Similar Messages

  • Getting exceptions while sending mail using javamail api

    Hi to all
    I am developing an application of sending a mail using JavaMail api. My program is below:
    quote:
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class sms
    public static void main(String args[])
    try
    String strstrsmtserver="smtp.bol.net.in";
    String strto="[email protected]";
    String strfrom="[email protected]";
    String strsubject="Hello";
    String bodytext="This is my first java mail program";
    sms s=new sms();
    s.send(strstrsmtserver,strto,strfrom,strsubject,bodytext);
    catch(Exception e)
    System.out.println("usage:java sms"+"strstrsmtpserver tosddress fromaddress subjecttext bodyText");
    System.exit(0);
    public void send(String strsmtpserver,String strto,String strfrom ,String strsubject,String bodytext)
    try
    java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    Properties p=new Properties(System.getProperties());
    if(strsmtpserver!=null)
    p.put("mail.transport.protocol","smtp");
    p.put("mail.smtp.host","[email protected]");
    p.put("mail.smtp.port","25");
    Session session=Session.getDefaultInstance(p);
    Message msg=new MimeMessage(session);
    Transport trans = session.getTransport("smtp");
    trans.connect("smtp.bol.net.in","[email protected]","1234563757");
    msg.setFrom(new InternetAddress(strfrom));
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(strto,false));
    msg.setSubject(strsubject);
    msg.setText(bodytext);
    msg.setHeader("X-Mailer","mtnlmail");
    msg.setSentDate(new Date());
    Transport.send(msg);
    System.out.println("Message sent OK.");
    catch(Exception ex)
    System.out.println("here is error");
    ex.printStackTrace();
    It compiles fine but showing exceptions at run time.Please help me to remove these exceptions.I am new to this JavaMail and it is my first program of javamail.Please also tell me how to use smtp server.I am using MTNL 's internet connection having smtp.bol.net.in server.
    exceptions are:
    Here is exception
    quote:
    Javax.mail.MessagingException:Could not connect to SMTP host : smtp.bol.net.in, port :25;
    Nested exception is :
    Java.net.ConnectException:Connection refused: connect
    At com.sun.mail.smtp.SMTPTransport.openServer<SMTPTransport.java:1227>
    At com.sun.mail.smtp.SMTPTransport.protocolConnect<SMTPTransport.java:322>
    At javax.mail.Service .connect(Service.java:236>
    At javax.mail.Service.connect<Service.java:137>
    At sms.send<sms.java:77>
    At sms.main<sms.java:24>

    Did you find the JavaMail FAQ?
    You should talk to your ISP to get the details for connecting to your server.
    In this case I suspect your server wants you to make the connection on the
    secure port. The FAQ has examples of how to do this for GMail and Yahoo
    mail, which work similarly. By changing the host name, these same examples
    will likely work for you.

  • Error while sending mail through SMTP

    Hi,
      We are getting the following error while trying to send mail through SMTP.
    '554 ERROR_MESSAGE_STATE: SMTP_NO_HANDLER( host:1-,subrc:0001)'
    Please advice,
    Regards,
    Sam

    Hi All,
      Configured SMTP as per the note 455140,i can able to send mails from SAP to the out side world,
    mails in SAP.When i tried the test to check whether the SAP system is correctly set up to receive e-mails as per the note 607108, iam getting a connection closed message as below.                                                                           
    afgdev:pgdadm> telnet afgdev 2500                                          
    Trying...                                                                  
    Connected to afgdev.                                                       
    Escape character is '^]'.                                                  
    220 afgdev.abc.ae SAP 6.40(52) ESMTP service ready                   
    helo afgdev                                                                
    250 afgdev.abc.ae                                                    
    mail from:<[email protected]>                                      
    250 Ok                                                                     
    rcpt to:<[email protected]>                                 
    250 Ok                                                                     
    data                                                                       
    354 Enter mail, end with "."                                               
    Hello,This is a test.                                                      
    Connection closed.                                                         
    afgdev:pgdadm> 
    rgds
    Sam

  • Getting erroe when Sending mail through Javamail

    I am a new Java Programmer
    I am getting the followoing error message
    javax.mail.sendFailedException: sending failed;
    javax.mail.MessagingException:
    Could not connect SMTP host: aol.com,
    port: 25;
    nested exception is:
    java.net.SocketException: connect (code=10060)
    at javax.mail.Transport.send0(transport.jave:219)
    at javax.mail.Transport.send(transport.jave:81)
    at msgsend<init>(msgsend.java, compiled code;)
    at msgsend.main(msgsend.java:52)
    Please help me
    thank you in advance

    I would try to telnet to the SMTP host first from your OS, to check that you have the correct host and port.
    The AOL SMTP server may be blocked by a firewall, if you are not on a dial-up connection to AOL.
    try:
    telnet aol.com 25
    You should get ' connecting to aol.com...'
    1-----------------------------------------------------
    and if the SMTP server is accepting connections you will get.. somthing like..
    Connecting to aol.com
    220 aol.com ESMTP Server (Microsoft Exchange Internet Mail Service 5.5.2653.13) ready
    type 'HELO' and hit return, it will not apear on the screen you shoud get 'OK'
    2-----------------------------------------------------
    if NOT you will get something like
    Connecting To aol.com...Could not open a connection to host on port 25 : Connect failed
    Hope this helps, Best Regards Gareth

  • Error while sending mail from SAP

    Hello All,
    Recently we are facing an error while sending mail from SAP. When we try to compose a message ,it is moving to a dump error RAISE_EXCEPTION.
    The details from ST22,
    Short text
        Exception condition "FOLDER_NOT_EXIST" raised.
    Error analysis
        A RAISE statement in the program "SA
        condition "FOLDER_NOT_EXIST".
        Since the exception was not intercep
        program, processing was terminated.
    Kindly suggest..
    Thank You,
    Regards,
    Hasan

    Hello Priyanka,
    Actually, I performed the following two steps in order to solve the issue:
    - In transaction SICF, the node for SAPConnect must be active. In our system, this node was in inactive state. Hence I activated it.
    - Then In transaction SCOT-> Settings menu--> default domain should be 'xyz.com' if the email addresses in your company are maintained with a suffix  xyz.com.
    But for me the problem didnt get solved here..
    The problem that i am facing now is that if in my user profile, I have the email address maintained, then i get an error saying 'Sender address rejected'. However, if i goto transaction SU01 and clear the email id, the mail is successfully sent to outer world.
    You can try the above mentioned two steps using SICF and SCOT. If the problem does not get solved then try clearing the mail id in ur user profile.
    Hope this helps. If you find an answer to the problem of the mail id getting cleared, then please let me know..
    Regards,
    Himanshu

  • Uncaught Exception occured while sending mail through abap code.

    Hi,
    Uncaught Exception occured while sending mail through abap code.Run time Errors "UNCAUGHT_EXCEPTION" occured after excuting the call method  CALL METHOD SEND_REQUEST->SEND( ).kindly help in resolving the issue.

    HI,
    Runtime Error:  UNCAUGHT_EXCEPTION details.
    Runtime Errors         UNCAUGHT_EXCEPTION
    Exception              CX_ADDRESS_BCS
    Short text
         An exception occurred that was not caught.
    What happened?
         The exception 'CX_ADDRESS_BCS' was raised, but it was not caught anywhere along
         the call hierarchy.
         Since exceptions represent error situations and this error was not
         adequately responded to, the running ABAP program 'SAPLZSEND_MAIL' has to be
         terminated.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_ADDRESS_BCS', was not caught in
        procedure "SEND_MAIL" "(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:
        An exception occurred
    How to correct the error
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "UNCAUGHT_EXCEPTION" "CX_ADDRESS_BCS"
        "SAPLZSEND_MAIL" or "LZSEND_MAILU01"
        "ZSEND_EMAIL"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
        3. If the problem occurs in a problem of your own or a modified SAP
        program: The source code of the program
           In the editor, choose "Utilities->More
        Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "SEND_MAIL" "(FORM)", or its possible occurrence must be declared in the
    RAISING clause of the procedure.
    Please help me to resolve this issue.

  • Urgent:-REP-50152: Error while sending mail

    hi
    i am using reports10g. i have called a report from a form and destype=mail.
    i have already mention the smtp server name in conf. file but still receiving this error
    REP-50152: Error while sending mail - Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
    thanks

    Your smtp server forbids relaying, which is very common. Often a smtp server is configured to send only mails within the same domain without authentication. Otherwise, you need a username and password for the smtp server. I'm not sure if you can configure Reports to send mail through an authenticated server.

  • Terminated with error: REP-50152:Error while sending mail

    Hi
    Gets this error while sending report mails to external email id's
    Terminated with error: REP-50152: Error while sending mail - Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
    Any setting to be done in report config file?
    thanks
    MG

    It should be like this
    <pluginParam name="mailServer">%MAILSERVER_NAME%</pluginParam>
    Specify the name of your mail server in the place of %MAILSERVER_NAME% above
    Also make sure that this is not commented out.
    Thanks,

  • Error While sending mail

    Working with 9.1.0.1
    I have created a task which will send Mail to user when password is changed.
    so in Notification Tab i Have clicked user check box and attached a appropiate Email Defination,
    when task is triggered password is changed in OID but while sending mail i am getting below error.
    I checked in metalink its shows when Email Server IT Res Name should be same as that configured in System property ,i checked both are same.
    1 Dec 2011 18:06:54,735,[XELLERATE.REQUESTS],Class/Method: tcEmailNotificationUtil/sendEmail encounter some problems: {1}
    lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:394)
    at com.thortech.xl.dataobj.util.tcEmailNotificationUtil.sendEmail(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.checkForEmailNotification(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.updateSchItem(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.finalizeProcessAdapter(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.finalizeAdapter(Unknown Source)
    at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpOIDMODIFYUSER.implementation(adpOIDMODIFYUSER.java:81)
    at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.client.events.tcTriggerUserProcesses.insertMileStones(Unknown Source)
    at com.thortech.xl.client.events.tcTriggerUserProcesses.trigger(Unknown Source)
    at com.thortech.xl.client.events.tcUSRTriggerUserProcesses.implementation(Unknown Source)
    at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcUSR.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUserData(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUser(Unknown Source)
    at com.thortech.xl.ejb.beans.tcUserOperationsSession.updateUser(Unknown Source)
    at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.updateUser(tcUserOperations_voj9p2_EOImpl.java:1763)
    at Thor.API.Operations.tcUserOperationsClient.updateUser(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor485.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

    Create a task "Send Email" which will be called on SUCCESS of Change Password Task
    Attach tcComplete in INTEGRATION tab And send Email from "Send Email" using Notification Tab
    It seems that issue is with Change Password Task
    Or Use APIs
    Re: Send Mail via java code but using Mail Definitions

  • Error while sending mail from SAP system

    Hi all,
    I configured SAP connect  in ecc6.0 ehp7 while sending mail using tx sost i am error
    Message cannot be transferred to node SMTP due to connection error (final) , below is the icm log.
    ERROR => IcmPlAllocBuf: MpiGetOutbuf failed (rc = 14(MPI_ESTALE: outdated MPI handle)) [icxxplugin.c 1222]
    ERROR => SMTP SmtpClientClose: alloc failed, rc = -3 [smtp_plg.c   3738]
    ERROR => IcmBufFree(id=0/32): MpiFreeBuf failed (rc=14), MPI_ESTALE: outdated MPI handle [icxxplugin.c 165
    ERROR => IcmConnClose: PlugInStopConn failed (rc=701) [icxxconn.c   3433]
    can any one please help on this
    Thanks,
    Narendar.

    Hello Priyanka,
    Actually, I performed the following two steps in order to solve the issue:
    - In transaction SICF, the node for SAPConnect must be active. In our system, this node was in inactive state. Hence I activated it.
    - Then In transaction SCOT-> Settings menu--> default domain should be 'xyz.com' if the email addresses in your company are maintained with a suffix  xyz.com.
    But for me the problem didnt get solved here..
    The problem that i am facing now is that if in my user profile, I have the email address maintained, then i get an error saying 'Sender address rejected'. However, if i goto transaction SU01 and clear the email id, the mail is successfully sent to outer world.
    You can try the above mentioned two steps using SICF and SCOT. If the problem does not get solved then try clearing the mail id in ur user profile.
    Hope this helps. If you find an answer to the problem of the mail id getting cleared, then please let me know..
    Regards,
    Himanshu

  • Problem while sending mail through posprocess event hadler  inOIM 11g r2

    Hi,
    i am sending mail through posprocess event hadler inOIM 11g r2 when user is created.But i am getting following error in resolver class.
    java.lang.NullPointerException
    at oracle.iam.identity.usermgmt.impl.UserDetailsProviderImpl.getUserDetails(UserDetailsProviderImpl.java:102)
    at oracle.iam.notification.impl.util.NotificationUtil.getUserPreferences(NotificationUtil.java:83)
    at oracle.iam.notification.impl.NotificationServiceImpl.notify(NotificationServiceImpl.java:523)
    at oracle.iam.notification.impl.NotificationServiceImpl.notify(NotificationServiceImpl.java:271)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.iam.platform.utils.DMSMethodInterceptor.invoke(DMSMethodInterceptor.java:25)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at oracle.iam.notification.impl.util.NotificationUtil.getUserPreferences(NotificationUtil.java:83)
    at oracle.iam.notification.impl.NotificationServiceImpl.notify(NotificationServiceImpl.java:523)
    at oracle.iam.notification.impl.NotificationServiceImpl.notify(NotificationServiceImpl.java:271)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.iam.platform.utils.DMSMethodInterceptor.invoke(DMSMethodInterceptor.java:25)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    Edited by: 853559 on Sep 25, 2012 6:27 AM

    If you are using Custom Notification XML, make sure to have StaticData element in it. StaticData defines the entitites that can be used in the notification template, and these entities attributes are used to define substitution tokens in the template.

  • Error while sending mail tru campaign

    I have serious problem while sending mail thru a campaign in WebLogic 8.1.4 Portal. While running the application and visiting a portlet which contains the PlaceHolder which in turn is supposed to execute the campaign, the console
    shows an unending exception stack trace. The Exception is : "Exception:SQL Exception creating bucket entry ... transaction rolledback".
    Please help
    Thanks in advance
    Muhammed Shakir

    Turn on session debugging and examine the protocol trace. If you still can't figure it out,
    post the debug output here.
    Most likely you have a firewall or antivirus product that's closing the connection unexpectedly.
    Possibly your server is disconnecting for some reason. The protocol trace might provide clues.

  • Error: in sending mail through dynamics actions

    Hi Friends,
    I have a problem in sending mail through dynamics actions . In this we pass a subroutine in dynamics actions which send an mail when promotion action occured.
    Problem is that sometimes it will send an mail or sometimes not. I have no idea to solve this problem.
    Can anyone suggest me .
    Thanks ,
    Anish
    Moderator message : Duplicate post locked. Continue with thread [send mail through dynamic actions|send mail through dynamic actions].
    Edited by: Vinod Kumar on Sep 5, 2011 10:19 AM

    this is where i created the keystore.jks file
    I navigated to the location C:\Program Files\Java\jdk1.6.0_13\bin in command prompt and typed the following command to create the keystore
    keytool -import -trustcacerts -alias root -file mail_test_com.crt -keystore keystore.jksI was asked to set the password for keystore and then i was asked the question "Trust this certificate? [no]:" for which i gave yes.
    If this is not the right place to create the keystore.jks can you please tell me what is correct location to create the keystore file.

  • Error Occurred while sending mail through gmail account

    Hello,
    I am writing 1 demo appln which will send a mail from my gmail account. It will show error like "javax.mail.MessagingException: 530 5.5.1 Authentication Required f77sm3109311pyh"
    Here is Code : -
    package demo;
    import java.util.Properties;
    import javax.mail.Address;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class Demo {
         * @param args
         public static void main(String[] args) {
              try
              Properties properties=System.getProperties();
              properties.put("mail.smtp.host","smtp.gmail.com");
              properties.put("mail.smtp.auth","true");
              properties.put("mail.from","[email protected]");
              properties.put("mail.smtp.port","465");
              properties.put("mail.smtp.starttls.enable","true");          
              properties.put("mail.smtp.socketFactory.port", "465");
              properties.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
              properties.put("mail.smtp.socketFactory.fallback", "false");
              Authenticator auth = new PopupAuthenticator();
              Session session = Session.getDefaultInstance(properties,auth);                    
              session.setDebug(true);     
    //          Define message
              MimeMessage message = new MimeMessage(session);
              message.addRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
              message.setSubject("Hello JavaMail");
              message.setText("Welcome to JavaMail");          
              message.saveChanges();
              Address address[] = message.getAllRecipients();
              Address a1 = address[0];
              System.out.println("Recipient : "+a1.toString());          
              Transport.send(message, message.getAllRecipients());
              catch(Exception e){e.printStackTrace();}
    and code for PopupAuthenticator :-
    package demo;
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    import javax.swing.*;
    import java.util.StringTokenizer;
    public class PopupAuthenticator extends Authenticator
         public PopupAuthenticator()
              System.out.println("In Auth");
    public PasswordAuthentication getPasswordAuthentication()
    String username, password;
    String result = JOptionPane.showInputDialog("Enter 'username,password'");
    StringTokenizer st = new StringTokenizer(result, ",");
    username = st.nextToken();
    password = st.nextToken();
    return new PasswordAuthentication(username, password);
    But when i run this code i never get popup window asking for username/password and it throws follwing exception
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
         javax.mail.MessagingException: 530 5.5.1 Authentication Required f77sm3109311pyh
         at javax.mail.Transport.send0(Transport.java:204)
         at javax.mail.Transport.send(Transport.java:88)
         at demo.Demo.main(Demo.java:66)
    may i know wats wrong wid my code? I am confussed about when getPasswordAuthentication () method will call?
    please reply me at [email protected]
    thnx in advance ..
    -Sushrut

    Hi bshannon ,
    Thnx ..
    I have removed the popup code from my PopUpAuthanticer.java file
    But i got similar error ....
    Here is Debug message : -
    In Auth
    Recipient : [email protected]
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG: SMTPTransport trying to connect to host "smtp.gmail.com", port 465
    DEBUG SMTP RCVD: 220 mx.google.com ESMTP y78sm4251719pyg
    DEBUG SMTP SENT: helo sushrutr
    DEBUG SMTP RCVD: 250 mx.google.com at your service
    DEBUG: SMTPTransport connected to host "smtp.gmail.com", port: 465
    DEBUG SMTP SENT: mail from: <[email protected]>
    DEBUG SMTP RCVD: 530 5.5.1 Authentication Required y78sm4251719pyg
    DEBUG SMTP SENT: quit
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
         javax.mail.MessagingException: 530 5.5.1 Authentication Required y78sm4251719pyg
         at javax.mail.Transport.send0(Transport.java:204)
         at javax.mail.Transport.send(Transport.java:88)
         at demo.Demo.main(Demo.java:53)
    can u please tell me when getPasswordAuthentication() will call ? and who is going to call this ...
    Thnx in advance ...

  • Getting Error while creating Project through API:PA_PROJECT_PUB.CREATE_PROJ

    Hi Gurus,
    I'm getting an error while creating a New project.
    My code looks like this:
    APPS.PA_PROJECT_PUB.CREATE_PROJECT
    (p_api_version_number => l_object_version_number --IN Parameter
    ,p_commit => l_commit --IN Parameter
    ,p_init_msg_list => l_init_msg_list --IN Parameter
    ,p_msg_count => l_msg_count --OUT Parameter
    ,p_msg_data => l_msg_data --OUT Parameter
    ,p_return_status => l_return_status --OUT Parameter
    ,p_workflow_started => l_workflow_started --OUT Parameter
    ,p_pm_product_code => g_pm_product_code --IN Parameter
    ,p_op_validate_flag => l_op_validate_flag --IN Parameter
    ,p_project_in => g_project_in --IN Parameter
    ,p_project_out => g_project_out --OUT Parameter
    ,p_tasks_in => g_task_in --IN Parameter
    ,p_tasks_out => g_task_out --OUT Parameter
    The out put params are: p_msg_count => 1
    p_return_status => E
    p_workflow_started => N
    g_project_out.pa_project_id => 170000000000000000000
    g_project_out.pa_project_number => ^
    g_task_out_rec.pa_task_id => 170000000000000000000
    End process record p_proj_insert => 1
    Resetting the task count variable
    when I checked the API code I found this:
    PA_INTERFACE_UTILS_PUB.G_PROJECt_ID := null; --bug 2471668 ( not in the project context )
    PA_PM_FUNCTION_SECURITY_PUB.check_function_security
    (p_api_version_number => p_api_version_number,
    p_responsibility_id => l_resp_id,
    p_function_name => 'PA_PM_CREATE_PROJECT',
    p_msg_count => l_msg_count,
    p_msg_data => l_msg_data,
    p_return_status => l_return_status,
    p_function_allowed => l_function_allowed
    . I think I am getting the error because of this.
    Now, question.
    Do I need to run the Create Project from a specific Responsibility?
    because when I ran the underlined query, I fpound the final status as 'N'.
    I'm a HR guy and PA is a new world for me. Any help will be appreciated.
    Thanks!!
    Viky

    You need to find any responsibility and userid that lets you create a project using the screen.
    And then in your code, you need to set your context to that resp/userid.
    Hope this helps
    Sandeep Gandhi

Maybe you are looking for

  • Read CSV file into a 1-D array

    Hi I would like to read a csv file into a cluster of 4 elements which would then be read into a 1-D array. My cluster contains a typedef, a double, a boolean, and another typedef. Basically it could be seen as: Bob Runs, 4, T, Bob Mary sits, 5, F, Ma

  • How to display text in addition to average group result

    Hi All, This is probably really simple but i need your help. What i have done: I have 4 questions which each one has 5 radio box options. For each group of questions, i have put a value of 1-5 for the radio boxes. What i am trying to do: What i want

  • Dropped connection issues...

    I have a TC wireless network set up with an ADSL modem (not homehub) onto BT broadband, and my MacBook keeps losing the ability to send/receive data on the network, or back up in time machine. Other devices (i-phones) are able to connect while this i

  • VENDOR_ADD_DATA for custom LFM2 fields

    I am looking for a way to use the Vendor Maintenance Program SAPMF02K (XK01/XK02/XK03) to update custom LFM2 fields. Since there are multiple LFM2 plant(WERKS) Records for a Vendor/Purchasing Org, How can the screen be configured to narrow in on the

  • SAP NetWeaver 7.0 ABAP Trial Version SP12 - Request Release Error

    When i choose "release" in context menu to release the request ID: NSPK900001, the IDE show the following error: "Cannot access file [my computer name]\sapmnt\trans\tmp\NSPE900001.NSP" How do i fix it? Thanks!