XML parsing regressing from Java 1.4 to 1.5

Hi,
I have a piece of code using Jakarta digester. This piece of code is prety simple and was working fine until I switched from java 1.4 to java 1.5. However, i didn't changed the Digester jar.
After investigation, I noticed that the problem disappear if i remove the DOCTYPE entry from the XML file I'm parsing.
Is there any known regression ?
Thanks =P
Stack Trace
java.net.UnknownHostException: D
     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
     at java.net.Socket.connect(Socket.java:507)
     at java.net.Socket.connect(Socket.java:457)
     at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
     at sun.net.NetworkClient.openServer(NetworkClient.java:118)
     at sun.net.ftp.FtpClient.openServer(FtpClient.java:488)
     at sun.net.ftp.FtpClient.openServer(FtpClient.java:475)
     at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:270)
     at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:352)
     at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
     at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
     at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
     at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1021)
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)Error while getting input files description. Process aborted.
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
     at org.apache.commons.digester.Digester.parse(Digester.java:1556)
     at com.wwdm.datahandle.TransformDescriptorFactory.getTransformer(TransformDescriptorFactory.java:99)
     at mainTest.main(mainTest.java:29)
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE descriptor SYSTEM "file://D:/dtds/WWDM_Input.dtd">
<descriptor>
</description>
------

I made an error in my XML while posting... so just to avoid replies telling it cames from there :
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE descriptor SYSTEM "file://D:/dtds/WWDM_Input.dtd">
<descriptor>
</descriptor>

