Package org.apache.derby.iapi.error

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


    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


        // An empty properties object is meaningless, but allowed
        if (properties == null || properties.isEmpty()) {
            return;
        }

        StandardException se =
            StandardException.newException
            (SQLState.PROPERTY_UNSUPPORTED_CHANGE,
             fp.getFirstKey(),
             fp.getFirstValue());
        throw new SQLClientInfoException(se.getMessage(),
            se.getSQLState(),
            se.getErrorCode(),
            fp.getProperties());
    }
View Full Code Here

    }
  }

  private void checkObserverException() throws StandardException {
    if (observerException != null) {
      StandardException se = observerException;
      observerException = null;
      throw se;
    }
  }
View Full Code Here

        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

                cm.cleanupOnError(StandardException.closeException(), false);
            }
           
    } 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) {
                //Assume database is not active. DERBY-4856 thread dump
                cm.cleanupOnError(se, false);
      }

      if (ts != null) {
        ts.shutdown();
        synchronized (this) {
          services.remove(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

  Database getDatabase() {
    return  database;
  }

  StandardException shutdownDatabaseException() {
    StandardException se = StandardException.newException(SQLState.SHUTDOWN_DATABASE, getDBName());
    se.setReport(StandardException.REPORT_NEVER);
    return se;
  }
View Full Code Here

      }

      boolean checkForShutdown = false;
      if (thrownException instanceof StandardException)
      {
        StandardException se = (StandardException) thrownException;
        int severity = se.getSeverity();
        if (severity <= ExceptionSeverity.STATEMENT_SEVERITY)
        {
          /*
          ** If autocommit is on, then do a rollback
          ** to release locks if requested.  We did a stmt
          ** rollback in the cleanupOnError above, but we still
          ** may hold locks from the stmt.
          */
          if (autoCommit && rollbackOnAutoCommit)
          {
            se.setSeverity(ExceptionSeverity.TRANSACTION_SEVERITY);
          }
        } else if (SQLState.CONN_INTERRUPT.equals(se.getMessageId())) {
          // an interrupt closed the connection.
          checkForShutdown = true;
        }
      }
      // if cm is null, we don't have a connection context left,
View Full Code Here

            return (SQLException) thrownException;
    }

        if (thrownException instanceof StandardException) {

      StandardException se = (StandardException) thrownException;

            if (se.getCause() == null) {
                // se is a single, unchained exception. Just convert it to an
                // SQLException.
                return Util.generateCsSQLException(se);
            }

            // se contains a non-empty exception chain. We want to put all of
            // the exceptions (including Java exceptions) in the next-exception
            // chain. Therefore, call wrapInSQLException() recursively to
            // convert the cause chain into a chain of SQLExceptions.
            return Util.seeNextException(se.getMessageId(),
                        se.getArguments(), wrapInSQLException(se.getCause()));
        }

        // thrownException is a Java exception
        return Util.javaException(thrownException);
  }
View Full Code Here

      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

  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

TOP

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

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.