Package javax.xml.parsers

Examples of javax.xml.parsers.FactoryConfigurationError


      }
      try {
         SAXParserFactory spf = (SAXParserFactory) factory.getClass().getClassLoader().loadClass(factoryName).newInstance();
         return  spf;
      } catch (Exception e) {
         throw new FactoryConfigurationError(e,e.getMessage());
      } // end of try-catch
   }


      }
      try {
         DocumentBuilderFactory dbf = (DocumentBuilderFactory) factory.getClass().getClassLoader().loadClass(factoryName).newInstance();
         return dbf;
      } catch (Exception e) {
         throw new FactoryConfigurationError(e,e.getMessage());
      }
   }

    try {
      return context.getBundle().loadClass(parserFactoryClassName).newInstance();
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new FactoryConfigurationError(e);
    }
  }

        try {
            Class clazz = Class.forName( factoryName );
            factory = (XPathQueryFactory)clazz.newInstance();
        }
        catch (ClassNotFoundException cnfe) {
            throw new FactoryConfigurationError (cnfe);
        }
        catch (IllegalAccessException iae) {
            throw new FactoryConfigurationError (iae);
        }
        catch (InstantiationException ie) {
            throw new FactoryConfigurationError (ie);
        }
        return factory;
    }

        try {
            Class clazz = Class.forName( factoryName );
            factory = (XUpdateQueryFactory)clazz.newInstance();
        }
        catch (ClassNotFoundException cnfe) {
            throw new FactoryConfigurationError (cnfe);
        }
        catch (IllegalAccessException iae) {
            throw new FactoryConfigurationError (iae);
        }
        catch (InstantiationException ie) {
            throw new FactoryConfigurationError (ie);
        }
        return factory;
    }

                               catch (SAXException exc) {}
                           }
                        }
                    } catch( Exception e ) {
                        // this is impossible, but better safe than sorry
                        throw new FactoryConfigurationError(e);
                    }
                }
               
                // If XML names and Namespace URIs are already internalized we
                // can avoid running them through the SymbolTable.

    }
    catch (RuntimeException e) {
      throw e;
    }
    catch (Exception e) {
      throw new FactoryConfigurationError(e);
    }
  }

            try {
                Class documentBuilderClass = ClassLoading.loadClass(documentBuilderName, classLoader);
                DocumentBuilderFactory documentBuilderFactory = (DocumentBuilderFactory) documentBuilderClass.newInstance();
                return documentBuilderFactory;
            } catch (Exception e) {
                throw new FactoryConfigurationError(e, "Unable to create DocumentBuilderFactory " +
                        documentBuilderName + ", which was specified in the " + DOCUMENT_BUILDER_FACTORY + " system property");
            }
        }

        return DocumentBuilderFactory.newInstance();

            try {
                Class saxParserClass = ClassLoading.loadClass(saxParserName, classLoader);
                SAXParserFactory saxParserFactory = (SAXParserFactory) saxParserClass.newInstance();
                return saxParserFactory;
            } catch (Exception e) {
                throw new FactoryConfigurationError(e, "Unable to create SAXParserFactory " +
                        saxParserName + ", which was specified in the " + SAX_PARSER_FACTORY + " system property");
            }
        }

        return SAXParserFactory.newInstance();

                try {
                    DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(disableSecurityProcessing);
                    db = dbf.newDocumentBuilder();
                } catch (ParserConfigurationException e) {
                    // impossible
                    throw new FactoryConfigurationError(e);
                }
            }
            return db.newDocument();
        }
    }

TOP

Related Classes of javax.xml.parsers.FactoryConfigurationError

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.