Package org.teiid.core

Examples of org.teiid.core.TeiidException


        SQLStates.CONNECTION_EXCEPTION_STALE_CONNECTION);
  }
   
    public void testCreateThrowable3() {
        TeiidSQLException e = testCreateThrowable(
                            new TeiidException(
                                    new TeiidRuntimeException(
                                            new SocketTimeoutException(
                                                    "A test MM Invalid Session Exception"), //$NON-NLS-1$
                                            "Test MetaMatrixRuntimeException with a InvalidSessionException in it"), //$NON-NLS-1$
                                    "Test MM Core Exception with an MM Runtime Exception in it and an InvalidSessionException nested within"), //$NON-NLS-1$
View Full Code Here


  private static class NotSerializable {
   
  }

  @Test public void testDeserializationNotSerializable() throws Exception {
    Exception ex = new TeiidException() {
      NotSerializable ns = new NotSerializable();
    };
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
View Full Code Here

                if (returnFirstMatch && queryResult.size() > 0) {
                    break;
                }               
            }
        } catch(IOException e) {
            throw new TeiidException(e);
        }

        return queryResult.toArray(new IEntryResult[queryResult.size()]);
    }
View Full Code Here

    // get the schema
    if (xmlSchemas == null || xmlSchemas.isEmpty()){
        // if there is no schema no need to validate
        // return a warning saying there is no schema
            TeiidException noSchema = new TeiidComponentException("ERR.015.006.0042", QueryPlugin.Util.getString("ERR.015.006.0042")); //$NON-NLS-1$ //$NON-NLS-2$
      addWarning(noSchema);
      return;
    }
   
    // perform the validation
View Full Code Here

        spf.setNamespaceAware(true);
        SAXParser parser;
        try {
            parser = spf.newSAXParser();
        } catch (ParserConfigurationException err) {
            throw new TeiidException(err);
        } catch (SAXException err) {
            throw new TeiidException(err);
        }
       PeekContentHandler pch = new PeekContentHandler();
       
       for (SQLXML schema : schemas) {
         InputStream is;
      try {
        is = schema.getBinaryStream();
      } catch (SQLException e) {
        throw new TeiidComponentException(e);
      }
      InputSource source = new InputSource(is);
             pch.targetNameSpace = null;
         try {
                parser.parse(source, pch);
            } catch (SAXException err) {
                throw new TeiidException(err);
            } catch (IOException err) {
                throw new TeiidComponentException(err);
            } finally {
              try {
          is.close();
View Full Code Here

        super(name);
    }

    public void testGetAndClearWarnings() {       
        FakeProcessorPlan plan = new FakeProcessorPlan(Collections.emptyList(), Collections.emptyList());
        TeiidException warning = new TeiidException("test"); //$NON-NLS-1$
        plan.addWarning(warning);
       
        List warnings = plan.getAndClearWarnings();
        assertEquals("Did not get expected number of warnings", 1, warnings.size()); //$NON-NLS-1$
        assertEquals("Did not get expected warning", warning, warnings.get(0)); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.teiid.core.TeiidException

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.