Examples of MessagingException


Examples of javax.mail.MessagingException

      oUpdt=null;
      getConnection().commit();
    } catch (SQLException sqle) {
      try { if (null!=oUpdt) oUpdt.close(); } catch (SQLException ignore) {}
      try { getConnection().rollback(); } catch (SQLException ignore) {}
      throw new MessagingException(sqle.getMessage(), sqle);
    }
    return true;
  } // renameTo
View Full Code Here

Examples of javax.mail.MessagingException

        FileSystem oFS = new FileSystem();
        try {
          oFS.mkdirs(url.getFile());
        } catch (Exception e) {
          if (DebugFile.trace) DebugFile.writeln(e.getClass().getName() + " " + e.getMessage());
          throw new MessagingException(e.getMessage(), e);
        }
      }
    }

    oConn = null;
View Full Code Here

Examples of javax.mail.MessagingException

      DebugFile.incIdent();
    }

    if (oConn!=null || isConnected()) {
      if (DebugFile.trace) DebugFile.decIdent();
      throw new MessagingException("DBStore is already connected");
    }

    String dburl = Environment.getProfileVar(host, "dburl");
    String dbusr = Environment.getProfileVar(host, "dbuser");
    String dbpwd = Environment.getProfileVar(host, "dbpassword");
    String schema = Environment.getProfileVar(host, "schema", "");

    try {
      if (DebugFile.trace)
        DebugFile.writeln("DriverManager.getConnection("+dburl+", "+dbusr+", ...)");

      if (schema.length()>0)
        oConn = new JDCConnection(DriverManager.getConnection(dburl, dbusr, dbpwd), null, schema);
      else
        oConn = new JDCConnection(DriverManager.getConnection(dburl, dbusr, dbpwd), null);

      short iAuth = ACL.autenticate(oConn, user, password, ACL.PWD_CLEAR_TEXT);

      if (iAuth<0) {
        oConn.close();
        oConn = null;
        if (DebugFile.trace) DebugFile.decIdent();
        throw new AuthenticationFailedException(ACL.getErrorMessage(iAuth) + " (" + user + ")");
      }
      else {
        oUser = new ACLUser(oConn, user);
        setConnected(true);
        oConn.setAutoCommit(false);
      }
    }
    catch (SQLException sqle) {
      if (DebugFile.trace) DebugFile.decIdent();
      throw new MessagingException(sqle.getMessage(), sqle);
    }

    if (DebugFile.trace) {
      try { if (oConn!=null) DebugFile.writeln("Connection process id. is "+oConn.pid()); } catch (Exception ignore ) { }
      DebugFile.decIdent();
View Full Code Here

Examples of javax.mail.MessagingException

        if (!oConn.isClosed()) {
          oConn.commit();
        }
      }
    } catch (Exception xcpt) {
      throw new MessagingException(xcpt.getMessage(), xcpt);
    }
  }
View Full Code Here

Examples of javax.mail.MessagingException

        oConn=null;
        oUser=null;
        setConnected(false);
      }
      catch (SQLException sqle) {
        throw new MessagingException(sqle.getMessage(), sqle);
      }
    }
    else {
      throw new StoreClosedException(this, "Store already closed");
    }
View Full Code Here

Examples of javax.mail.MessagingException

        oRetVal.getCategory().load(oConn, new Object[] {sGuid});
      }
    }
    catch (SQLException sqle) {
      if (DebugFile.trace) DebugFile.decIdent();
      throw new MessagingException(sqle.getMessage(), sqle);
    }

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End DBStore.getFolder("+sFolderName+")");
View Full Code Here

Examples of javax.mail.MessagingException

          aRetVal[f] = oFR;
        } // next
      } // fi
    }
    catch (SQLException sqle) {
      throw new MessagingException(sqle.getMessage(), sqle);
    }
    return aRetVal;
  }
View Full Code Here

Examples of javax.mail.MessagingException

          aRetVal[f] = oFR;
        } // next
      } // fi
    }
    catch (SQLException sqle) {
      throw new MessagingException(sqle.getMessage(), sqle);
    }
    return aRetVal;
  } // getUserNamespaces
View Full Code Here

Examples of javax.mail.MessagingException

      DebugFile.writeln("Begin DBStore.preFetchMessage([Folder],"+String.valueOf(iMsgNum)+")");
      DebugFile.incIdent();
    }

    if (null==oIncomingFldr)
      throw new MessagingException("Unable to open inbox folder",
                                   new NullPointerException("DBStore.preFetchMessage() Folder is null"));

    boolean bWasConnected = isConnected();
    if (!bWasConnected) connect();
    DBFolder oInboxFldr = (DBFolder) getDefaultFolder();
View Full Code Here

Examples of javax.mail.MessagingException

    BodyPart oRetVal = null;
    try {
      oRetVal = (BodyPart) aParts.get(index);
    }
    catch (ArrayIndexOutOfBoundsException aiob) {
      throw new MessagingException("Invalid message part index", aiob);
    }
    return oRetVal;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.