Similar Messages

  • Can I use a C/C++ xml parser in my java program?

    Hi,
    How can I use a C/C++ xml parser in my java program?
    Elvis.

    You would still need to convert the XML data structure into a Java data structure to import it into Java.
    Don't assume you need C++ to do anything. I woudl write it in Java first, then profile the application to see where the bottle necks are and then optimise them
    Don't optimise code unless you have proof it needs to be optimised.
    If you want to improve the speed of reading XML, try XMLbooster

  • Printing xml spreadsheet file from java

    Does anyone know if it is possible to print an xml spreadsheet file directly from java.
    I'm quite new to java and any help would be greatly appreciated.
    Thanks in advance.

    Does anyone know if it is possible to print an xml
    spreadsheet file directly from java.
    I'm quite new to java and any help would be greatly
    appreciated.
    Thanks in advance.Are you crazy, mad or stupid???
    Just messing.....
    If you're new to Java then don't bother. Otherwise try [url http://jakarta.apache.org/poi/index.html]here for jakarta's API.
    Honestly though, if you're not new to programming then fair enough. BUT, if you are new to Java and programming then acknowledge the fact you'll have to whack yourself alot before u get anywhere.
    Ted.

  • Accessing XML Publisher Reports from Java application

    How to accesss the XDO Reports from Java application?
    I am wondering that we need to get the URL for accessing the report and call the URL with in Java program?
    Is that right? Is there any other option? Any help is greatly appreciated.

    You need to write some class based on the BI Publisher APIs taking data, template, output format, etc.
    Pehaps the following Blog of Tim Dexter shines some light on your question
    http://blogs.oracle.com/xmlpublisher/2007/02/27#a166
    Marcos

  • XML data source from Java application

    Hello everyone,
    I want to use BI Publisher reports from my Java application.
    1. I have generated xml from database query in Java application.
    2. I have created BIP template sampleReport.rtf
    3. I need to generate PDF report using sampleReport.rtf and generated xml data source.
    How this (step 3) can be achieved using BI publisher web service? If someone has sample code, this would be great.
    Thanks.

    Hello everyone,
    I want to use BI Publisher reports from my Java application.
    1. I have generated xml from database query in Java application.
    2. I have created BIP template sampleReport.rtf
    3. I need to generate PDF report using sampleReport.rtf and generated xml data source.
    How this (step 3) can be achieved using BI publisher web service? If someone has sample code, this would be great.
    Thanks.

  • Calling XML API's from Java Stored Procedures in DB

    Hi,
    I am have and Oracle 10gR2 db installed and XML Publisher Enterprise Server 5.6.2.
    I have created the following Java Class and used loadjava to make it a Java Stored Procedure:
    <code>
    import java.io.IOException;
    import java.lang.Object;
    import oracle.apps.xdo.XDOException;
    import oracle.apps.xdo.template.FOProcessor;
    import oracle.apps.xdo.template.RTFProcessor;
    public class callingXMLP{
    public static String rtfToXsl(String rtfFile, String xslFile)
    try {
    RTFProcessor rtfProcessor = new RTFProcessor(rtfFile); //Input RTF
    rtfProcessor.setOutput(xslFile);
    rtfProcessor.process();
    } catch (IOException IOE) {
    return" Error "+IOE.getMessage();}
    catch(XDOException XDE ){
    return" Error "+XDE.getMessage();
    return "Success";
    public static String mergeXmlXsl(String xmlFile, String xslFile, String outputFile)
    FOProcessor processor = new FOProcessor();
    processor.setData(xmlFile); //Input XML File
    processor.setTemplate(xslFile); //Input XSL File
    processor.setOutput(outputFile); //Ouput File
    processor.setOutputFormat(FOProcessor.FORMAT_PDF);
    //start processing
    try {
    processor.generate();
    catch (XDOException e){
    e.printStackTrace();
    //System.exit(1);
    return "Error - "+e.getMessage();
    //System.exit(0);
    return "Success";
    </code>
    I then wrap this using the following function spec in pl/sql:
    create or replace function callXMLP(input1 VARCHAR2, output1 VARCHAR2) RETURN VARCHAR2
    as language java name 'callingXMLP.rtfToXsl(java.lang.String,java.lang.String) return java.lang.String';
    and
    create or replace function mergeXMLXSL(xml VARCHAR2, xsl VARCHAR2, output VARCHAR2) RETURN VARCHAR2
    as language java name 'callingXMLP.mergeXmlXsl(java.lang.String,java.lang.String,java.lang.String) return java.lang.String';
    Calling the callXMLP function works fine, and produces an XSL file from the input RTF file as expected.
    When I run the mergeXMLXSL function, it says that the function has completed successfully, but it seems to be throwing an XDOException error as it is returning "Error - null" message from the Java.
    A PDF document is being created, but it does not have any content. I have also modified the Java to create an RTF instead, but still the same thing happens.
    Is there anything that I need to check, or something that I am missing when trying to create the final PDF document?
    Please help, I am completely stuck with this now.
    Many Thanks,
    Cj

    Hello Chris,
    I have been able to create a PDF from the database. I loaded the following jar files and removed any java class that could not compile.
    activation.jar, axis-ant.jar, axis.jar, axis-schema.jar, bicmn.jar, bipres.jar, collections.jar,
    commons-beanutils.jar, commons-collections-3.1.jar, commons-collections.jar, commons-dbcp-1.1.jar commons-digester.jar, commons-discovery.jar, commons-el.jar, commons-fileupload.jar, commons-logging-api.jar commons-logging.jar, commons-pool-1.1.jar, http_client.jar, i18nAPI_v3.jar, javamail.jar, jaxrpc.jar,
    jewt4.jar, jsp-el-api.jar, log4j-1.2.8.jar, logkit-1.2.jar, ojpse.jar, oracle-el.jar, oraclepki.jar,
    orai18n.jar, quartz-1.5.1.jar, quartz-oracle-1.5.1.jar, regexp.jar, saaj.jar, service-gateway.jar, share.jar, uix2.jar, uix2tags.jar, versioninfo.jar, wsdl4j.jar, xdocore.jar, xdoparser.jar, xdo-server-delivery-1.0-SNAPSHOT.jar, xdo-server-kernel-0.1.jar, xdo-server-kernel-impl-0.1.jar, xdo-server-scheduling-1.0-SNAPSHOT.jar, xercesImpl.jar, xmlparserv2-904.jar, xmlpserver.jar, xsu12.jar
    I needed to copy the XML Publisher fonts to the database server and ran the following java grants, note my $ORACLE_HOME is /opt/app/oracle/product/10.1.0/
    dbms_java.grant_permission('XMLP', 'java.util.PropertyPermission', '*', 'read,write');
    dbms_java.grant_permission('XMLP', 'java.net.SocketPermission', '*', 'connect, resolve');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/tmp/*', 'read, write, delete');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/fonts/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.lang.RuntimePermission', 'setFactory', '');
    George

  • Accessing XML API's from Java Stored Procedures in DB

    I am working in an environment that does not contain any Oracle applications and we have been looking at XML publisher as a stand alone service. I have successfully configured the UI and created some command line java programs to produce documents and deliver these documents.
    How do I install (do I need to install) XML Publisher java in the database in order to access XML Publisher API's from stored procedures. Any clues or help would be gratefully appreciated.
    George

    Hello Chris,
    I have been able to create a PDF from the database. I loaded the following jar files and removed any java class that could not compile.
    activation.jar, axis-ant.jar, axis.jar, axis-schema.jar, bicmn.jar, bipres.jar, collections.jar,
    commons-beanutils.jar, commons-collections-3.1.jar, commons-collections.jar, commons-dbcp-1.1.jar commons-digester.jar, commons-discovery.jar, commons-el.jar, commons-fileupload.jar, commons-logging-api.jar commons-logging.jar, commons-pool-1.1.jar, http_client.jar, i18nAPI_v3.jar, javamail.jar, jaxrpc.jar,
    jewt4.jar, jsp-el-api.jar, log4j-1.2.8.jar, logkit-1.2.jar, ojpse.jar, oracle-el.jar, oraclepki.jar,
    orai18n.jar, quartz-1.5.1.jar, quartz-oracle-1.5.1.jar, regexp.jar, saaj.jar, service-gateway.jar, share.jar, uix2.jar, uix2tags.jar, versioninfo.jar, wsdl4j.jar, xdocore.jar, xdoparser.jar, xdo-server-delivery-1.0-SNAPSHOT.jar, xdo-server-kernel-0.1.jar, xdo-server-kernel-impl-0.1.jar, xdo-server-scheduling-1.0-SNAPSHOT.jar, xercesImpl.jar, xmlparserv2-904.jar, xmlpserver.jar, xsu12.jar
    I needed to copy the XML Publisher fonts to the database server and ran the following java grants, note my $ORACLE_HOME is /opt/app/oracle/product/10.1.0/
    dbms_java.grant_permission('XMLP', 'java.util.PropertyPermission', '*', 'read,write');
    dbms_java.grant_permission('XMLP', 'java.net.SocketPermission', '*', 'connect, resolve');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/tmp/*', 'read, write, delete');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/fonts/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.lang.RuntimePermission', 'setFactory', '');
    George

  • Parsing HTML from Java, How

    Problem:
    I need to Connect to a URL using Java.
    Then i need to detect/ parse the html of the url for Image contents
    *So that i can replace some thing rather than the image such as with the text [IMAGE].*
    I already able to connect and read the htmls of url. But i need ur help regarding parsing for image links.
    Just i need to parse the html page to sense image links/contents on that page.
    How it can be done?

    hi shazzad,
    Could you please try with this,
    * XsdReader.java
    * Created on September 12, 2008, 11:36 AM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package EDITool;
    import java.io.File;
    import java.io.IOException;
    import java.util.Hashtable;
    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.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    * @author Rajesh
    public class XsdReader {
        /** Creates a new instance of XsdReader */
        private DocumentBuilder docBuilder;
        private Document doc;
        private DocumentBuilderFactory docBuilderFactory;
        private File xsdFile;
        private File xmlFile;
        private Hashtable dataList;
        private String modXML = "";
        public XsdReader() {
            docBuilder = null;
            doc = null;
            docBuilderFactory = DocumentBuilderFactory.newInstance();
            try{
                    docBuilder = docBuilderFactory.newDocumentBuilder();
            catch(ParserConfigurationException e)
                    System.out.println("Wrong parser configuration: " + e.getMessage());
            this.xsdFile = null;
            this.xmlFile = null;
            dataList = new Hashtable();
        public class Attr{
        private String minOccurs;
        private String maxOccurs;
        public Attr(String minOccurs, String maxOccurs)
                this.minOccurs = minOccurs;
                this.maxOccurs = maxOccurs;
        public void xsdParser(String xsdInputFileName,int level)
            try{
                this.xsdFile = new File(xsdInputFileName);
            catch(Exception e)
                System.out.println("File Not Exception: "+e);
            try{
              doc = docBuilder.parse(this.xsdFile);
                    NodeList nodeList = doc.getChildNodes();
                    xsdRecursive(nodeList,level);
         catch(SAXException e)
              System.out.println("Wrong XML file structure: " + e.getMessage());
         catch(IOException e)
              System.out.println("Wrong XML file structure: " + e.getMessage());
         catch(Exception e)
              System.out.println("Error: "+e);
        public void xsdRecursive(NodeList nodeList, int level)
            try{
              for(int i=0;i<nodeList.getLength();i++)
                   Node node = nodeList.item(i);
                   if(node.getNodeType() == node.ELEMENT_NODE  && level == 1)
                        if(node.hasAttributes())
                             Element e = (Element)node;
                             String minOccursValue = e.getAttribute("minOccurs");
                             if(!minOccursValue.equals(""))
                                  String name = e.getAttribute("name");
                                  if(name.equals(""))
                                  name = e.getAttribute("ref");
                                  if(name.equals(""))
                                  continue;
                                  String minOccurs = e.getAttribute("minOccurs");
                                  String maxOccurs = e.getAttribute("maxOccurs");
                                  System.out.println(name);
                                  this.dataList.put(name,new Attr(minOccurs,maxOccurs));
                            else if(node.getNodeType() == node.ELEMENT_NODE  && level == 2)
                                String currentTagName = node.getNodeName();
                                Attr attr = (Attr)this.dataList.get(currentTagName);
                                NamedNodeMap nodeAttr = node.getAttributes();
                                org.dom4j.Node dom4jNode = (org.dom4j.Node) node;
                                org.dom4j.Element e = (org.dom4j.Element) dom4jNode;
                                e.addAttribute("min", attr.minOccurs);
                                e.addAttribute("max", attr.maxOccurs);
                   if(node.hasChildNodes())
                   xsdRecursive(node.getChildNodes(),level);
              catch(Exception e)
                   System.out.println("Error: "+e);
        public void xsdRecursive(Node node, int level)
            NodeList nodeList = node.getChildNodes();
            try{
                for(int i=0;i<nodeList.getLength();i++)
                if(node.getNodeType() == Node.ELEMENT_NODE )
                   // if(level == 1)
                    if(node.hasAttributes())
                        Element e = (Element)node;
                        String minOccursValue = e.getAttribute("minOccurs");
                        if(!minOccursValue.equals(""))
                                String name = e.getAttribute("name");
                                if(name.equals(""))
                                name = e.getAttribute("ref");
                                String minOccurs = e.getAttribute("minOccurs");
                                String maxOccurs = e.getAttribute("maxOccurs");
                                System.out.println(name);
                                this.dataList.put(name,new Attr(minOccurs,maxOccurs));
                    else if(level == 2)
                    System.out.println("rajesh");
                    String currentTagName = node.getNodeName();
                    Attr attr = (Attr)this.dataList.get(currentTagName);
                    NamedNodeMap nodeAttr = node.getAttributes();
                    org.w3c.dom.Attr minAttr = ((Document)node).createAttribute("min");
                    minAttr.setValue(attr.minOccurs);
                    org.w3c.dom.Attr maxAttr = ((Document)node).createAttribute("max");
                    minAttr.setValue(attr.maxOccurs);
                    Element e =(Element)node;
                    System.out.println(e.getNodeName()+"\t"+e.getAttribute("min"));
            catch(Exception e)
                System.out.println("Exception in xsdRecursive: "+e);
        public void display()
            Attr attr = (Attr) this.dataList.get("ISA01");
            System.out.println(attr.maxOccurs+"\t"+attr.minOccurs);
        public static void main(String s[])
            XsdReader xsdReader = new XsdReader();
            //String xsdInputFileName = "C:/Documents and Settings/vs73471/Documents/SAP/workspace/Sample/src/packages/com/sap/java/Copy of 850.xml";
            String xsdInputFileName = "C:/Documents and Settings/vs73471/Desktop/www.html";
            xsdReader.xsdParser(xsdInputFileName, 1);
            System.out.println(xsdReader.dataList.size());
            String xmlInputFileName = "C:/Documents and Settings/vs73471/Desktop/Reference XML Generate/850_Dummy.xml";
            xsdReader.xsdParser(xmlInputFileName, 2);
          //  xsdReader.display();
    }

  • How2 create xml & ent  files from JAVA? (xml that gets data from ent file)

    Is there any API that can make it easy?
    * For parsing XML I use JDOM parser
    I want to create file like this:
    XML file: some.xml
    <?xml version="1.0"?>
    <!DOCTYPE xfat [
    <!ENTITY  d_request SYSTEM  "some.ent">
    ]>
    <!--
    /home/bNUMBER/Programs/XFAT/runxfat some.xml
    -->
    <xfat title = 'Fat Title (some) '>
    <database  filename = 'Some_Data/some.xml'/>
    <snc  filename  = "../snc/snc.xml"/>
    <configuration sp = '../sp/some_only.xml' name='Some_A-H'>
       &d_request;
    </configuration>
    </xfat>and ent file:
    <ddef title    = 'some d def title (some)'>
         <dcalc  snc    = '7_A9'
                meas   = 'm73'
                red    = 'GOOD' binval='MCMS' lug='YES'/>
    </ddef>

    has anyone idea what to search?

  • How to read xml node content from java[ urgent]

    My tag is
    <person1> a="hello">
    <person><first>Steve</first></person>
    </person1>
    I want if i read <person1> tag then it store its inner content in a string.
    i.e my output should be
    <person><first>Steve</first></person>

    Hi, parse the file using dom.then print out the root tag.you will have to strip the indentation this way.or you could use sax.

  • ANN: XML Class Generator for Java Available

    The Oracle XMCL Class Generator for Java is now available as an
    initial beta release on the Oracle Technology Network at
    http://technet.oracle.com. Select 'xml' from the Technology menu.
    The XML Class Generator will generate a set of Java source files
    based on an input DTD. The generated Java source files can then
    be used to construct, optionally validate, and print a XML
    document that is compliant to the DTD specified. This is an early
    beta release and has the following features:
    * Creates Java Classes from DTDs to enable the programmatic
    construction of XML documents.
    * Supports validation mode to assist debugging.
    * Works with the Oracle XML Parser in Java.
    * Creates documents conforming to the W3C XML 1.0
    Recommendation.
    * Supports creating documents in the following encodings:
    UTF-8
    UTF-16
    ISO-10646-UCS-2
    ISO-10646-UCS-4
    US-ASCII
    EBCDIC-CP-US
    ISO-8859-1
    Shift_SJIS
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    Thanks,
    Rob
    Oracle XML Team wrote:
    : First, the link has been fixed. As to your access exception,
    we
    : have traced it to a difference between JDK 1.1.x and JDK 1.2.
    : You can solve it by using a 1.1.x version of the JDK or wait
    till
    : our production version of our XML Parser becomes available
    within
    : a week which will work with 1.2.
    : Oracle XML Team
    : http://technet.oracle.com
    : Rob Edagr (guest) wrote:
    : : 1) The HREF on the download page for the NT version points
    to
    : : the version 102 parser not the classgen.
    : : 2) After downloading and installing the classgen (by
    guessing
    : : what the url was) I ran it and get the following
    : : C:\jdk1.2\xml\ora\classgen\sample>java SampleMain -root
    : : wddxPacket wddx_0090.dtd
    : : Exception in thread "main" java.lang.IllegalAccessError: try
    to
    : : access class oracle/xml/parser/XMLNode from class
    : : oracle/xml/classgen/ClassGenerator
    : : at oracle.xml.classgen.ClassGenerator.generate
    (Compiled
    : : Code)
    : : at SampleMain.main(SampleMain.java:65)
    : : Any idea on what the problem is (same error with sample dtd)
    : : Rob
    : : Oracle XML Team wrote:
    : : : The Oracle XMCL Class Generator for Java is now available
    as
    : : an
    : : : initial beta release on the Oracle Technology Network at
    : : : http://technet.oracle.com. Select 'xml' from the
    Technology
    : : menu.
    : : : The XML Class Generator will generate a set of Java source
    : : files
    : : : based on an input DTD. The generated Java source files can
    : : then
    : : : be used to construct, optionally validate, and print a XML
    : : : document that is compliant to the DTD specified. This is
    an
    : : early
    : : : beta release and has the following features:
    : : : * Creates Java Classes from DTDs to enable the
    programmatic
    : : : construction of XML documents.
    : : : * Supports validation mode to assist debugging.
    : : : * Works with the Oracle XML Parser in Java.
    : : : * Creates documents conforming to the W3C XML 1.0
    : : : Recommendation.
    : : : * Supports creating documents in the following
    encodings:
    : : : UTF-8
    : : : UTF-16
    : : : ISO-10646-UCS-2
    : : : ISO-10646-UCS-4
    : : : US-ASCII
    : : : EBCDIC-CP-US
    : : : ISO-8859-1
    : : : Shift_SJIS
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    : Oracle Technology Network
    null

  • Invalid InputSource Error using XML Parser V2

    I'm using the following code to read xml from
    a clob field in an Oracle database.
    try
    // Parse xsl and xml documents
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    Statement sqlSel=conn.createStatement();
    ResultSet xmlDet=sqlSel.executeQuery("SELECT * FROM USER_XML WHERE IHC_USER_ID='123456789'");
    if (xmlDet.next())
    CLOB xmlCLOB= ((OracleResultSet)xmlDet).getCLOB(2);
    int index=0;
    Reader clobStream=xmlCLOB.getCharacterStream();
    parser.parse(clobStream);
    Everything seems to work fine, and I can
    create a String from the stream which contains the entire XML document. However, if I try to do the above and parse the Stream, or alternatively parse the String resulting from the stream, I get the following Error:
    nvalid InputSource.
    void oracle.xml.parser.v2.XMLError.flushErrors()
    void oracle.xml.parser.v2.XMLError.error(int, int, java.lang.String, java.lang.String, java.lang.String, int, java.lang.Exception, int, boolean)
    void oracle.xml.parser.v2.XMLError.error(oracle.xml.parser.v2.XMLReader, java.lang.String, int, java.lang.Exception, int, boolean)
    void oracle.xml.parser.v2.XMLReader.pushXMLReader(org.xml.sax.InputSource)
    void oracle.xml.parser.v2.XMLParser.parse(java.lang.String)
    void xmlquerydb.testParse()
    void xmlquerydb.main(java.lang.String[])
    Any ideas what could cause this?

    I'm quite sure the xml documents are valid.
    At present, I'm just using booklist.xml,
    which comes as an example with the XML SQL
    utility. The problem is not really with the
    parsing (If I convert the xml into a url then it parses fine).
    My real problem is pulling the document out
    of a CLOB field. Regardless of what I pass to the parser( a string or a stream), or which xml its parsing, I still get the Invalid inputsource error.

  • Oracle XML parser and schema validation

    Hi Forum,
    I have problem parsing XML with validation against XML schema. I define location of schema (URL) in xml file and Oracle parser could not find the schema (xml file is correct - checked in other programs). When I point to xml schema directly from Java (using parser.setXMLSchema) before calling parser.parse, it works just fine. Where is the problem? Does oracle parser works correctly with XML Schema?
    TIA,
    Alex

    SAXParser saxParser=new SAXParser();
    saxParser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    Specify a Schema to validate a XML document with, for the SAXParser.
    saxParser.setXMLSchema(SchemaUrl);
    DefaultHandler handler=new DefaultHandler();
    saxParser.setErrorHandler(handler);
    Parse the XML document to validate with the XML schema.
    saxParser.parse(XmlDocumentUrl);

  • Converting from JAVA HASHMAP to PLSQL object or CLOB

    Hello All,
    My oracle version in 10.2.0.4 on a solaris V880 machine.
    Our Application Java SDK is 1.4.
    I am trying to pass in a series of XML (considerably huge for XML type column) from java application plsql which stores them into an oracle table with column as external BLOB. Since the contents are so heavy for each objects , using XMLTYPE column is not feasible.
    The xml files comes as either java hash_map or string which i have to pass as parameter to an Oracle stored procedure which stores as external BLOB in OS through a table.
    My first doubt is this the correct approach.
    My second doubt here is how to interpret java hash_map object within PLSQL when it is passed to it.
    Apologies if the question is silly since i am a new comer to java.
    Thanks in advance ,
    Vijay G

    vijay S P G wrote:
    If i have plsql collection with a varchar2 and a blob as record type then can i directly pass the java hash map to the procedure having parameter datatype as the above said record type ?Of course not. Obviously the first reason for that is because the "blob" needs to be a file path and not a blob.
    Second reason is no databases that I know of take a hash data type. Some take arrays. But I doubt that is worth the trouble.
    You have a collection of name value (path) pairs. Iterate over the collection and for each name do an insert of the name and path.

  • Best xml parser ?

    what is the best xml parser ? i have an xml document. i want to parse it to extract information. what is the best xml parser ? what developers prefers ? there are lots of xml perser available in the net like electric xml parser, in built java xml parser etc etc. which parser world use most ?

    thanks....is there any good tutorial how to use JXAB ..... i want a very simple tutorial with a simple example document . .....do you know any good tutorial site (except sun )? i want to start early work...thanks

Maybe you are looking for

  • N95 8G no pc suite in phone when conect usb

    Hi guys. Can somebody hellp me please.I did downloaded Nokia PC Suite,restarted pc, conected usb on the phone and ond the phone is Mass storage and COM PORT but no PC Suite.Any idea thanks

  • Abap report for PO details including the person releasing the PO last.

    Hi gurus, I need to create a abap report for the purchase order details. I am finding difficulty in getting the last person who released the PO. Can anyone tell me how can I get the person who released the PO last ?? From which table I can get this d

  • Cannot install quicktime due to newer version already installed

    I'm in desperate need of help. I've been trying to install Itunes for the last 4 nights but QUICKTIME is messing it up. I keep getting the error that a newer version of QUICKTIME is already installed and the installation can't continue. I've been sco

  • WAAS downgrade

    One of our waas boxes shows this: WAAS#sh version Application and Content Networking System Software (ACNS) Copyright (c) 1999-2009 by Cisco Systems, Inc. Application and Content Networking System Software Release 5.5.15 (build b2 Jul 6 2009) Version

  • How to move a 4GB file onto a USB Stick?

    I know the USB stick is formatted wrong, but I'm not sure which format to use? I want to be able to copy my Mac files onto the stick, couple of the videos are larger that 4GB, and give them to my client, who is on a PC. So, I need to format it so tha