Package org.teiid.core

Examples of org.teiid.core.TeiidProcessingException


      throw (TeiidComponentException)exception.getCause();
    }
    if (exception.getCause() instanceof TeiidProcessingException) {
      throw (TeiidProcessingException)exception.getCause();
    }
    throw new TeiidProcessingException(exception);
  }
View Full Code Here


      if (!metadata.hasMaterialization(groupID) || metadata.getMaterialization(groupID) != null) {
        throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.not_implicit_matview", name)); //$NON-NLS-1$
      }
      return groupID;
    } catch (QueryMetadataException e) {
      throw new TeiidProcessingException(e);
    }
  }
View Full Code Here

                  value = XMLSystemFunctions.convertToAtomicValue(value);
                }
                dynamicContext.setParameter(entry.getKey(), value);               
            }
          } catch (TransformerException e) {
            throw new TeiidProcessingException(e);
          }
          if (context != null) {
            Source source = XMLSystemFunctions.convertToSource(context);
            result.sources.add(source);
              if (contextRoot != null) {
                //create our own filter as this logic is not provided in the free saxon
                  ProxyReceiver filter = new PathMapFilter(contextRoot);
                  AugmentedSource sourceInput = AugmentedSource.makeAugmentedSource(source);
                  sourceInput.addFilter(filter);
                  source = sourceInput;
              }
              DocumentInfo doc;
        try {
          doc = config.buildDocument(source);
        } catch (XPathException e) {
          throw new TeiidProcessingException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.bad_context")); //$NON-NLS-1$
        }
            dynamicContext.setContextItem(doc);
          }
          try {
            result.iter = xQuery.iterator(dynamicContext);
            return result;
          } catch (TransformerException e) {
            throw new TeiidProcessingException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.bad_xquery")); //$NON-NLS-1$
          }      
        } finally {
          if (result.iter == null) {
            result.close();
          }
View Full Code Here

    return CollectionTupleSource.createUpdateCountTupleSource(updateCount);
  }
 
  private void insertTuple(List<?> list, boolean ordered) throws TeiidComponentException, TeiidProcessingException {
    if (tree.insert(list, ordered?InsertMode.ORDERED:InsertMode.NEW, -1) != null) {
      throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTable.duplicate_key")); //$NON-NLS-1$
    }
  }
View Full Code Here

        tuple.add(0, rowId.getAndIncrement());
      }
      currentTuple = tuple;
      for (int i : notNull) {
        if (tuple.get(i) == null) {
          throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTable.not_null", columns.get(i)));
        }
      }
      insertTuple(tuple, addRowId);
    }
View Full Code Here

        try {
            if (this.state == ProcessingState.NEW) {
                state = ProcessingState.PROCESSING;
            processNew();
                if (isCanceled) {
                  this.processingException = new TeiidProcessingException(QueryPlugin.Util.getString("QueryProcessor.request_cancelled", this.requestID)); //$NON-NLS-1$
                    state = ProcessingState.CLOSE;
                }
          }
         
            resume();
View Full Code Here

  }
 
  Command getOriginalCommand() throws TeiidProcessingException {
    if (this.originalCommand == null) {
      if (this.processingException != null) {
        throw new TeiidProcessingException(this.processingException);
      }
      throw new IllegalStateException("Original command is not available"); //$NON-NLS-1$
    }
    return this.originalCommand;
  }
View Full Code Here

        SQLStates.CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION);
    testCreateThrowable(new TeiidException(
        "A test Generic MM Core Exception"), SQLStates.DEFAULT); //$NON-NLS-1$
    testCreateThrowable(new TeiidException("A test MM Exception"), //$NON-NLS-1$
        SQLStates.DEFAULT);
    testCreateThrowable(new TeiidProcessingException(
        "A test Generic MM Query Processing Exception"), //$NON-NLS-1$
        SQLStates.USAGE_ERROR);
    testCreateThrowable(new TeiidRuntimeException(
        "A test MM Runtime Exception"), SQLStates.DEFAULT); //$NON-NLS-1$
    testCreateThrowable(new TeiidSQLException(
View Full Code Here

        int index = output;
        if (nameIndexes != null) {
          index = nameIndexes.get(col.getName());
        }
        if (index >= vals.size()) {
          throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.no_value", col.getName(), textLine, systemId)); //$NON-NLS-1$
        }
        val = vals.get(index);
        try {
          tuple.add(DataTypeManager.transformValue(val, table.getColumns().get(output).getSymbol().getType()));
        } catch (TransformationException e) {
          throw new TeiidProcessingException(e, QueryPlugin.Util.getString("TextTableNode.conversion_error", col.getName(), textLine, systemId)); //$NON-NLS-1$
        }
      }
      addBatchRow(tuple);
    }
   
View Full Code Here

            return null;
          }
          continue; //skip empty lines
        }
          if (exact && sb.length() < lineWidth) {
            throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.invalid_width", sb.length(), lineWidth, textLine, systemId)); //$NON-NLS-1$
          }
        return sb.toString();
        }
        sb.append(c);
        if (sb.length() > maxLength) {
          if (exact) {
            sb.deleteCharAt(sb.length() - 1);
            //we're not forcing them to fully specify the line, so just drop the rest
            //TODO: there should be a max read length
            while (readChar() != '\n') {
             
            }
            return sb.toString();
          }
          throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.line_too_long", textLine+1, systemId, maxLength)); //$NON-NLS-1$ 
        }
    }
  }
View Full Code Here

TOP

Related Classes of org.teiid.core.TeiidProcessingException

Copyright © 2018 www.massapicom. 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.