Examples of InvalidDataAccessResourceUsageException


Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

   * important to ensure that the user hasn't modified the current row.
   */
  private void verifyCursorPosition(long expectedCurrentRow) throws SQLException {
    if (verifyCursorPosition) {
      if (expectedCurrentRow != this.rs.getRow()) {
        throw new InvalidDataAccessResourceUsageException("Unexpected cursor position change.");
      }
    }
  }
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

  @Override
  public void init(DataSource dataSource) throws Exception {
    super.init(dataSource);
    String version = JdbcUtils.extractDatabaseMetaData(dataSource, "getDatabaseProductVersion").toString();
    if (!isDerbyVersionSupported(version)) {
      throw new InvalidDataAccessResourceUsageException("Apache Derby version " + version + " is not supported by this class,  Only version " + MINIMAL_DERBY_VERSION + " or later is supported");
    }
  }
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

      List<BatchResult> results = execute(items);

      if (assertUpdates) {
        if (results.size() != 1) {
          throw new InvalidDataAccessResourceUsageException("Batch execution returned invalid results. " +
              "Expected 1 but number of BatchResult objects returned was " + results.size());
        }

        int[] updateCounts = results.get(0).getUpdateCounts();
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

      }
      lnr.close();
      return new ByteArrayResource(script.toString().getBytes());
    }
    catch (IOException e) {
      throw new InvalidDataAccessResourceUsageException("Unable to read script " + resource, e);
    }
  }
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

    if (ex instanceof MongoTimeoutException) {
      return new DataAccessResourceFailureException(ex.getMessage(), ex);
    }

    if (ex instanceof MongoInternalException) {
      return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex);
    }

    // All other MongoExceptions
    if (ex instanceof MongoException) {
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

  public static DataAccessException convertHibernateAccessException(HibernateException ex) {
    if (ex instanceof JDBCConnectionException) {
      return new DataAccessResourceFailureException(ex.getMessage(), ex);
    }
    if (ex instanceof SQLGrammarException) {
      return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex);
    }
    if (ex instanceof DataException) {
      return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex);
    }
    if (ex instanceof LockAcquisitionException) {
      return new CannotAcquireLockException(ex.getMessage(), ex);
    }
    if (ex instanceof ConstraintViolationException) {
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

      }
      if (ex instanceof QueryExecutionTimeoutException) {
        return new GemfireQueryException((QueryExecutionTimeoutException) ex);
      }
      if (ex instanceof RegionDestroyedException) {
        return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex);
      }
      if (ex instanceof com.gemstone.gemfire.admin.RegionNotFoundException) {
        return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex);
      }
      if (ex instanceof ResourceException) {
        return new DataAccessResourceFailureException(ex.getMessage(), ex);
      }
      if (ex instanceof RoleException) {
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

            final Node node = persistentEntity.isUnique() ? template.createUniqueNode(entity) : template.createNode(null,persistentEntity.getAllLabels());
            setPersistentState(node);
            if (log.isDebugEnabled()) log.debug("User-defined constructor called on class " + entity.getClass() + "; created Node [" + getPersistentState() + "]; Updating metamodel");
            template.postEntityCreation(node, type);
        } catch (NotInTransactionException e) {
            throw new InvalidDataAccessResourceUsageException("Not in a Neo4j transaction.", e);
        } catch (ConstraintViolationException e) {
            throw new DataIntegrityViolationException(e.getMessage(),e);
        }
    }
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

    public Result<Map<String, Object>> query(String statement, Map<String, Object> params) {
        try {
            ExecutionResult result = parseAndExecuteQuery(statement,params);
            return new QueryResultBuilder<Map<String,Object>>(result,resultConverter);
        } catch (Exception e) {
            throw new InvalidDataAccessResourceUsageException("Error executing statement " + statement, e);
        }
    }
View Full Code Here

Examples of org.springframework.dao.InvalidDataAccessResourceUsageException

            final Map<String, Object> queryParams = queryParams(params);
            if (log.isDebugEnabled()) log.debug(String.format("Executing cypher query: %s params %s",statement,queryParams));

            return executionEngine.execute(statement, queryParams);
        } catch(Exception e) {
            throw new InvalidDataAccessResourceUsageException("Error executing statement " + statement, e);
        }
    }
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.