Package org.apache.derby.iapi.error

Examples of org.apache.derby.iapi.error.StandardException


        boolean validSyntax = true;
        DateTimeParser parser = new DateTimeParser( dateStr);
        int year = 0;
        int month = 0;
        int day = 0;
        StandardException thrownSE = null;

        try
        {
            switch( parser.nextSeparator())
            {
View Full Code Here


  public void cleanupOnError(Throwable t) {

    if (t instanceof StandardException) {

      StandardException se = (StandardException) t;
           
            if (se.getSeverity() >= ExceptionSeverity.SESSION_SEVERITY) {
                popMe();
                return;
            }

      if (se.getSeverity() == ExceptionSeverity.TRANSACTION_SEVERITY) {

        synchronized (this) {
          // disable use of the connection until it is cleaned up.
          conn.setApplicationConnection(null);
          notifyAll();
          associationState = TRO_FAIL;
          if (SQLState.DEADLOCK.equals(se.getMessageId()))
            rollbackOnlyCode = XAException.XA_RBDEADLOCK;
          else if (SQLState.LOCK_TIMEOUT.equals(se.getMessageId()))
            rollbackOnlyCode = XAException.XA_RBTIMEOUT;         
          else
            rollbackOnlyCode = XAException.XA_RBOTHER;
        }
      }
View Full Code Here

     * on a session or greater severity error.
     */
  public final void cleanupOnError(Throwable error) {
        if (error instanceof StandardException) {

            StandardException se = (StandardException) error;
           
            if (se.getSeverity() >= ExceptionSeverity.SESSION_SEVERITY)
                popMe();
        }
    }
View Full Code Here

    String jdbcTypesName = org.apache.derby.impl.jdbc.Util.typeName(sqlType);

    TypeId typeId = TypeId.getBuiltInTypeId(jdbcTypeId);
    String thisTypeName = typeId == null ? declaredClassName : typeId.getSQLTypeName();
       
    StandardException e = StandardException.newException(SQLState.LANG_INVALID_OUT_PARAM_MAP,
          getJDBCParameterNumberStr(),
          jdbcTypesName, thisTypeName);

    return e;
  }
View Full Code Here

  public DataValueDescriptor[] insertDuplicateKey(
    DataValueDescriptor[]   in,
    DataValueDescriptor[]   dup)
    throws StandardException
  {
    StandardException se = null;
    se = StandardException.newException(
        SQLState.LANG_DUPLICATE_KEY_CONSTRAINT, indexOrConstraintName, tableName);
    throw se;
  }
View Full Code Here

    {
      releaseResource(xact);
      return null;
    }

    StandardException getPageException = null;
    try
    {
      // get and latch page - we don't know the status of the page or what
      // kind of page we are looking for, get any type of page
      page = (BasePage)(containerHdl.getAnyPage(pageId.getPageNumber()));
View Full Code Here

                // not many read I/O errors have been reported.
        if (io_retry_count > 4)
                {
          // page cannot be physically read
 
          StandardException se =
            StandardException.newException(
                   SQLState.FILE_READ_PAGE_EXCEPTION,
                   ioe, newIdentity, new Integer(pagesize));

           
View Full Code Here

        myContainer = null;
      }
    }
    else
    {
      StandardException nested =
                StandardException.newException(
                    SQLState.DATA_CONTAINER_VANISHED,
                    identity.getContainerId());
      throw dataFactory.markCorrupt(
                StandardException.newException(
View Full Code Here

         */
        DataDictionary dd = activation.getLanguageConnectionContext().getDataDictionary();
        ConglomerateDescriptor cd = dd.getConglomerateDescriptor( heapConglom );
        TableDescriptor td = dd.getTableDescriptor(cd.getTableID());

        StandardException se = StandardException.newException(SQLState.LANG_CHECK_CONSTRAINT_VIOLATED,
          td.getQualifiedName(), checkName);

        throw se;
      }
    }
View Full Code Here

                    (ExecRow)null);

      int numFailures = riChecker.doCheck();
      if (numFailures > 0)
      {
        StandardException se = StandardException.newException(SQLState.LANG_ADD_FK_CONSTRAINT_VIOLATION,
                  fk.getConstraintName(),
                  fk.getTableDescriptor().getName());
        throw se;
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.error.StandardException

Copyright © 2018 www.massapicom. 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.