Examples of DataAccessResourceFailureException


Examples of org.springframework.dao.DataAccessResourceFailureException

    Object result;
    try {
      result = this.defaultConstruct.newInstance((Object[]) null);
    }
    catch (IllegalAccessException e) {
      throw new DataAccessResourceFailureException("Failed to load class " + this.mappedClass.getName(), e);
    }
    catch (InvocationTargetException e) {
      throw new DataAccessResourceFailureException("Failed to load class " + this.mappedClass.getName(), e);
    }
    catch (InstantiationException e) {
      throw new DataAccessResourceFailureException("Failed to load class " + this.mappedClass.getName(), e);
    }
    ResultSetMetaData rsmd = rs.getMetaData();
    int columns = rsmd.getColumnCount();
    for (int i = 1; i <= columns; i++) {
      String column = JdbcUtils.lookupColumnName(rsmd, i).toLowerCase();
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

    this.mappedClass = mappedClass;
    try {
      this.defaultConstruct = mappedClass.getConstructor((Class[]) null);
    }
    catch (NoSuchMethodException ex) {
      throw new DataAccessResourceFailureException(new StringBuffer().
          append("Failed to access default or no-arg constructor of ").
          append(mappedClass.getName()).toString(), ex);
    }
    this.mappedFields = new HashMap();
    Class metaDataClass = mappedClass;
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

                type = Constants.DB_VT_ORACLE;
           
            databaseType = type;
            return type;
        } catch (SQLException e) {
            throw new DataAccessResourceFailureException("Cannot get Vendor Type", e);
        } finally {
            releaseConnection(connection);
        }
    }
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

        }
            }

            return dbd;
        } catch (SQLException e) {
            throw new DataAccessResourceFailureException("Error getting Database description", e);
        } catch (RuntimeException e1){
            throw new DataAccessResourceFailureException("Error getting Database description", e1);
        } finally {
            releaseConnection(connection);
        }
    }
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

        Connection connection = this.getConnection();
        try {
            set = new DBDataSet(TableName, connection.getMetaData());
            return set;
        } catch (SQLException e) {
            throw new DataAccessResourceFailureException("Error getting database Table description on table: " + TableName, e);
        }
        finally {
            releaseConnection(connection);
        }
    }
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

        try {
            String result = connection.getMetaData().getDatabaseProductName();
            databaseName = result;
            return result;
        } catch (SQLException e) {
            throw new DataAccessResourceFailureException("Error getting database product name", e);
        }
        finally  {
            releaseConnection(connection);
        }
    }
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

          tmd = tableMeta.get("PUBLIC");
          if (tmd == null) {
            tmd = tableMeta.get("DBO");
          }
          if (tmd == null) {
            throw new DataAccessResourceFailureException("Unable to locate table meta data for '" + tableName + "' in the default schema");
          }
        }
      }
      else {
        tmd = tableMeta.get(schemaName.toUpperCase());
        if (tmd == null) {
          throw new DataAccessResourceFailureException("Unable to locate table meta data for '" + tableName + "' in the '" + schemaName + "' schema");
        }
      }

      processTableColumns(databaseMetaData, tmd);
    }
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

          return provider;
        }
      });
    }
    catch (MetaDataAccessException ex) {
      throw new DataAccessResourceFailureException("Error retreiving database metadata", ex);
    }

  }
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

          }
          return provider;
        }
      });
    } catch (MetaDataAccessException e) {
      throw new DataAccessResourceFailureException("Error retreiving database metadata", e);
    }

  }
View Full Code Here

Examples of org.springframework.dao.DataAccessResourceFailureException

      }
      else if (INTEGRITY_VIOLATION_CODES.contains(classCode)) {
        return new DataIntegrityViolationException(buildMessage(task, sql, ex), ex);
      }
      else if (RESOURCE_FAILURE_CODES.contains(classCode)) {
        return new DataAccessResourceFailureException(buildMessage(task, sql, ex), ex);
      }
      else if (CONCURRENCY_CODES.contains(classCode)) {
        return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex);
      }
    }
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.