LOG.error("trying to access mail session via JNDI; " + "mail cannot be sent", nExc);
LOG.error("Trying to access mail session via JNDI; " + MAIL_NOT_SEND, nExc);
  public void committed(final CommittedEvent pbEvent) {    Session session = null;    try {      loadProperties();      // NamingException can be thrown      Context initCtx = new InitialContext();      Context envCtx = (Context)initCtx.lookup("java:comp/env"); //$NON-NLS-1$      // NoClassDefFoundError can be thrown if configuration is not done.      session = (Session)envCtx.lookup("mail/session"); //$NON-NLS-1$      MimeMessage message = new MimeMessage(session);      { // MessagingException can be thrown        message.setContent(null, "text/plain");  //$NON-NLS-1$        if (pbEvent instanceof CreatedEvent) {          addMailContent(message, (CreatedEvent)pbEvent);        }        else if (pbEvent instanceof UpdatedEvent) {          addMailContent(message, (UpdatedEvent)pbEvent);        }        else if (pbEvent instanceof DeletedEvent) {          addMailContent(message, (DeletedEvent)pbEvent);        }        else {          LOG.error("Incorrect CommittedEvent recieved."); //$NON-NLS-1$        }        addRecepients(message, envCtx);        message.saveChanges();        Transport.send(message);      }    }    catch (NoClassDefFoundError ncdfExc) {      // Log configuration error and re-throw the exception.      LOG.error("JavaMail not configured, unable to find mail.jar and/or " //$NON-NLS-1$                 + "activation.jar. For more details please read README.html", //$NON-NLS-1$                 ncdfExc);      throw ncdfExc;    }    catch (IOException ioExc) {      LOG.error("unable to load properties for mail notification; " //$NON-NLS-1$                 + "mail cannot be sent", //$NON-NLS-1$                 ioExc);    }    catch (NamingException nExc) {      LOG.error("trying to access mail session via JNDI; " //$NON-NLS-1$                 + "mail cannot be sent", //$NON-NLS-1$                 nExc);    }    catch (MessagingException mExc) {      LOG.error("trying to create and send mail; " //$NON-NLS-1$                 + "mail cannot be sent", //$NON-NLS-1$                 mExc);    }    catch (Throwable t) {      LOG.error("throwable occured when trying to send mail; " //$NON-NLS-1$                 + "mail cannot be sent", //$NON-NLS-1$                 t);    }  }