Examples of DataSourceException


Examples of com.google.visualization.datasource.base.DataSourceException

  static void appendFromClause(Query query,
      StrBuilder queryStringBuilder, String tableName)
      throws DataSourceException {
    if (StringUtils.isEmpty(tableName)) {
      log.error("No table name provided.");
      throw new DataSourceException(ReasonType.OTHER, "No table name provided.");
    }
    queryStringBuilder.append("FROM ");
    queryStringBuilder.append(tableName);
    queryStringBuilder.append(" ");
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.extraction.engine.datasource.DataSourceException

          }
        }
      }
    } catch (SQLException e) {
      e.printStackTrace();
      throw new DataSourceException(e);
    } finally {
      if (rs != null) {
        try {
          rs.close();
        } catch (SQLException sqlEx) {
View Full Code Here

Examples of org.apache.hadoop.chukwa.extraction.engine.datasource.DataSourceException

      } while (calendar.getTimeInMillis() < t1);

    } catch (Exception e) {
      e.printStackTrace();
      throw new DataSourceException(e);
    }

    TreeMap<Long, List<Record>> recordsInResult = result.getRecords();
    for (Record record : records) {
      long timestamp = record.getTime();
View Full Code Here

Examples of org.apache.hadoop.chukwa.extraction.engine.datasource.DataSourceException

         }
      }
      catch (SQLException e)
      {
        e.printStackTrace();
        throw new DataSourceException(e);
      }
      finally
      {
          if (rs != null) {
             try {
View Full Code Here

Examples of org.apache.ibatis.datasource.DataSourceException

        } else {
          driverType = Class.forName(driver);
        }
        DriverManager.registerDriver(new DriverProxy((Driver) driverType.newInstance()));
      } catch (Exception e) {
        throw new DataSourceException("Error setting driver on UnpooledDataSource. Cause: " + e, e);
      }
    }
  }
View Full Code Here

Examples of org.apache.ibatis.datasource.DataSourceException

      } else if (metaDataSource.hasSetter(propertyName)) {
        String value = (String) properties.get(propertyName);
        Object convertedValue = convertValue(metaDataSource, propertyName, value);
        metaDataSource.setValue(propertyName, convertedValue);
      } else {
        throw new DataSourceException("Unkown DataSource property: " + propertyName);
      }
    }
    if (driverProperties.size() > 0) {
      metaDataSource.setValue("driverProperties", driverProperties);
    }
View Full Code Here

Examples of org.apache.ibatis.datasource.DataSourceException

      } else if (properties.containsKey(DATA_SOURCE)) {
        dataSource = (DataSource) initCtx.lookup(properties.getProperty(DATA_SOURCE));
      }

    } catch (NamingException e) {
      throw new DataSourceException("There was an error configuring JndiDataSourceTransactionPool. Cause: " + e, e);
    }
  }
View Full Code Here

Examples of org.apache.ibatis.datasource.DataSourceException

    }
  }

  private Connection getValidConnection() {
    if (!valid) {
      throw new DataSourceException("Error accessing PooledConnection. Connection is invalid.");
    }
    return realConnection;
  }
View Full Code Here

Examples of org.apache.ibatis.datasource.DataSourceException

        } else {
          driverType = Resources.classForName(driver);
        }
        DriverManager.registerDriver(new DriverProxy((Driver) driverType.newInstance()));
      } catch (Exception e) {
        throw new DataSourceException("Error setting driver on UnpooledDataSource. Cause: " + e, e);
      }
    }
  }
View Full Code Here

Examples of org.apache.ibatis.datasource.DataSourceException

    }
  }

  private Connection getValidConnection() {
    if (!valid) {
      throw new DataSourceException("Error accessing PooledConnection. Connection is invalid.");
    }
    return realConnection;
  }
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.