Package org.teiid.core

Examples of org.teiid.core.TeiidRuntimeException


        }
        MappingBaseNode parent = this.getParentNode();
        if (parent != null) {
            return parent.getRecursiveRootNode(elem);
        }
        throw new TeiidRuntimeException(QueryPlugin.Util.getString("invalid_recurive_node", elem)); //$NON-NLS-1$
    }
View Full Code Here


        MappingVisitor queryPlanVisitor = new MappingVisitor() {
            public void visit(MappingSourceNode sourceNode) {
                try {
                    stagePlannedQuery(sourceNode, planEnv);
                } catch (Exception e) {
                    throw new TeiidRuntimeException(e);
                }
            }
        };
        planWalk(doc, queryPlanVisitor);
    }
View Full Code Here

                    inputTypes.add(0, CommandContext.class);
                  invocationMethod = helper.findBestMethodWithSignature(method.getInvocationMethod(), inputTypes);
                  requiresContext = true;
                }
            } catch (ClassNotFoundException e) {
              throw new TeiidRuntimeException(e, "ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.no_class", method.getName(), method.getInvocationClass())); //$NON-NLS-1$ //$NON-NLS-2$
            } catch (NoSuchMethodException e) {
              throw new TeiidRuntimeException(e, "ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.no_method", method, method.getInvocationClass(), method.getInvocationMethod())); //$NON-NLS-1$ //$NON-NLS-2$
            } catch (Exception e) {               
                throw new TeiidRuntimeException(e, "ERR.015.001.0047", QueryPlugin.Util.getString("ERR.015.001.0047", method, method.getInvocationClass(), method.getInvocationMethod())); //$NON-NLS-1$ //$NON-NLS-2$
            }
            if (invocationMethod != null) {
              // Check return type is non void
            Class<?> methodReturn = invocationMethod.getReturnType();
            if(methodReturn.equals(Void.TYPE)) {
              throw new TeiidRuntimeException("ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.not_void", method.getName(), invocationMethod)); //$NON-NLS-1$ //$NON-NLS-2$
            }

            // Check that method is public
            int modifiers = invocationMethod.getModifiers();
            if(! Modifier.isPublic(modifiers)) {
              throw new TeiidRuntimeException("ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.not_public", method.getName(), invocationMethod)); //$NON-NLS-1$ //$NON-NLS-2$
            }

            // Check that method is static
            if(! Modifier.isStatic(modifiers)) {
              throw new TeiidRuntimeException("ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.not_static", method.getName(), invocationMethod)); //$NON-NLS-1$ //$NON-NLS-2$
            }
            }
        } else {
            inputTypes.add(0, CommandContext.class);
        }
View Full Code Here

      StandardXMLTranslator sxt = new StandardXMLTranslator((Source)value);
      SQLXMLImpl sqlxml;
      try {
        sqlxml = XMLSystemFunctions.saveToBufferManager(dtm.getBufferManager(), sxt);
      } catch (TeiidComponentException e) {
        throw new TeiidRuntimeException(e);
      } catch (TeiidProcessingException e) {
        throw new TeiidRuntimeException(e);
      }
      return new XMLType(sqlxml);
    }
    return DataTypeManager.convertToRuntimeType(value);
  }
View Full Code Here

      results = currentResults.get();
      if (results.getFinalRow() < 0) {
        addWork();
      }
    } catch (InterruptedException e) {
      throw new TeiidRuntimeException(e);
    } catch (ExecutionException e) {
      if (e.getCause() instanceof TeiidProcessingException) {
        throw (TeiidProcessingException)e.getCause();
      }
      if (e.getCause() instanceof TeiidComponentException) {
View Full Code Here

          int waitCount = Math.min(count, this.maxReserveBatchKB);
          while (waitCount > 0 && waitCount > this.reserveBatchKB) {
            try {
            batchesFreed.await(100, TimeUnit.MILLISECONDS);
          } catch (InterruptedException e) {
            throw new TeiidRuntimeException(e);
          }
          waitCount /= 2;
         
        }
        if (this.reserveBatchKB >= count || mode == BufferReserveMode.FORCE) {
View Full Code Here

                    if (baseNode instanceof MappingSourceNode) {
                        planQueries((MappingSourceNode)baseNode, planEnv);
                    }
                   
                } catch (Exception e) {
                    throw new TeiidRuntimeException(e);
                }
            }    
           
        };       
        planWalk(doc, queryPlanVisitor);
View Full Code Here

                   
                    // Plan the result set.
                    ProcessorPlan queryPlan = optimizePlan(command, planEnv);
                    rsInfo.setPlan(queryPlan);                   
                } catch (Exception e) {
                    throw new TeiidRuntimeException(e);
                }
            }
        };
        planWalk(doc, queryPlanVisitor);
    }   
View Full Code Here

                Criteria crit = QueryParser.getQueryParser().parseCriteria(criteriaString);                              
                StaticSymbolMappingVisitor.mapSymbols(crit, symbolMap);
                ResolverVisitor.resolveLanguageObject(crit, null, planEnv.getGlobalMetadata());
                return crit;
            } catch (Exception e) {
                throw new TeiidRuntimeException(e);
            }
        }
        return null;
    }
View Full Code Here

          }
          try {
        context.declareGlobalVariable(StructuredQName.fromClarkName(derivedColumn.getAlias()), SequenceType.ANY_SEQUENCE, null, true);
      } catch (XPathException e) {
        //this is always expected to work
        throw new TeiidRuntimeException(e, "Could not define global variable"); //$NON-NLS-1$
      }
    }
       
      processColumns(columns, ic);       
   
View Full Code Here

TOP

Related Classes of org.teiid.core.TeiidRuntimeException

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.