Examples of TranslatorException


Examples of org.teiid.translator.TranslatorException

    public Connection getConnection(DataSource ds)
        throws TranslatorException {
    try {
        return ds.getConnection();
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }
    }
View Full Code Here

Examples of org.teiid.translator.TranslatorException

    try {
      JDBCMetdataProcessor metadataProcessor = new JDBCMetdataProcessor();
      PropertiesUtils.setBeanProperties(metadataProcessor, metadataFactory.getImportProperties(), "importer"); //$NON-NLS-1$
      metadataProcessor.getConnectorMetadata(conn, metadataFactory);
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }
  }   
View Full Code Here

Examples of org.teiid.translator.TranslatorException

      CellSetAxis rows = this.cellSet.getAxes().get(Axis.ROWS.axisOrdinal());
      iterator = rows.iterator();
      cols = cellSet.getAxes().get(Axis.COLUMNS.axisOrdinal());
        colWidth = rows.getAxisMetaData().getHierarchies().size() + this.cols.getPositions().size();
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }
  }
View Full Code Here

Examples of org.teiid.translator.TranslatorException

      OlapStatement olapStatement = this.stmt;
      if (olapStatement != null) {
        olapStatement.cancel();
      }
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }   
  }
View Full Code Here

Examples of org.teiid.translator.TranslatorException

      try {
        OlapWrapper wrapper = conn.unwrap(OlapWrapper.class);
        OlapConnection olapConn = wrapper.unwrap(OlapConnection.class);
        return olapConn;
      } catch(SQLException e) {
        throw new TranslatorException(e);
      }   
  }
View Full Code Here

Examples of org.teiid.translator.TranslatorException

    public Connection getConnection(DataSource ds)
        throws TranslatorException {
    try {
        return ds.getConnection();
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }
    }
View Full Code Here

Examples of org.teiid.translator.TranslatorException

        }
        private synchronized void waitForCancel() throws TranslatorException {
            try {
                this.wait(simulatedBatchRetrievalTime);
                if (cancelled && driverThrowsExceptionOnCancel) {
                    throw new TranslatorException("Request cancelled"); //$NON-NLS-1$
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

Examples of org.teiid.translator.TranslatorException

          } catch (InterruptedException e) {
            throw new RuntimeException(e);
          }
        }
        if (throwExceptionOnExecute) {
            throw new TranslatorException("Connector Exception"); //$NON-NLS-1$
          }
        if (dataNotAvailable > -1) {
          int delay = dataNotAvailable;
          dataNotAvailable = -1;
          throw new DataNotAvailableException(delay);
View Full Code Here

Examples of org.teiid.translator.TranslatorException

          break;
        } catch (DataNotAvailableException e) {
          try {
          Thread.sleep(e.getRetryDelay());
        } catch (InterruptedException e1) {
          throw new TranslatorException(e1);
        }
        }
      }
      return results;
    }
View Full Code Here

Examples of org.teiid.translator.TranslatorException

  }

  public void visit(Select query) {
    super.visit(query);
    if (query.isDistinct()) {
      exceptions.add(new TranslatorException(SalesForcePlugin.Util.getString("SelectVisitor.distinct.not.supported")));
    }
    selectSymbols = query.getDerivedColumns();
    selectSymbolCount = selectSymbols.size();
    Iterator<DerivedColumn> symbolIter = selectSymbols.iterator();
    int index = 0;
    while (symbolIter.hasNext()) {
      DerivedColumn symbol = symbolIter.next();
      // get the name in source
      Expression expression = symbol.getExpression();
      if (expression instanceof ColumnReference) {
        Column element = ((ColumnReference) expression).getMetadataObject();
        selectSymbolIndexToElement.put(index, element);
        String qualifiedName = element.getParent().getNameInSource() + ':' + element.getNameInSource();
        selectSymbolNameToIndex .put(qualifiedName, index);
        String nameInSource = element.getNameInSource();
        if (null == nameInSource || nameInSource.length() == 0) {
          exceptions.add(new TranslatorException("name in source is null or empty for column "+ symbol.toString()));
          continue;
        }
        if (nameInSource.equalsIgnoreCase("id")) {
          idIndex = index;
        }
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.