Examples of XmlException


Examples of org.bifrost.xmlio.XmlException

  public void setAttribute(PropertyMap pmap, Object object, Method method, Object value)
    throws XmlException
  {

    if (object == null)
      throw new XmlException("Must pass an object whose attribute will be set.");
   
    Class paramClass = null;
    String paramClassName = null;
    Class[] paramTypes = null;
    if (method != null)
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.deployment.xml.parser.XMLException

        } catch (org.xml.sax.SAXException exc){
            // XMLErrorHandler will handle SAX exceptions
        }
       
        // handle any parse exceptions
        XMLException xmlError = xmlErrorHandler.getXMLException();
        if (xmlError != null) {
            throw PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(baseURL, xmlError);
        }

        Iterator<SEPersistenceUnitInfo> persistenceInfos = myContentHandler.getPersistenceUnits().iterator();
View Full Code Here

Examples of org.exolab.castor.xml.XMLException

                if (uri != null) {
                    schemaLocation = uri.getAbsoluteURI();
                }
            }
            catch (URIException urix) {
                throw new XMLException(urix);
            }
        }
        else {
            schemaLocation = namespace;
            try {
                uri = getURIResolver().resolveURN(namespace);
            }
            catch (URIException urix) {
                throw new XMLException(urix);
            }
            if (uri == null) {
                String err = "Unable to resolve Schema corresponding " +
                    "to namespace '" + namespace + "'.";
                throw new SchemaException(err);
View Full Code Here

Examples of org.infoset.xml.XMLException

      throws IOException,XMLException
   {
      Document doc = docLoader.load(location);
      Element top = doc.getDocumentElement();
      if (!top.getName().equals(COMPONENT)) {
         throw new XMLException("Expecting "+COMPONENT+" but found "+top.getName());
      }
      String value = top.getAttributeValue("autoconf-check");
      if (value!=null) {
         autoconfCheck = Long.parseLong(value) * 1000;
      }
     
      Element keyStoreE = top.getFirstElementNamed(KEYSTORE);
      if (keyStoreE!=null) {
         URI fileRef = keyStoreE.getBaseURI().resolve(keyStoreE.getAttributeValue("file"));
         this.keyStorePath = new File(fileRef.getSchemeSpecificPart());
         this.keyStorePassword = keyStoreE.getAttributeValue("password");
      }
     
      Iterator<Element> appdefElements = top.getElementsByName(DEFINE);
      while (appdefElements.hasNext()) {
         Element appdefE = appdefElements.next();
         String name = appdefE.getAttributeValue("name");
         String className = appdefE.getAttributeValue("class");
        
         String ref = appdefE.getAttributeValue("ref");
         if (ref!=null) {
            ClassLoader theLoader = loaders.get(ref.trim());
            if (theLoader==null) {
               throw new XMLException("Cannot find definition: "+ref);
            }
            if (className==null || name==null) {
               continue;
            }
            try {
               Class cdef = theLoader.loadClass(className);
               definitions.put(name,cdef);
            } catch (ClassNotFoundException ex) {
               throw new XMLException("Cannot find class: "+ex.getMessage(),ex);
            }
            continue;
         }
        
         if (name!=null) {
            List<URL> libraries = new ArrayList<URL>();
            Iterator<Element> libraryElements = appdefE.getElementsByName(LIBRARY);
            while (libraryElements.hasNext()) {
               Element libE = libraryElements.next();
               String href = libE.getAttributeValue("href");
               if (href!=null) {
                  URI u = libE.getBaseURI().resolve(href);
                  libraries.add(u.toURL());
               }
            }
            ClassLoader theLoader = this.getClass().getClassLoader();
            if (libraries.size()!=0) {
               URL [] list = new URL[libraries.size()];
               list = libraries.toArray(list);
               theLoader = new URLClassLoader(list,this.getClass().getClassLoader());
               LOG.fine("ClassLoader: "+name+" -> "+theLoader);
               LOG.fine("  Libraries: "+libraries);
               loaders.put(name, theLoader);
            }
            if (className!=null) {
               try {
                  Class cdef = theLoader.loadClass(className);
                  definitions.put(name,cdef);
               } catch (ClassNotFoundException ex) {
                  throw new XMLException("Cannot find class: "+ex.getMessage(),ex);
               }
            }
         } else if (name!=null) {
            LOG.warning("The 'class' attribute is missing on the definition of '"+name+"'");
         }
View Full Code Here

Examples of org.jboss.jms.util.XMLException

   private void parse(Element e) throws XMLException
   {
      if (!"bindings".equals(e.getNodeName()))
      {
         throw new XMLException("The element is not a <bindings> element");
      }

      if (!e.hasChildNodes())
      {
         names = Collections.EMPTY_LIST;
View Full Code Here

Examples of org.jboss.jms.util.XMLException

            {
               dbc.setDatabasePassword(value);
            }
            else
            {
               throw new XMLException("Unknown element: " + name);
            }
         }
      }
   }
View Full Code Here

Examples of org.wiztools.restclient.XMLException

            final String name = e.getLocalName();
            if(name.equals("token")) {
                out.setOAuth2BearerToken(e.getValue());
            }
            else {
                throw new XMLException("Unknown element in oauth2-bearer auth: " + name);
            }
        }
       
        return out;
    }
View Full Code Here

Examples of org.xdams.xml.builder.exception.XMLException

      builder = dbf.newDocumentBuilder();
      DomDocument = builder.parse(new InputSource(file.getAbsolutePath()));
      JDomDocument = new DOMBuilder().build(DomDocument);
    } catch (Exception e) {
      e.printStackTrace();
      throw new XMLException(e.getMessage());
    }
  }
View Full Code Here

Examples of org.zachtaylor.jnodalxml.XmlException

    return node;
  }

  public void loadXml(XmlNode node) {
    if (!XML_NODE_NAME.equals(node.getName()))
      throw new XmlException("Cannot read node");

    removeAll();

    for (XmlNode childNode : node.getChildren(Move.XML_NODE_NAME)) {
      _data[_count].loadXml(childNode);
View Full Code Here

Examples of railo.runtime.exp.XMLException

      attr.setValue(Caster.toString(value));
      nodeMap.setNamedItem(attr);
     
    }
    catch(DOMException de) {
      throw new XMLException(de);
    }
   
   
   
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.