URGENT:  javax.xml.parsers.DocumentBuilder.parse() method issue

Hi folks,
I have an urgent parsing problem. I developed an app with JDK1.4 and now it needs to run on JDK1.3.1. The problem is this:
If I use the DocumentBuilder.parse() method shipped with JDK1.4 it will parse a document containing namespaces WITHOUT a namespace declaration in the root element. However, since XML support doesn't ship with JDK1.3.1 I need to use JAXP. If I try this with the DocumentBuilder.parse() version shipped with JAXP (latest version) the parse method throws a NullPointerException. If I put the namespace declaration in the document it will parse fine. I tried setting the DocumentBuilderFactory.setNamespaceAware() explicitly to false (should be the default) but no luck. Any ideas other than adding the declaration (long story why I don't want it there...)
thanks

example, with declaration of namespace:
<?xml version="1.0" encoding="UTF-8"?>
<pre:root xmlns:inn="http://blablabla/inn/version/1.0/">
<pre:metadata>
<pre:dublin-core>
<pre:title>mytitle</pre:title>
<pre:description>mydesc</pre:description>
<pre:creator>bjmann</pre:creator>
</inn:dublin-core>
</pre:root>
example, without declaration:
<?xml version="1.0" encoding="UTF-8"?>
<pre:root>
<pre:metadata>
<pre:dublin-core>
<pre:title>mytitle</pre:title>
<pre:description>mydesc</pre:description>
<pre:creator>bjmann</pre:creator>
</inn:dublin-core>
</pre:root>
this may help...

Similar Messages

  • 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.

  • 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.

  • Javax.xml.parsers.DocumentBuilder to skip invalid XML characters?

    Hi,
    I convert XML files into flat files. In doing so I call the API DocumentBuilder.parse(File f). If the XML file f contains an invalid XML character, the API throws a SAXException.
    My question is: while I know that certain invalid XML chars are not part of the data and therefore can be safely ignored in the conversion, is there a way to tell the API to skip those chars?

    Nope. Compliant XML parsers are required to parse the XML as it is and not to "repair" it in any way. Your best option is not to have badly-formed XML in the first place, so if you are the one generating the XML, you should fix that process. But if you have bozo customers generating it, and you can't make them do it right, then pre-process the XML to drop the bad characters.

  • How can I parser a String with javax.xml.parsers.DocumentBuilder?

    Normally the DocumentBuilder can parse files, InputSource,InputStream or uri. but what if I want to parse an editing String the user created in an EditPane or JTextComponent?

    new InputSource(new StringReader(theString))

  • 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

  • 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>

  • 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?

  • 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.

  • 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.

  • 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>

  • 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

  • Slow performance with javax.xml.ws.Endpoint.publish method

    I've published an endpoint on my computer with the javax.xml.ws.Endpoint.publish method. When I'm load testing my endpoint on the local machine, with the client side in another jvm, the endpoint reacts very fast (server side(endpoint) and the client side on the same computer). There's not performance problem there.
    But when I try to run a load test with the server side endpoint on my local computer and the client side on another computer the endpoint reacts slow, very slow compared to the local scenario. Instead of 500 requests / second I get like 3 requests / second. Why?
    When I look at the traffic between the client and the server running on different machines it's like 4,5 kB/sec on a 100Mbit connection. And almost no cpu activity (neither server or client).
    When I've a web server, like Tomcat or Sun Java Application Server and deploy my endpoint there the traffics goes up to 400kB/sec. So then it works fine with good performance over the same network, same ip address, same port and everything.
    Why is my endpoint so slow when I publish it with javax.xml.ws.Endpoint.publish instead of on a for example Tomcat. And why is the endpoint fast when I'm running client and server on the same machine?

    the timeout is a client side thing, most likely. you need to set the http request timeout on the client.

  • 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 {

Maybe you are looking for

  • Goods return not possible for Del. w/o charge: Mvmt type 511

    Hi I've received free goods from Vendor using movement Type 511. Goods Return with reference to this entry cannot be carried out through MIGO -->Return Delivery. System issues Error Message MIGO029:"The mvt type in the reference docmt cannot be conve

  • Auto Start Sequence in Full UI

    I am building an application and using the full user interface example as a starting point.  I reviewed the example Dynamic Client Sequence File and have implemented a LabVIEW VI that  selects one sequence from a list and then dynamically loads this

  • What is documents and data in storage?

    My iPhone 4S has been threatening with being full for ages and I just don't have that much stuff on it. Photos, videos, apps, and music all account for less than half of the 16gb space on the phone. When I plugged it in to back up my files (since it

  • Configuration tool

    Do any one can expalin me about the configuration tool and give any link for guide line purpose

  • ITunes for other countries

    I can't seem to find the music store for iTunes for countries other than the US/Canada. They seem to only have apps, and no front page with all the music ads like the US/Canada stores. Is this because they don't have non-English songs for sale in iTu