Examples of StandardException


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

      if (affectedCols != null)
        subsetCols = new FormatableBitSet(affectedCols.getLength());
    }

    {
      StandardException noInvalidate = null;
      // We cannot use an iterator here as the invalidations can remove
      // entries from this list.
      for (int ei = list.size() - 1; ei >= 0; ei--)
      {
        if (ei >= list.size())
View Full Code Here

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

  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

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

    {
        if (allDeclaredGlobalTempTables == null)
            return;
   
        DependencyManager dm = getDataDictionary().getDependencyManager();
        StandardException topLevelStandardException = null;

        // collect all the exceptions we might receive while dropping the
        // temporary tables and throw them as one chained exception at the end.
        for (int i = 0; i < allDeclaredGlobalTempTables.size(); i++)
        {
View Full Code Here

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

                // shutdown/drop as clean as possible.
                sleep(500L);
                Monitor.removePersistentService(dbName);
                // Generate the drop database exception here, as this is the
                // only place it will be thrown.
                StandardException se = StandardException.newException(
                    SQLState.DROP_DATABASE, dbName);
                se.setReport(StandardException.REPORT_NEVER);
                throw se;
            }

      // Raise a warning in sqlAuthorization mode if authentication is not ON
      if (usingNoneAuth && getLanguageConnection().usesSqlAuthorization())
        addWarning(SQLWarningFactory.newSQLWarning(SQLState.SQL_AUTHORIZATION_WITH_NO_AUTHENTICATION));
            InterruptStatus.restoreIntrFlagIfSeen(getLanguageConnection());
    }
        catch (OutOfMemoryError noMemory)
    {
      //System.out.println("freeA");
            InterruptStatus.restoreIntrFlagIfSeen();
      restoreContextStack();
      tr.lcc = null;
      tr.cm = null;
     
      //System.out.println("free");
      //System.out.println(Runtime.getRuntime().freeMemory());
            memoryState.setLowMemory();
     
      //noMemory.printStackTrace();
      // throw Util.generateCsSQLException(SQLState.LOGIN_FAILED, noMemory.getMessage(), noMemory);
      throw NO_MEM;
    }
    catch (Throwable t) {
            InterruptStatus.restoreIntrFlagIfSeen();

            if (t instanceof StandardException)
            {
                StandardException se = (StandardException) t;
                if (se.getSeverity() < ExceptionSeverity.SESSION_SEVERITY)
                    se.setSeverity(ExceptionSeverity.SESSION_SEVERITY);
            }
            //DERBY-4856, assume database is not up
            tr.cleanupOnError(t, false);
      throw handleException(t);
    } finally {
View Full Code Here

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

    {
        int     lineNumber = -1;

        if ( importer != null ) { lineNumber = importer.getCurrentLineNumber(); }
       
        StandardException se = StandardException.newException
            ( SQLState.UNEXPECTED_IMPORT_ERROR, new Integer( lineNumber ), inputFile, t.getMessage() );
        se.initCause(t);

        return PublicAPI.wrapStandardException(se);
    }
View Full Code Here

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

      if ((gc == preStmt.getActivationClass()) && preStmt.upToDate())
        return;
    }

    StandardException se = StandardException.newException(SQLState.LANG_STATEMENT_NEEDS_RECOMPILE);
    se.setReport(StandardException.REPORT_NEVER);
    throw se;
  }
View Full Code Here

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

         */
        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

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

        startProviderService(actualProvider, serviceName, serviceProperties);
        return true; // we understand the type
      }
    }

    StandardException savedMse = null;

    for (Enumeration e = new ProviderEnumeration( properties); e.hasMoreElements(); ) {

      PersistentService provider = (PersistentService) e.nextElement();
View Full Code Here

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

            if (cm != previousCM)
                cm.cleanupOnError(StandardException.closeException());
           
    } catch (Throwable t) {

      StandardException se;
      // ensure that the severity will shutdown the service
      if ((t instanceof StandardException) && (((StandardException) t).getSeverity() == ExceptionSeverity.DATABASE_SEVERITY))
        se = (StandardException) t;
      else
        se = Monitor.exceptionStartingModule(t);

      if (cm != previousCM) {
        cm.cleanupOnError(se);
      }

      if (ts != null) {
        ts.shutdown();
        synchronized (this) {
          services.removeElement(ts);
        }

        // Service root will only have been created if
        // ts is non-null.
        boolean deleteOnError = (properties !=null ?
                     properties.getProperty(Property.DELETE_ROOT_ON_ERROR) !=null:false);
        if (create || deleteOnError)
          provider.removeServiceRoot(serviceName);
      }


      Throwable nested = se.getCause();

      // never hide ThreadDeath
      if (nested instanceof ThreadDeath)
        throw (ThreadDeath) nested;
View Full Code Here

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

            if (exLockStatus == StorageFile.NO_FILE_LOCK_SUPPORT)
            {
                if (fileLockExisted && !throwDBlckException)
                {

                    StandardException multipleJBMSWarning =
                      StandardException.newException(
                          SQLState.DATA_MULTIPLE_JBMS_WARNING, args);

                    String warningMsg =
                      MessageService.getCompleteMessage(
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.