Package javax.xml.transform

Examples of javax.xml.transform.TransformerFactoryConfigurationError


      }
      try {
         TransformerFactory tf = (TransformerFactory) factory.getClass().getClassLoader().loadClass(factoryName).newInstance();
         return tf;
      } catch (Exception e) {
         throw new TransformerFactoryConfigurationError(e,e.getMessage());
      } // end of try-catch
   }
View Full Code Here


        if (transformerFactoryClass != null) {
            try {
                return transformerFactoryClass.newInstance();
            }
            catch (Exception ex) {
                throw new TransformerFactoryConfigurationError(ex,
                        "Could not instantiate TransformerFactory [" + transformerFactoryClass + "]");
            }
        }
        else {
            return TransformerFactory.newInstance();
View Full Code Here

     returned by TransformerFactory.newInstance() is not a SAXTransformerFactory
   **/
  public TransformerXMLSerializerFactory(){
      TransformerFactory tf = TransformerFactory.newInstance();
      if(!tf.getFeature(SAXTransformerFactory.FEATURE) || !(tf instanceof SAXTransformerFactory)){
          throw new TransformerFactoryConfigurationError(
              tf.getClass().getName() +
              " is not a SAXTransformerFactory." +
              "Please set the system property " +
              "javax.xml.transform.TransformerFactory to a "+
              "SAXTransformerFactory implementation.") ;
View Full Code Here

    if (transformerFactoryClass != null) {
      try {
        return (TransformerFactory) transformerFactoryClass.newInstance();
      }
      catch (Exception ex) {
        throw new TransformerFactoryConfigurationError(ex, "Could not instantiate TransformerFactory");
      }
    }
    else {
      return TransformerFactory.newInstance();
    }
View Full Code Here

    if (transformerFactoryClass != null) {
      try {
        return (TransformerFactory) transformerFactoryClass.newInstance();
      }
      catch (Exception ex) {
        throw new TransformerFactoryConfigurationError(ex, "Could not instantiate TransformerFactory");
      }
    }
    else {
      return TransformerFactory.newInstance();
    }
View Full Code Here

                    SAXTransformerFactory tf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
                                    (SAXTransformerFactory)SAXTransformerFactory.newInstance()
                                    : (SAXTransformerFactory) TransformerFactory.newInstance(DEFAULT_TRANSFORMER_IMPL, StreamValidatorHelper.class.getClassLoader());
                    identityTransformerHandler = tf.newTransformerHandler();
                } catch (TransformerConfigurationException e) {
                    throw new TransformerFactoryConfigurationError(e);
                }

                handler = new ValidatorHandlerImpl(fComponentManager);
                handler.setContentHandler(identityTransformerHandler);
                identityTransformerHandler.setResult(result);
View Full Code Here

                    SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
                    identityTransformer1 = tf.newTransformer();
                    identityTransformer2 = tf.newTransformerHandler();
                } catch (TransformerConfigurationException e) {
                    // this is impossible, but again better safe than sorry
                    throw new TransformerFactoryConfigurationError(e);
                }
            }

            handler = new ValidatorHandlerImpl(fComponentManager);
            if( result != null ) {
View Full Code Here

            if( result!=null ) {
                try {
                    SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
                    identityTransformerHandler = tf.newTransformerHandler();
                } catch (TransformerConfigurationException e) {
                    throw new TransformerFactoryConfigurationError(e);
                }
               
                handler = new ValidatorHandlerImpl(fComponentManager);
                handler.setContentHandler(identityTransformerHandler);
                identityTransformerHandler.setResult(result);
View Full Code Here

    public XMLReader loadParser() {
        XMLReader parser;
        try {
            parser = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
        } catch (ParserConfigurationException err) {
            throw new TransformerFactoryConfigurationError(err);
        } catch (SAXException err) {
            throw new TransformerFactoryConfigurationError(err);
        }
        return parser;
    }
View Full Code Here

              node = temp;    // the original element will do the job
          } else {
              try {
                  node = (StyleElement)actualClass.newInstance();
              } catch (InstantiationException err1) {
                  throw new TransformerFactoryConfigurationError(err1, "Failed to create instance of " + actualClass.getName());
              } catch (IllegalAccessException err2) {
                  throw new TransformerFactoryConfigurationError(err2, "Failed to access class " + actualClass.getName());
              }
              node.substituteFor(temp);   // replace temporary node with the new one
          }
          return node;
      }
View Full Code Here

TOP

Related Classes of javax.xml.transform.TransformerFactoryConfigurationError

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.