Package org.teiid.core

Examples of org.teiid.core.TeiidRuntimeException


      // if not defined then see if can bind to local address; if supplied resolve it by name
      if (this.hostName == null) {
        this.hostName = InetAddress.getLocalHost().getHostName();
      }
    } catch (UnknownHostException e) {
      throw new TeiidRuntimeException("Failed to resolve the bind address"); //$NON-NLS-1$
    }
  }
View Full Code Here


      if (addr.getHostAddress().equalsIgnoreCase(this.hostName)) {
        this.hostAddress = addr;
      }
      return addr;
    } catch (UnknownHostException e) {
      throw new TeiidRuntimeException("Failed to resolve the bind address"); //$NON-NLS-1$
    }   
  }
View Full Code Here

    private List<StreamFactoryReference> references = new LinkedList<StreamFactoryReference>();
   
    public static void addKnownClass(Class<?> clazz, byte code) {
      KNOWN_CLASSES.put(clazz, Integer.valueOf(code));
      if (KNOWN_CODES.put(Integer.valueOf(code), clazz) != null) {
        throw new TeiidRuntimeException("Duplicate class"); //$NON-NLS-1$
      }
    }
View Full Code Here

          while (exception.getCause() != exception
              && exception.getCause() != null) {
            exception = exception.getCause();
          }
          if (exception instanceof TeiidRuntimeException) {
            TeiidRuntimeException runtimeException = (TeiidRuntimeException) exception;
            while (runtimeException.getChild() != exception
                && runtimeException.getChild() != null) {
              if (runtimeException.getChild() instanceof TeiidRuntimeException) {
                runtimeException = (TeiidRuntimeException) runtimeException
                    .getChild();
              } else {
                exception = runtimeException.getChild();
                break;
              }
            }
          }
        }
View Full Code Here

      MetaType type = v1.getMetaType();
      if (type instanceof SimpleMetaType) {
        SimpleValue simple = (SimpleValue)v1;
        return simple.getValue().toString();
      }
      throw new TeiidRuntimeException("Failed to convert value to string value"); //$NON-NLS-1$
    }
    return null;
 
View Full Code Here

        return new SimpleValueSupport(st,value.charAt(0));
      } else if (SimpleMetaType.DATE.equals(st)) {
        try {
          return new SimpleValueSupport(st, SimpleDateFormat.getInstance().parse(value));
        } catch (ParseException e) {
          throw new TeiidRuntimeException(e, IntegrationPlugin.Util.getString("failed_to_convert", type.getClassName())); //$NON-NLS-1$
        }
      } else if (SimpleMetaType.DOUBLE.equals(st)) {
        return new SimpleValueSupport(st, Double.valueOf(value));
      } else if (SimpleMetaType.DOUBLE_PRIMITIVE.equals(st)) {
        return new SimpleValueSupport(st, Double.parseDouble(value));
      } else if (SimpleMetaType.FLOAT.equals(st)) {
        return new SimpleValueSupport(st, Float.parseFloat(value));
      } else if (SimpleMetaType.FLOAT_PRIMITIVE.equals(st)) {
        return new SimpleValueSupport(st, Float.valueOf(value));
      } else if (SimpleMetaType.INTEGER.equals(st)) {
        return new SimpleValueSupport(st, Integer.valueOf(value));
      } else if (SimpleMetaType.INTEGER_PRIMITIVE.equals(st)) {
        return new SimpleValueSupport(st, Integer.parseInt(value));
      } else if (SimpleMetaType.LONG.equals(st)) {
        return new SimpleValueSupport(st, Long.valueOf(value));
      } else if (SimpleMetaType.LONG_PRIMITIVE.equals(st)) {
        return new SimpleValueSupport(st, Long.parseLong(value));
      } else if (SimpleMetaType.SHORT.equals(st)) {
        return new SimpleValueSupport(st, Short.valueOf(value));
      } else if (SimpleMetaType.SHORT_PRIMITIVE.equals(st)) {
        return new SimpleValueSupport(st, Short.parseShort(value));
      } else if (SimpleMetaType.STRING.equals(st)) {
        return new SimpleValueSupport(st,value);
      }
    }
    throw new TeiidRuntimeException(IntegrationPlugin.Util.getString("failed_to_convert", type.getClassName())); //$NON-NLS-1$
  }
View Full Code Here

            }
          };
        }
      });
    } catch (MalformedURLException e2) {
      throw new TeiidRuntimeException(e2);
    }
  }
View Full Code Here

    for (ManagedOperation mo:mc.getOperations()) {
      if (mo.getName().equals(operation)) {
        return mo.invoke(args);
      }
    }
    throw new TeiidRuntimeException(IntegrationPlugin.Util.getString("no_operation", operation)); //$NON-NLS-1$
  }
View Full Code Here

            }
            else if (elementType.isComposite()) {
              list.addAll((List)MetaValueFactory.getInstance().unwrap(value));
            }
            else {
              throw new TeiidRuntimeException("unsupported type"); //$NON-NLS-1$
            }
            PropertiesUtils.setBeanProperty(t, mp.getMappedName(), list);
          }
          else if (type.isGeneric()) {
            throw new TeiidRuntimeException("unsupported type"); //$NON-NLS-1$
          }
          else if (type.isTable()|| type.isArray()) {
            throw new TeiidRuntimeException("unsupported type"); //$NON-NLS-1$
          }
        }
      }
      return clazz.cast(t);
    } catch (InstantiationException e) {
      throw new TeiidRuntimeException(e, IntegrationPlugin.Util.getString("class_not_found", clazz.getName())); //$NON-NLS-1$
    } catch (IllegalAccessException e) {
      throw new TeiidRuntimeException(e, IntegrationPlugin.Util.getString("class_not_found", clazz.getName())); //$NON-NLS-1$
    }
  }
View Full Code Here

          }
        }
      } 
      return clazz.cast(t);
    } catch (InstantiationException e) {
      throw new TeiidRuntimeException(e, IntegrationPlugin.Util.getString("class_not_found", clazz.getName())); //$NON-NLS-1$
    } catch (IllegalAccessException e) {
      throw new TeiidRuntimeException(e, IntegrationPlugin.Util.getString("class_not_found", clazz.getName())); //$NON-NLS-1$
    }
  }
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.