Javax.xml.parsers.ParserConfigurationException:

Hi,
I have an java Ant task which runs well on my machine but when same task with same directory structure and all files is run on another machine it gives following error;
javax.xml.parsers.ParserConfigurationException: AElfred parser is non-validating
if Any one have the solution please reply...
Thanks

What is this "AElfred"? Your ant task on the second machine is probably using another XML parser. Print out the parsers name and try to conifigure the same parser from the first machine on the second one.

Similar Messages

  • ParserConfigurationException with javax.xml.parsers.DocumentBuilderFactory

    Like many people, I am trying to just read in the contents of a XML file. My code compiles in WS studio and I publish it to the server. However, I keep getting a ParserConfigurationException when I try to get a DocumentBuilder from the factory. Below is my code:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse( new File(XMLFILE) );
    Any idea why?

    The xmlfile is valid and here is the partial stacktrace
    Root Error-1: javax/xml/parsers/ParserConfigurationException
    java.lang.Exception: javax/xml/parsers/ParserConfigurationException
    at Search5F_Results_jsp_5._jspService(_Search_5F_Results_jsp_5.java:206)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:390)
    at org.apache.jasper.runtime.JspServlet.serviceJspFile
    Do I need to set some system property?

  • Javax.xml.parsers.SAXParser parser() error

    Hi,
    I've got some code that works fine in the Forte for Java IDE but just will not work when running as a stand-alone Windows application. I think it's to do with the filename having spaces in the pathname?
    Any help would be great!
    Regards.
    Gary Revell
    [email protected]
    [email protected]
    I've attached the code and the error(s) I get
    ------------------CODE FRAGMENT------------------
    // loadCE.java
    // Created on 25 April 2001, 15:43
    // @author RevellG
    // @version V1.0
    // This class is used to load the Standard Call Reporting XML document
    // and to allow the easy interrogation of the contents. The data can
    // then be used to populate fields in the Call Reporting GUI.
    import java.util.Vector;
    import java.io.*;
    import java.util.*;
    import java.util.Collections;
    import org.xml.sax.*;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class loadCallElement extends Object
    private static loadCall loadCall = null;
    private static boolean DEBUG = false;
    // Creates new loadCE
    public loadCallElement(boolean debugFlag )
    this.DEBUG = debugFlag;
    public void parseDoc( String docName ) throws Throwable
    // Use the default (non-validating) parser
    SAXParserFactory factory = null;
    try
    // Parse the input
    factory = SAXParserFactory.newInstance();
    SAXParser saxParser = factory.newSAXParser();
    loadCall = new loadCall(DEBUG);
    saxParser.parse( new File( docName ), loadCall );
    catch (Throwable t)
    // catch ( Exception t )
    System.err.println( t.getMessage() +" - <"+docName+">");
    t.printStackTrace ();
    loadCall.ceTree.clear();
    throw t;
    ------------------Error and Stack Trace---------------
    E:\Support\Call Logs\bin>java -classpath .\SCM_GUI.jar;%CLASSPATH%;%XML_HOME%\jaxp.jar;%XML_HOME%\parser.jar M
    anagerInterface > g.g
    CWD /Telecom/Support/Call Logs/Logs/Open/BBC PICS/001$revellg$qwerty.xml: 550 /Telecom/Support/Call Logs/Logs/
    Open/BBC PICS/001$revellg$qwerty.xml: The system cannot find the path specified.
    - <\\Reoclu1\Telecom\Support\Call Logs\Logs\Open\BBC PICS\001$revellg$qwerty.xml>
    java.io.FileNotFoundException: CWD /Telecom/Support/Call Logs/Logs/Open/BBC PICS/001$revellg$qwerty.xml: 550 /
    Telecom/Support/Call Logs/Logs/Open/BBC PICS/001$revellg$qwerty.xml: The system cannot find the path specified
    at sun.net.ftp.FtpClient.readReply(Unknown Source)
    at sun.net.ftp.FtpClient.issueCommand(Unknown Source)
    at sun.net.ftp.FtpClient.issueCommandCheck(Unknown Source)
    at sun.net.ftp.FtpClient.cd(Unknown Source)
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at com.sun.xml.parser.InputEntity.init(InputEntity.java:141)
    at com.sun.xml.parser.Parser.parseInternal(Parser.java:463)
    at com.sun.xml.parser.Parser.parse(Parser.java:284)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
    at loadCallElement.parseDoc(loadCallElement.java:52)
    at SCMView.create(SCMView.java, Compiled Code)
    at EventController$5.actionPerformed(EventController.java:116)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    Thanks Jim,
    I've installed JDK V1.3.1 and the problem HAS gone away..... However now JDK V1.3.1 won't install on other Win 2K machines.....
    Gary.

  • Contents of META-INF/services/javax.xml.parsers.DocumentBuilderFactory?

    I am currently working on an applet that solves Sudoku puzzles, allowing you to build your own in a Constructor and then solve them in a seperate Solver. To do this, we are implementing the puzzles files as XML documents.
    I have the code completely complied and on the server ( [sudoku.unl.edu|sudoku.unl.edu]) and it runs NEARLY perfectly, however when trying to access the server to save the xml code, the apache error_log presents this message: "File does not exist: classes/META-INF/services
    /javax.xml.parsers.DocumentBuilderFactory"
    Looking at the Java Doc here it says that the program should look for that in the jars. I am unsure of exactly how the applet is interacting with the server, but typing "java -version" yields:
    java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)Notably, the code works PERFECTLY in NetBeans, contacting the server using SCP and uploading the file and such, so the code doesn't seem to be the problem, unless I need to direct the DocumentBuilder code somehow. This is the code that I believe is causing the trouble (I have tried to include all relevant imports that are in my code):
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    DocumentBuilderFactory factoryBuilder;
              DocumentBuilder builder;
              Document doc;
              Element docElement;
              try
                   factoryBuilder  = DocumentBuilderFactory.newInstance( );
                   builder = factoryBuilder.newDocumentBuilder();
                   doc = builder.parse( indexLocation );
                   docElement = doc.getDocumentElement();
                   NodeList children = docElement.getChildNodes();          
                   for(int i =0; i < children.getLength(); i++)
                        if(children.item(i).getNodeType() == 1)
                             if((children.item(i).getNodeName()).equals("directory"))
                                  if ((children.item(i).getAttributes().getNamedItem("name").getNodeValue()).equals("UsersInput")) {
                                       Node firstChild = findNodeItem(children.item(i), "Difficulty0.." + this.upperField.getText());
                                       Node secondChild = findNodeItem(firstChild, "Level" + this.levelField.getText());
                                       Node thirdChild = findNodeItem(secondChild, (String)suTypeList.getSelectedItem());
                                       Element newFile = doc.createElement("file");
                                       newFile.setAttribute("name", fileName);                              
                                       thirdChild.appendChild(newFile);                              
                   SshParameters params = new SshParameters("cse.unl.edu", "consystlab","A/tutti");
                // create new Scp instance
                Scp scp = new Scp(params);
                // register event listener
                scp.addListener(this);
                // establish connection
                scp.connect();
                   TransformerFactory tFactory = TransformerFactory.newInstance();
                   Transformer transformer = tFactory.newTransformer();
                   DOMSource source = new DOMSource(doc);
                   StringWriter sw=new StringWriter();
                   StreamResult result = new StreamResult(sw);
                   transformer.transform(source, result);
                   String xmlString=sw.toString();
                // upload file
                  scp.upload(xmlString.getBytes(), indexPath, "libraryIndex.xml");
                 // disconnect
                scp.disconnect();
              catch (IOException e)
                   System.out.println("IO ERROR7");
                   System.out.println(e);
              catch (TransformerException tranE){
                   tranE.printStackTrace();               
              catch (ParserConfigurationException e)
                   System.out.println("IO ERROR8");
                   System.out.println(e);
              catch (SAXException e)
                   System.out.println("IO ERROR9");
                   System.out.println(e);
              }So my question is, what exactly are the contents of the file in the META-INF/services folder? I have manually created this file in my classes directory, where the program is searching. When I place text in it, it appends the text with .class and searches for that file, but doesn't seem to do anything with the file. I attempted directing it to the "DocumentBuilderFactory.class" file that I extracted from the classes.jar included with the JDK.
    I feel like all I need is this file to contain the correct content and the code will FINALLY work, but I have not been able to find anything out there on it.
    Thank for you for your help, sorry this was such a long message.
    -Jason

    Thanks!
    Thanks for the fast reply. I don't know if I made my point clear.
    I do not want to determine the parser by myself. I want the client system use the default parser, so I do not have the hit of downloading the fairly large parser jar.
    However, I want it not to do an empty request to the server for nothing. This turn around time kills an Applet. I want a fast loading applet!
    I'll go in trial and error mode, when I find the time next week.
    Thanks again, I appreciate it!
    K<o>

  • Java.lang.NullPointerException javax.xml.parsers.DocumentBuilder.parse

    Hi all,
    i have a problem by solving an error in my code. The Code is mainly from Ian Darwin.
    The code i am running works with j2sdk1.4.2_04. But now i have to bring it to work with jdk1.6.0_13.
    The code parses xml documents. With small xml documents the code works. With large xml documents i get the following error while running the produced class file.
    Exception in thread "main" java.lang.NullPointerException
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.setChunkIndex(DeferredDocumentImpl.java:1944)
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.appendChild(DeferredDocumentImpl.java:644)
    at com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.characters(AbstractDOMParser.java:1191)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.characters(XMLDTDValidator.java:862)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:463)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:208)
    at XParse.parse(XParse.java:38)
    at XParse$JFileChooserrv.<init>(XParse.java:119)
    at XParse.main(XParse.java:213)
    I know what a java.lang.NullPointerException mens. But i don't know where i have to look for. Specially i don't know what or where "com.sun.org.apache...." is.
    Is there a package that a have to add to the environment? Can some one tell my where i can find this package?
    I wrote the code for some years ago, 2006 or so. With the knew jdk1.6.0_13 some thinks chance in the environment. Couldn't find what exactly.
    The code has only 215 lines, but some how i can't add it to this Message, because Maximum allowed is only 7500.
    Is there an other Forum, which may is better for my question?

    Here is the code:
    import java.io.*;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.Container;
    import javax.swing.JTextArea;
    * This code is mainly from @author Ian Darwin, [email protected]
    public class XParse {
         /** Convert the file */
         public static void parse(File file, boolean validate) {
              try {
                   System.err.println("");
                   String fileName = file.getAbsolutePath();
                   System.err.println("Parsing " + fileName + "...");
                   // Make the document a URL so relative DTD works.
                   //String uri = new File(fileName).getAbsolutePath();
                   //System.err.println(uri);
                   DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
                   if (validate)
                   f.setValidating(true);
                   DocumentBuilder p = f.newDocumentBuilder();
                   p.setErrorHandler(new MyErrorHandler(System.err));
                   //XmlDocument doc = XmlDocument.createXMLDocument(file);
                   boolean vaild =  p.isValidating();
                   if (vaild) {
                        System.out.println("yes parsing");
                        Document doc = p.parse(file); // <<<< ERROR
                   System.out.println("Parsed OK");
              } catch (SAXParseException ex) {
                   System.err.println("+================================+");
                   System.err.println("|       *SAX Parse Error*        |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   System.err.println("At line " + ex.getLineNumber());
                   System.err.println("+================================+");
              } /**catch (RuntimeException ex) {
                   System.err.println("+================================+");
                   System.err.println("|       *SAX Parse Error*        |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   //System.err.println("At line " + ex.getLineNumber());
                   //System.err.println("At line " + ex.getMessage());
                   System.err.println("+================================+");
              }**/ catch (SAXException ex) {
                   System.err.println("+================================+");
                   System.err.println("|          *SAX Error*           |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   System.err.println("+================================+");
              /*}} catch (SAXNotRecognizedException  ex) {
                   System.err.println(" no SAX");*/
              } catch (ParserConfigurationException ex) {
                   System.err.println(" ???");
               } catch (IOException ex) {
                   System.err.println("+================================+");
                   System.err.println("|           *XML Error*          |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
    private static class JFileChooserrv {
         JFileChooserrv(JFrame f, boolean vverabreiten) {
              String openfile;
              String verror;
              boolean validate = true;
              final JFrame frame = f;
              String vFilename = "Z:\\Boorberg\\parsen_vista\\daten";
              //String vFilename = "C:\\";
              File vFile = new File(vFilename);
              final JFileChooser chooser = new JFileChooser(vFile);
              JFileFilter filter = new JFileFilter();
              filter.addType("xml");
              filter.addType("sgml");
              filter.addType("html");
              filter.addType("java");
              filter.setDescription("strukturfiles");
              chooser.addChoosableFileFilter(filter);
              boolean vjeas = true;
              chooser.setMultiSelectionEnabled(vjeas);
              int returnVal = chooser.showOpenDialog(frame);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   //Array  filearry[] = chooser.getSelectedFiles();
                   //if (vFile = chooser.getSelectedFiles()) {
                   //File  file[] = chooser.getSelectedFiles();
                   File  vfile[] = chooser.getSelectedFiles();
                   //String openfile = new String();
                   int vlenght = vfile.length;
                   if (vlenght>1) {
                        int x=0;
                        while (x< vlenght) {
                                  parse(vfile[x], validate);
                                  x = x +1;
                   if (vlenght<=1) {
                        File v2file = chooser.getSelectedFile();
                             parse(v2file, validate);
              } else {
                   System.out.println("You did not choose a filesystem           object.");
         System.exit(0);
    private static class JFileFilter extends javax.swing.filechooser.FileFilter {
         protected String description, vnew;
         protected ArrayList<String> exts = new ArrayList<String>();
         protected boolean vtrue;
         public void addType(String s) {
              exts.add(s);
         /** Return true if the given file is accepted by this filter. */
         public boolean accept(File f) {
              // Little trick: if you don't do this, only directory names
              // ending in one of the extentions appear in the window.
              if (f.isDirectory()) {
                   return true;
              } else if (f.isFile()) {
                   Iterator it = exts.iterator();
                   while (it.hasNext()) {
                        if (f.getName().endsWith((String)it.next()))
                             return true;
              // A file that didn't match, or a weirdo (e.g. UNIX device file?).
              return false;
         /** Set the printable description of this filter. */
         public void setDescription(String s) {
              description = s;
         /** Return the printable description of this filter. */
         public String getDescription() {
              return description;
    private static class MyErrorHandler implements ErrorHandler {
            // Error handler output goes here
            private PrintStream out;
            MyErrorHandler(PrintStream out) {
                this.out = out;
             * Returns a string describing parse exception details
            private String getParseExceptionInfo(SAXParseException spe) {
                String systemId = spe.getSystemId();
                if (systemId == null) {
                    systemId = "null";
                String info = "URI=" + systemId +
                    " Line=" + spe.getLineNumber() +
                    ": " + spe.getMessage();
                return info;
            // The following methods are standard SAX ErrorHandler methods.
            // See SAX documentation for more info.
            public void warning(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                //out.println("Warning: " + getParseExceptionInfo(spe));
            public void error(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                String message = "Error: " + getParseExceptionInfo(spe);
                throw new SAXException(message);
            public void fatalError(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                String message = "Fatal Error: " + getParseExceptionInfo(spe);
                throw new SAXException(message);
         public static void main(String[] av) {
              JFrame vframe = new JFrame("chose files to pars");
              boolean vverabreiten = true;
              boolean validate = true;
              JFileChooserrv vdateienwaehlen = new JFileChooserrv(vframe, vverabreiten);
    }The Stack Trace i posted in the last Message. But i couldn't read it, i am not a programmer.

  • Exception with javax.xml.parsers.FactoryConfigurationError

    I have a code segment that is working in a Java standalone application environment. I've taken the same segment and ran it in Lotus Domino's environment, with the following error,
    javax.xml.parsers.FactoryConfigurationError: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
    Can anyone help?

    I changed a switch within the Lotus Domino environment to allow class loader, but now I'm getting a different error,
    javax.xml.parsers.FactoryConfigurationError: Provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found
    Any idea?

  • Package javax.xml.parsers does not exist

    When I compile the sample program for xml, DOMEcho.java, or any other xml java program, I get errors on the import statements.
    For all the import statements within java.xml.* I get an error message such as: package javax.xml.parsers does not exist.
    I have my path and classpath variables set as follows.
    REM Java initialization
    SET PATH=c:\Documents and settings\User\jwsdp-1_0_01\bin;c:\j2sdkee1.3.1\bin;c:\jdk1.3.1_01\bin;%PATH%
    SET JAVA_HOME=c:\j2sdkee1.3.1_01
    SET JAVA_XML_PACK_HOME=c:\java_xml
    SET JAXM_HOME=c:\java_xml\java_xml_pack-summer-02_01\jaxm-1.1_01
    SET JAXP_HOME=c:\java_xml\java_xml_pack-summer-02_01\jaxp-1.2_01
    SET JAXR_HOME=c:\java_xml\java_xml_pack-summer-02_01\jaxr-1.0_02
    SET JAXRPC_HOME=c:\java_xml\java_xml_pack-summer-02_01\jaxrpc-1.0_01
    SET CLASSPATH=c:\Documents and settings\User\jwsdp-1_0_01\bin;c:\Documents and settings\User\jwsdp-1_0_01
    SET CLASSPATH=%CLASSPATH%;c:\jdk1.3.1_01\bin;c:\jdk1.3.1;
    SET CLASSPATH=%CLASSPATH%;c:\java_xml\java_xml_pack-summer-02_01\jaxm-1.1_01;
    SET CLASSPATH=%CLASSPATH%;c:\java_xml\java_xml_pack-summer-02_01\jaxp-1.2_01;
    SET CLASSPATH=%CLASSPATH%;c:\java_xml\java_xml_pack-summer-02_01\jaxr-1.0_02;
    SET CLASSPATH=%CLASSPATH%;c:\java_xml\java_xml_pack-summer-02_01\jaxrpc-1.0_01
    Any ideas?

    Now that the first program compiled I tried another sample program:
    StandAlone.java and
    got the same errors.
    * $Id: StandAlone.java,v 1.10 2002/04/06 00:47:31 mode Exp $
    * $Revision: 1.10 $
    * $Date: 2002/04/06 00:47:31 $
    * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    This program starts with...
    import java.io.*;
    import javax.xml.soap.*;
    import java.net.URL;
    import javax.mail.internet.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import org.dom4j.*;
    * A StandAlone JAXM Client.
    public class StandAlone {

  • Javax.xml.parsers not found in import

    I have downloaded JAXP from java.sun.com. I put the jar files in ../jdk/jre/lib/ext/.
    Im getting "javax.xml.parsers not found in import" when I try to compile a program with an import statement like this:
    import javax.xml.parsers.*;
    What am i missing? My classpath has ../jdk/jre/lib/ext/ in it..

    I have downloaded JAXP from java.sun.com. I put the
    jar files in ../jdk/jre/lib/ext/.
    Im getting "javax.xml.parsers not found in import"
    when I try to compile a program with an import
    statement like this:
    import javax.xml.parsers.*;
    What am i missing? My classpath has
    ../jdk/jre/lib/ext/ in it..Hi,
    This seems to be a classpath problem. You can also use JDK1.4.1
    which has crimson bundled with it. So you do not need to do any explicit settings for classpath.
    Pls let me know if you still have problems
    Thanks,
    Bhakti

  • Javax.xml.parsers Parser Failes at URGENT..URGENT.

    Hai,
    I am using JAVA PARSER to parse my xml file. My XML file is :
    <QUERY>SELECT * FROM EMP WHERE EMP_DATE > 18/10/2000</QUERY>.
    My Sample Code is:
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.DOMException;
    factory = DocumentBuilderFactory.newInstance();
    builder = factory.newDocumentBuilder();
    fistream = new FileInputStream(fileName);
    document = builder.parse(fistream);
    e=document.getDocumentElement();
    curElm = (Element)nodeList.item(0);
    return_Value =((Text)curElm.getFirstChild()).getData().trim();
    Giving wrong output:
    SELECT * FROM EMP WHERE EMP_DATE
    Activally, I had to get
    SELECT * FROM EMP WHERE EMP_DATE > 18/10/2000.
    I do not know what's went wrong ?
    Please help me. It is very urgent to my project.
    Thanks a lot
    Regards
    Suresh

    hi,
    <, >, &, " and ' are XML control characters and do not belong to the data an XML document reflects. if you want to use these special characters, try a different notation, i.e. < > & " or &apos; as in
    <element>this is an <element> tag</element>
    sincerely, Michael

  • Where can i find "javax.xml.parsers"

    Hello Every One, H R U Doing
    I wan 2 parse XML data in JAVA Application, i found an example which was quite clear but that example uses
    import javax.xml.parsers.*;
    But at compile time exception is thrown that this package does not exist,
    Please tell me where can i find this package.
    Thanx in Advance,
    Azhar Javaid

    It's in the jaxp-api.jar from the JAXP installation.

  • NoSuchMethod: javax.xml.parsers.SAXParserFactory.getSchema()

    Hi All,
    In a servlet I have created a SOAPMessage object based on the request received, and when I execute
    message.getSOAPBody I get the message:
    java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()
    I am running tomcat with jdk 1.5 and I am using saaj-api.jar, saaj_imp.jar and Fastinfoset.jar from jwsdp 1.6
    Anyone got any ideas what to do ?
    Kind regards,
    Marco Laponder

    Along with jdk1.4.2, Sun has bundled a currently ancient version of JAXP.
    So, get a recent version of a JAXP implementation (e.g. with JWSDP1.6), probably contained in jar-files called jaxp-api.jar, dom.jar, sax.jar, xalan.jar and xercesImpl.jar, and add these to your classpath when you're compiling/running.
    You're not done yet! Because the old jaxp libraries are bundled with your JVM, the classloader will find them through your bootclasspath, and they will be prefered above the new implementation you just added to the classpath. To resolve this, the JVM creators came up with the endorsed mechanism. This allows you to provide new classes for a list of predefined packages. These classes are already included in the jvm distribution, but are foreseen to be updated. See for more information about the endorsed mechanism: http://java.sun.com/j2se/1.4.2/docs/guide/standards/ .
    So to be short, you also have to make the jvm recognise them as endorsed libraries. E.g. by adding them to the <java-home>/lib/endorsed directory or by setting the java.endorsed.dirs property to the directories which include the new jar files.
    Your commandline to run app.class would become: java -Djava.endorsed.dirs=/home/endorsedDir;/anotherDir app

  • Format of  "META-INF/services/javax.xml.parsers.SAXParserFactory"

    Hi there,
    I have written an applet utilizing JAXP. Now the applet does hit the server with requests to
    "META-INF/services/javax.xml.parsers.SAXParserFactory", which off course produces a 404-error.
    What is the best way to get rid of this unnecessary request in an Applet?
    - I can't set the property, because I do not know which xml-parser implementation is available at the client .
    - I can't rely on lib/jaxp.properties, obviously!
    - I could not find any conclusive information about the format of this request. It says in the Javadoc, a file at this location is used to determine the Factory? waht is the Format of this file? What should it contain?
    - The applet works fine, as it defaults to the system factory anyway.
    However, the request brings an extra delay in the applet, which I just do not need. I also do not want to download my preferred xml-parser, I want ot use, what ever is installed on the client.
    Any idea what to do?
    Thanks
    Kaj
    Chief Designer at Conficio.com
    What is your Plan-B? We just released Plan-B 2.1

    Thanks!
    Thanks for the fast reply. I don't know if I made my point clear.
    I do not want to determine the parser by myself. I want the client system use the default parser, so I do not have the hit of downloading the fairly large parser jar.
    However, I want it not to do an empty request to the server for nothing. This turn around time kills an Applet. I want a fast loading applet!
    I'll go in trial and error mode, when I find the time next week.
    Thanks again, I appreciate it!
    K<o>

  • Error importing Javax.xml.parsers.*. what should I do?

    I can not import the javax.xml.parsers.*.
    could you please let me know what should i do?
    Thanks

    Ummm... the classes of javax.xml.parsers are a part of the 1.4 API (they don't exist in 1.3.x) but if you somehow have got them it's again one of those classpath problems.
    How is it? Have you downloaded the package from somewhere?

  • Javax.xml.parsers.SAXParserFactory

    Hi,
    where i can find this parameter "javax.xml.parsers.SAXParserFactory ", i want to remove this parameter from configtool or from oslevel but i could not find this parameter.
    The parameter is effecting when we are applying KM related forums in portal,so i need to remove or change that parameter
    I have search in java level "lib/jaxp.properties" in the JRE directory.
    And I have searched in the Services API will look for a classname in the file META-INF/services/javax.xml.parsers.SAXParserFactory in
    jars available to the runtime. But I didn’t get the parameter javax.xml.parser.SAXParserFactory.
    The parameter is effecting when we are applying KM related forums in portal,so i need to remove or change that parameter
    the thing is in portal ->system information>system properties we will find the
    parameter javax.xml.parsers.SAXParserFactory =com.inqmy.lib.jaxp.SAXParserFactoryImpl
    and also we have the
    org.xml.sax.driver = com.sap.engine.lib.xml.parser.SAXParser
    we need org.xml.sax.driver = com.sap.engine.lib.xml.parser.SAXParser
    we have to remove the parameter parameter javax.xml.parsers.SAXParserFactory =com.inqmy.lib.jaxp.SAXParserFactoryImpl in system properties.
    And also i want to edit system properties in portal, where we can do this.
    thanks and regards,
    jagadish

    Hi Jagadishwar,
    You can change this kind of configuration using the Config Tool: [Configuring Instance Properties|http://help.sap.com/saphelp_nw04s/helpdata/en/00/3ca3e81b5a4c749b860ab1ed1fb206/frameset.htm]
    But please be VERY careful when changing this kind of standard configuration. Personally I would not recommend it. It's used by and likely required by the underlying J2EE engine/portal, e.g. reading configuration files when starting up. Unless you really know what you're doing, don't be surprised you get into a lot of trouble.
    Kind regards,
    /Sigiswald

  • Javax.xml.parsers package

    I am not able to find the javax.xml.parsers package even after installing J2EESDK on top of Jdk1.3 . Can any one point me to the right place to download this package?
    Thanks

    The said package is part of Java API for XML Processing. i.e. JAXP
    If you use J2EE SDK 1.3, the said package comes with the SDK. So you should find it in j2ee.jar
    Maybe its just that you do not have j2ee.jar in your classpath.
    If you are using J2EE SDK 1.2.1, you will have to downaload and install JAXP http://java.sun.com/xml/download.html

Maybe you are looking for