Examples of MetaModelException


Examples of org.apache.metamodel.MetaModelException

            SAXParserFactory saxFactory = SAXParserFactory.newInstance();
            SAXParser saxParser = saxFactory.newSAXParser();
            XMLReader sheetParser = saxParser.getXMLReader();
            return sheetParser;
        } catch (Exception e) {
            throw new MetaModelException(e);
        }
    }
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

        final int countMatches = jdbcCompiledQuery.getParameters().size();

        final int valueArrayLength = values.length;

        if (countMatches != valueArrayLength) {
            throw new MetaModelException("Number of parameters in query and number of values does not match.");
        }

        final JdbcCompiledQueryLease lease = jdbcCompiledQuery.borrowLease();
        final DataSet dataSet;
        try {
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

            return new HBaseAdmin(config);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException) e;
            }
            throw new MetaModelException(e);
        }
    }
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

                schema.addTable(new HBaseTable(tableDef, schema, _admin, _configuration.getDefaultRowKeyType()));
            }

            return schema;
        } catch (Exception e) {
            throw new MetaModelException(e);
        }
    }
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

            } finally {
                scanner.close();
            }
            return result;
        } catch (IOException e) {
            throw new MetaModelException(e);
        }
    }
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

        try {
            final ResultScanner scanner = hTable.getScanner(scan);
            return new HBaseDataSet(columns, scanner, hTable);
        } catch (Exception e) {
            FileHelper.safeClose(hTable);
            throw new MetaModelException(e);
        }
    }
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

                if (line == null) {
                    return new EmptyDataSet(columns);
                }
            }
        } catch (IOException e) {
            throw new MetaModelException("IOException occurred while reading from CSV resource: " + _resource, e);
        }

        final boolean failOnInconsistentRowLength = _configuration.isFailOnInconsistentRowLength();

        final Integer maxRowsOrNull = (maxRows > 0 ? maxRows : null);
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

    @Override
    public boolean next() {
        try {
            _nextResult = _scanner.next();
        } catch (IOException e) {
            throw new MetaModelException(e);
        }
        return _nextResult != null;
    }
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

        try {
            final CSVParser parser = _dataSet.getCsvParser();
            return parser.parseLine(_line);
        } catch (IOException e) {
            if (_failOnInconsistentRowLength) {
                throw new MetaModelException("Failed to parse CSV line no. " + _rowNumber + ": " + _line, e);
            } else {
                logger.warn("Encountered unparseable line no. {}, returning line as a single value with trailing nulls: {}", _rowNumber, _line);
                String[] csvValues = new String[_columnsInTable];
                csvValues[0] = _line;
                return csvValues;
View Full Code Here

Examples of org.apache.metamodel.MetaModelException

    if (nextException != null) {
      logger.error("Next SQL exception: " + nextException.getMessage(),
          nextException);
    }

    return new MetaModelException(message, 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.