Package org.teiid.core

Examples of org.teiid.core.TeiidRuntimeException


  public String getUsername() {
    return username;
  }
  public void setUsername(String username) {
    if (username.trim().length() == 0) {
      throw new TeiidRuntimeException("Name can not be null"); //$NON-NLS-1$
    }
    this.username = username;
  }
View Full Code Here


 
  public void setURL(String uRL) {
    try {
      this.URL = new URL(uRL);
    } catch (MalformedURLException e) {
      throw new TeiidRuntimeException("URL Supplied is not valid URL"+ e.getMessage());//$NON-NLS-1$
    }
  }
View Full Code Here

  public static void loadUDFs(String udf, TranslationUtility util) {
    try {
      Collection <FunctionMethod> methods = FunctionMetadataReader.loadFunctionMethods(TranslationHelper.class.getResource(udf).openStream());
      util.setUDF(methods);
    } catch (IOException e) {
      throw new TeiidRuntimeException("failed to load UDF"); //$NON-NLS-1$
    } catch (JAXBException e) {
      throw new TeiidRuntimeException("failed to load UDF"); //$NON-NLS-1$
    }
  }
View Full Code Here

      Collection <FunctionMethod> methods = new ArrayList<FunctionMethod>();
      if (udf != null) {
        try {
        methods.addAll(FunctionMetadataReader.loadFunctionMethods(TranslationHelper.class.getResource(udf).openStream()));
      } catch (JAXBException e) {
        throw new TeiidRuntimeException("failed to load UDF"); //$NON-NLS-1$
      } catch (IOException e) {
        throw new TeiidRuntimeException("failed to load UDF"); //$NON-NLS-1$
      }
      }
      if (pushdowns != null) {
        methods.addAll(pushdowns);
      }
View Full Code Here

      this.admin = AdminProvider.getLocal(profileService, vdbStatusChecker);
    } else {
      try {
        this.admin = AdminProvider.getLocal(vdbStatusChecker);
      } catch (AdminComponentException e) {
        throw new TeiidRuntimeException(e.getCause());
      }
    }
  }   
View Full Code Here

                    } else {

                   
                        // this will handle case where we did not resolve, mark it blank
                        if (nestedvalue == null) {
                          throw new TeiidRuntimeException(CorePlugin.Util.getString("PropertiesUtils.failed_to_resolve_property", nestedkey)); //$NON-NLS-1$
                        }                   
                        value = value.substring(0,start)+nestedvalue+value.substring(end+1);
                        modified = true;
                   }
                }
View Full Code Here

                          if (obj != null) {
                              objectClass = obj.getClass().getName();
                              break objectSearch;
                          }
                      }
                      throw new TeiidRuntimeException(JDBCPlugin.Util.getString("BatchSerializer.datatype_mismatch", new Object[] {types[i], new Integer(i), objectClass})); //$NON-NLS-1$
                  }
              }
            }
        }
    }
View Full Code Here

    // =========================================================================

    public void testFailMetaMatrixRuntimeExceptionWithNullMessage() {
        Throwable e = null;
        try {
            new TeiidRuntimeException((String)null)// should throw NPE
            fail("Should not get here"); //$NON-NLS-1$
        } catch ( Throwable ex ) {
            e = ex;
        }
        assertNotNull(e);
View Full Code Here

        }
        assertNotNull(e);
    }

    public void testMetaMatrixRuntimeExceptionWithNullThrowable() {
        final TeiidRuntimeException err = new TeiidRuntimeException((Throwable)null);
        assertNull(err.getChild());
        assertEquals("0", err.getCode()); //$NON-NLS-1$
        assertNull(err.getMessage());
       
    }
View Full Code Here

        assertNull(err.getMessage());
       
    }

    public void testMetaMatrixRuntimeExceptionWithMessage() {
        final TeiidRuntimeException err = new TeiidRuntimeException("Test"); //$NON-NLS-1$
        assertNull(err.getChild());
        assertEquals("0", err.getCode()); //$NON-NLS-1$
        assertEquals("Test", err.getMessage()); //$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.