PL/SQL XML Parser - problem running example
Oracle 8.1.5 database on NT
When i try running the example with command:
SQL*Plus> exec domsample
('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
I get the following error:
ERROR at line 1:
ORA-20100: Error occurred while parsing:
//ORACLE/xml_tmp/err.txt
ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
ORA-06512: at line 1
If i use backward-slashes '\' which should be OK for NT i get:
ORA-20100: Error occurred while parsing:
\\ORACLE\xml_tmp/err.txt
I tried using a directory (create directory ...) but this
results in the same error.
Thus anyone now how it should be done?
Thanks
null
The use of "//" or "\\" appears to be a bug in JServer. It has
been filed. You should not specify the path as a shared
directory as a workaround.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Andre (guest) wrote:
: Oracle 8.1.5 database on NT
: When i try running the example with command:
: SQL*Plus> exec domsample
: ('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
: I get the following error:
: ERROR at line 1:
: ORA-20100: Error occurred while parsing:
: //ORACLE/xml_tmp/err.txt
: ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
: ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
: ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
: ORA-06512: at line 1
: If i use backward-slashes '\' which should be OK for NT i get:
: ORA-20100: Error occurred while parsing:
: \\ORACLE\xml_tmp/err.txt
: I tried using a directory (create directory ...) but this
: results in the same error.
: Thus anyone now how it should be done?
: Thanks
null
Similar Messages
-
PL/SQL XML Parser (problem getting text of a node)
I am trying to get the contents of an ELEMENT (node with a CDATA section) using xmldom.getNodeValue(). However, it seems that there is a MAXIMUM number of characters that I can get back.
I think I've found a work-around using xmldom.writeToBuffer() which seems to write all of the CDATA contents to a VARCHAR2 variable. Now my problem is that it is using strings like '<' and '&'. I recognize these strings as being "internal representations of '<' and '&' respectively. I'd not have to replace every occurence of these types of strings with the ASCII equivalent -especially since I don't know all of the possible '&#nn' strings that may crop up.
Help!The use of "//" or "\\" appears to be a bug in JServer. It has
been filed. You should not specify the path as a shared
directory as a workaround.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Andre (guest) wrote:
: Oracle 8.1.5 database on NT
: When i try running the example with command:
: SQL*Plus> exec domsample
: ('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
: I get the following error:
: ERROR at line 1:
: ORA-20100: Error occurred while parsing:
: //ORACLE/xml_tmp/err.txt
: ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
: ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
: ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
: ORA-06512: at line 1
: If i use backward-slashes '\' which should be OK for NT i get:
: ORA-20100: Error occurred while parsing:
: \\ORACLE\xml_tmp/err.txt
: I tried using a directory (create directory ...) but this
: results in the same error.
: Thus anyone now how it should be done?
: Thanks
null -
Error while running PL/SQL XML Parser Samples
every time try to run the PL/SQL XML Parser Sample program i get this error no file or directory, though the file and dir exists, i have the permissions setup as in readme.txt do i need to do any chnages to init.ora,
pls advice
Thanks,
SQL> exec test
begin test; end;
ERROR at line 1:
ORA-20100: Error occurred while parsing: No such file or directory
ORA-06512: at "SCOTT.XMLPARSER", line 22
ORA-06512: at "SCOTT.XMLPARSER", line 69
ORA-06512: at "SCOTT.TEST", line 13
ORA-06512: at line 1Which examples in particular? Thanks.
-
?xml version = '1.0' encoding = 'ASCII'? pl/sql xml parser
When ever I parse a document which has the
<?xml version = '1.0' encoding = 'ASCII'?> tag as the first line hangs the pl/sql xml parser . If I remove the "encoding = 'ASCII'" from the file everything works fine ! What is the problem ?
version 8.1.6 / plsql parser v2 / hpux 11x
Here is the input file
<?xml version = '1.0' encoding = 'ASCII'?>
!--- This is a comment -->
<person>
<employee>
<lastname>GHANTASALA</lastname>
<firstname>SREE</firstname>
<age>32</age>
</employee>
<employee>
<lastname>TAMATAM</lastname>
<firstname>SATISH</firstname>
<age>30</age>
</employee>
</person>
Here is my program
declare
p xmlparser.parser;
doc xmldom.DOMDocument;
dir varchar2(100) := '/apps/oracle/drugstore';
errfile varchar2(30) := 'err.txt' ;
inpfile varchar2(30) := 'person.xml';
nl xmldom.DOMNodeList;
len number;
n xmldom.DOMNode;
new_node xmldom.DOMNode;
node_name varchar2(100);
node_value varchar2(100);
begin
-- new parser
p := xmlparser.newParser;
-- Set some characteristics
xmlparser.setValidationMode(p, FALSE);
xmlparser.setErrorLog(p, dir| |'/'| | errfile );
xmlparser.setBaseDir(p, dir);
-- parse input file
xmlparser.parse(p, dir| |'/'| |inpfile);
-- get document
doc := xmlparser.getDocument(p);
-- get all elements
nl := xmldom.getElementsByTagName(doc, '*');
len := xmldom.getLength(nl);
dbms_output.put_line('Length='| |len);
-- loop through elements
for i in 0..len-1 loop
n := xmldom.item(nl, i);
node_name := xmldom.getNodeName(n);
-- get the text node associated with the element node
n := xmldom.getFirstChild(n);
if xmldom.getNodeType(n) = xmldom.TEXT_NODE then
node_value := xmldom.getNodeValue(n);
if node_name='lastname' then
dbms_output.put_line('The value you are looking for is -->:'| |node_value);
if node_value = 'GHANTASALA' then
xmldom.setNodeValue(n,'TEST2');
end if;
end if;
end if;
end loop;
new_node := xmldom.makeNode(doc);
xmldom.writeToFile(new_node, dir | |'/'| |'mod.xml');
end ;
nullThe encoding header is actually generated by
by the following piece of code in my pl/sql program .
new_node := xmldom.makeNode(doc);
xmldom.writeToFile(new_node, dir | |'/'| |'mod.xml');
Since this is a document created by the pl/sql parser, I assume there is some meaning to it !
Also why is it hanging ? PL/sql parser should tell me that it is not a valid string ! -
WIJ 20002 xml Parser Problem - Rich Client
Hi,
I have a problem with the rich client on a new installation:
Business Objects Enterprise XI 3.1 SP3 on Windows 2008 Standard.
If I connect with the rich client "import document"is disabled.
if I try to create a new document from the rich client it returns the error below (I used the rich client on two workstations):
WIJ 20002
Version: null
Analisi dello stack:
java.lang.RuntimeException: java.lang.RuntimeException: XML parser problem:
XMLJaxpParser.parse(): Element type "ABOUT_Patentnumbers" must be followed by either attribute specification, ">" or "/>".
at com.businessobjects.wp.xml.jaxp.XMLJaxpParser.parse (Unknown Source)
at.com.businessobjects.webi.richclient.XMLviaOccaRC.getServerConfiguration (Unknown Source)
Have you any solution?The fixpack 3.5 client resolves the problem.
-
i've downloaded the Pl/SQL XML parser demo - xslsample / domsample - followed the guide , etc but I'm getting ....
BEGIN xslsample ('/export/home/oracle/plmx/sample','family.xml','iden.xsl','family.out','errors.txt'); END;
ERROR at line 1:
ORA-29516: Aurora assertion failure: Assertion failure at eox.c:187
Uncaught exception Root of all Java exceptions:
ORA-06512: at "PLMX.XMLPARSERCOVER", line 0
ORA-06512: at "PLMX.XMLPARSER", line 57
ORA-06512: at "PLMX.XSLSAMPLE", line 28
ORA-06512: at line 1
anybody seen this ??There is no such limit on our Parser for PL/SQL. Could you
perhaps be using the PLXML Utilities? If you are you might try
our PL/SQL Parser instead.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Premal Mehta (guest) wrote:
: Hi
: I am using PL/SQL XML Parser to add XML data in database. I
: am having trouble when using file sixe greater than 500KB?
: What is the alternative? Can I do something to process
larger
: files?
: Please Help, this is quite urgent.
: Hoping for help,
: Premal.
null -
XML parsing problems with Oracle XML parser for PL/SQL
I am using the Oracle XML parser for PL/SQL to transform XML into HTML usign XSL. The parser gives me sporadic errors trying to parse various XML documents. For the same XML source, the XMLPARSER will parse without errors one day and the next day will give me errors such as "invalid char in text", "Expected ';'.", or even Java null pointer exceptions.
I have verified that the XML sources are well formed, so I am pretty certain that the problems I am having are bugs in the XMLPARSER.
Is there going to be a XML parser for PL/SQL version 2 that will fix these bugs? If so, when??? If not, is there anything else I could do to fix these problems?
Thanks!You can use the latest version.
-
Create document with PL/SQL xml parser
Hello,
I'm trying to create a document with PL/SQL package xmldom on 8.1.7 and write to a file.
The problem is that my file is empty when it's created.
Can anyone send me an example of this simple problem or fullfill my example so it's works.
As you understand I'm new in using XML. :)
My example is:
declare
doc xmldom.DOMDocument;
n xmldom.DOMNode;
e xmldom.domelement;
t xmldom.domtext;
begin
doc := xmldom.newdomdocument;
t := xmldom.createtextnode(doc, 'ROOT');
n := xmldom.makenode(t);
doc := xmldom.makedocument(n);
xmldom.writetofile(doc, 'd:\orant\xdk\plsql\demo\test.xml');
end;
Regards
HekanYour problem may be memory for the JavaVM. Remember, the PL/SQL
parser uses the Java XML Parser APIs which run in a VM instance.
Are you running Oracle 8i? If you are you can access our Java
XML parser loaded in 8i's VM directly from your PL/SQL code.
That is in fact how our PL/SQL Parser does it.
Finally, we have no experience loading other XML Parsers into
Oracle.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Premal Mehta (guest) wrote:
: Hi,
: I asked about his a few days back. Pl/SQL parser does not
work
: for XML files of size greater then 500Kb. You replied saying
: that there were no such problem.
: However whenever I try, either I get some exception or
Pl/SQL
: crashes due to memory error. I am clueless. Is there some
: setting that I can do to get away with the problem? Please
: guide...
: Also, tell me about the alternatives.
: Can I write code in Java and load these class filesin Oracle
: and then reference these classes from Pl/SQL code. Can I load
: any other parser for Java in Oracle.
: Looking forward for help...
: Premal.
null -
am using XML parser for PL/SQL in Oracle9i Enterprise Edition Release 9.0.1.1.1
When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
SQL> execute domsample('c:\xml', 'family.xml', 'errors.txt');
begin domsample('c:\xml', 'family.xml', 'errors.txt'); end;
ORA-20100: Error occurred while parsing: No such file or directory
ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 22
ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 79
ORA-06512: at "COMMODITYBACKCONNECT.DOMSAMPLE", line 80
ORA-06512: at line 1
What need to be done to rectify the above problem.
when i do the following validation check
SQL>
SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
2 from all_objects
3 where object_type = 'JAVA CLASS'
4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser')
5 ;
CLASS STATUS
oracle/xml/parser/v2/DOMParser VALID
oracle/xml/parser/v2/DOMParser VALID
Please advice to how remove the following error:
ORA-20100: Error occurred while parsing: No such file or directoryFound the solution on metalink. There is a file under /$ORACLE_HOME/javavm/install/init_security.sql
which needs to be run under username where you are installing xml parser.
This step is not in readme.txt file provided as a part of download from the OTN website. -
XML parser Problem in Oracle 9iAS
Dear All,
I am trying to parse a xml file by using a SAX Parser.
I am getting error "oracle.xml.parser.v2.XMLParseException: Invalid InputSource.'. I have already included 'xerces.jar' in the classpath.
But it is always taking oracle xml parser.
How to change the default XML parser in Oracle 9ias.
This is my report.jsp File
<%@ page import="java.io.*,java.util.*,java.sql.*,javax.sql.*,javax.naming.*,javax.jms.*,iims.util.*,javax.xml.parsers.*,org.xml.sax.*,org.xml.sax.helpers.*, org.w3c.dom.*"%>
<%
generateTree();
%>
<%!
//This method is to be called during startup. It will generate the template and rule nodes.
public static void generateTree() throws Exception
//Proceed with this method if the template and rule trees are not built already.
//if (nodeTemplate != null && nodeRule != null) return;
// Validate
Node nodeRule = parseXml("d:\\ora9ias\\j2ee\\home\\Reports\\IIMSReportsTemplate1.xml");
}//generateTree
%>
<%!
//parse the input file and return a node.
private static Node parseXml(String fileName) throws Exception
//Parse the input file
Document objDocument = null;
DocumentBuilder objDocumentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
objDocument = objDocumentBuilder.parse(fileName);
Node nodeRet = objDocument;
return nodeRet;
}//parseXml
%>
Report template:
<ROOT>
<HEADINGS>
<HEADING1>H1</HEADING1>
<HEADING2>H2</HEADING2>
<HEADING3>H3</HEADING3>
<HEADING4>H4</HEADING4>
<HEADING5>H5</HEADING5>
<HEADING6>H6</HEADING6>
</HEADINGS>
<ROWSETS>
<ROWSET>
<COLHDRS>
</COLHDRS>
<ROWS>
</ROWS>
</ROWSET>
</ROWSETS>
<Footer>
<PageNo>Generate</PageNo>
<Date>SystemDate</Date>
</Footer>
</ROOT>
Stack Trace:
strRuleFileD:\ora9ias\j2ee\home\Reports\IIMSReportsRules.xml
oracle.xml.parser.v2.XMLParseException: Invalid InputSource.
at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:145)
at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:208)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:140)
at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:96)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:165)
at iims.REPORTS.IIMSGenerateReport.parseXml(IIMSGenerateReport.java:115)
at iims.REPORTS.IIMSGenerateReport.generateTree(IIMSGenerateReport.java:
100)
at iims.REPORTS.IIMSGenerateReport.buildXML(IIMSGenerateReport.java:147)
at PCREPORT_PROCESS.processBody(PCREPORT_PROCESS.java:3248)
at PCREPORT_PROCESS.doPost(PCREPORT_PROCESS.java:100)
at PCREPORT_PROCESS.doGet(PCREPORT_PROCESS.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:244)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterC
hain.java:59)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
stDispatcher.java:523)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
vletRequestDispatcher.java:269)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:735)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java
:151)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
Please advise.
Thanks
Siva Kishor Rao UAdding Xerces XML parser is not enough to make it work. Since some version of JDK (I think 1.4.X) XML parser is included and for older version it can be setup like a runtime option. And this is probably how ORACLE is using its XML parser. If you want to use different parser, you have to pass runtime option to JVM - for Xalan it looks like this:
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
...this way it becomes default parser factory used by javax interface functions. Look for documentation on xml.apache.org
Myrra -
Hi, my problem is :
In my Application i want to parse an XML file with DOM parser. The problem is that in my Project "MyProject -> Project Properties -> Libraries and Classpath"
I have included some 15 libraries which are useful for my Application: ADF Faces Runtime 11, ADF Web Runtime and etc.
Problems are causing the libraries: BC4J Runtime,ADF Model Runtime, MDS Runtime Dependencies
because when added my source which is parsing an XML file stops working.The source code is:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
File file =
new File("C:\\Documents and Settings\\ilia\\Desktop\\begin.xml");
Document doc = db.parse(file);
Element root = doc.getDocumentElement();
NodeList dots = root.getElementsByTagName("w:t");
Element firstDot = (Element)dots.item(0);
String textValue = firstDot.getFirstChild().getNodeValue();
I use DOM because i need to change some values in the XML file, but its not working neither for reading nor for writing.When debugging I see that it gets the root of the xml but " firstDot.getFirstChild().getNodeValue() " returns null and it breaks with NullPointerException. And that's only when the libraries mentioned above are added to the project. Without them it works just fine !
I don't know, it's like when added the parser validates my xml against some schema and returns null.
The xml file is very simple MS Word Document saved as .xml .But I don't think that's the problem.
Thanks in advance !
iliyaHi all,
I found the solution to my problem.The right way to parse and change an XML file with DOM parser using the Oracle XML Parser v2 should look like this:
JXDocumentBuilderFactory factory =
(JXDocumentBuilderFactory)JXDocumentBuilderFactory.newInstance();
JXDocumentBuilder documentBuilder =
(JXDocumentBuilder)factory.newDocumentBuilder();
File file = new File("c:/Documents and Settings/ilia/Desktop/begin.xml");
InputStream input =
new FileInputStream(file);
XMLDocument xmlDocument = (XMLDocument)(documentBuilder.parse(input));
System.out.println("Encoding: " + xmlDocument.getEncoding());
System.out.println("Version: " + xmlDocument.getVersion());
NodeList namespaceNodeList =
xmlDocument.getElementsByTagNameNS("http://schemas.microsoft.com/office/word/2003/wordml","t");
XMLElement namespaceElement17 = (XMLElement)namespaceNodeList.item(17);
namespaceElement17.getFirstChild().setNodeValue("someString"); -
Faces-config.xml XML parser problem ???
I'm taking below error message when I was opening faces-config.xml file with diagram view, what's the exact solution of this problem???
Message
BME-99100: An error has been reported from the XML parser
Cause
The parse has reported the following error:
<Line 24, Column 2>: XML-20201: (Fatal Error) Expected name instead of <.
Action
Thanks for all...
Message was edited by:
user559176I looked very well, there was'nt any error on line 24 about "<", I think if the size of faces-confic.xml file increased JDeveloper XML Parser cannot parse with high file size, what're other solutions?
-
XML-Parser-Problem ? DataBindings.cpx
Hello,
Ok -I just will formulate my question somewhat different: It is possible that the XML-Parser has a Problem ? Please see the stuff below.
I just got a warning:
Project: D:\ORAJDev101320\jdev\mywork\LoginJSF\ViewController\ViewController.jpr
D:\ORAJDev101320\jdev\mywork\LoginJSF\ViewController\src\login\DataBindings.cpx
Warning(11,15): <Line 11, Column 15>: XML-24521: (Fehler) Element nicht abgeschlossen: 'Application'
for the following xml file when compiling my sampe books (chapter9) code:
<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://xmlns.oracle.com/adfm/application"
version="10.1.3.40.66" id="DataBindings" SeparateXMLFiles="false"
Package="login" ClientType="Generic">
<pageMap>
<page path="/home.jsp" usageId="homePageDef"/>
</pageMap>
<pageDefinitionUsages>
<page id="homePageDef" path="login.pageDefs.homePageDef"/>
</pageDefinitionUsages>
</Application>
After trying a little bit it turned out that the message disappears when
the :
Application xmlns="http://xmlns.oracle.com/adfm/application"
is rewritten to
Application xmlns="http://xmlns.oracle.com/adfm/Application"
(Application with a upper first A)
I have to point out that previously I did not by hand coding in this file.
Is this a known issue.?
And will/could these change do cause other/addition problems somewhere ?
Andre
Message was edited by:
andreml
nullHow about adding this tag <dataControlUsages/>? My JDev doesn't complain about your content.
just my 2 cents
--olaf -
Are there are any samples available to show
how data can be pulled from the database in
XML format using the XML Parser for PL/SQL ?
The currently available samples show how to
process an inbound XML file and break out the data and another sample shows how a XML file can have XSL transformation applied to it. These are good but I would like in addition, to display database data in XML format using the parser. Thanks ahead.Better to use the XML SQL utility for this task, which is designed to handle the job in Java or PL/SQL.
-
Hello,
I just set up the PL/SQL parser and created a procedure and am getting the following error. I am a new developer so any help would be greatly appreachiated. Thanks
ERROR at line 1:
ORA-29541: class XML_WORK.oracle/xml/parser/plsql/XMLParserCover could not be resolved
ORA-06512: at "XML_WORK.XMLPARSERCOVER", line 0
ORA-06512: at "XML_WORK.XMLPARSER", line 57
ORA-06512: at line 14Steve,
I did as you said and now get the following errors:
ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.net.SocketPermission business.buffalo.edu resolve) has not been granted by dbms_java.grant_permission to SchemaProtectionDomain(XML_WORK|PolicyTableProxy(XML_WORK))
ORA-06512: at "XML_WORK.XMLPARSERCOVER", line 0
ORA-06512: at "XML_WORK.XMLPARSER", line 46
ORA-06512: at "XML_WORK.XML_PARSE_TEST", line 19
ORA-06512: at line 2
I created the allow_url_access procedure and the result of the test query appear fine. The url I am using is: http://business.buffalo.edu/hrs/AlfCMTestXML.xml and the results of the test query is as follows. Thanks.
ALLOWED_SERVER_NAME
*.buffalo.edu
*.business.buffalo.edu
Maybe you are looking for
-
Using Java XML 1.5 toolkit instead of sapxmltoolkit for xslt mappings
Hi All We have a case whereby our xlst requires a number of customised java class functions as we are porting webmethods systems across to PI. eg in the xslt adding <xsl:when test="function-available('java:concat"> <xsl:value-of select="java:c
-
IBook won't download and can't delete
I recently downloaded iBooks. Today I downloaded an iBook and it won't download properly, always freezes. I want to delete it but seems you can't because it hasn't downloaded. I deleted the iBooks app but on reinstallation it keeps trying to download
-
HT201335 how to use it in macbook pro please?
I want to connect the airplay mirroring in my macbook pro but its not working i chicked the wifi and everythig but i cant find the airplay mirroring option in the display setting what to do please???
-
Where is the oracle.xml.sql.query package?
Hi, I have downloaded the xmlparser_v2_0_2_9.zip. I hoped I have everything to compile the example for retrieving XML document with an sql query. However, the jar file is missing the entire package oracle.xml.sql.query which contains for instance the
-
How i can fix error 9806 in itunes ?
how i can fix error 9806 in iTunes ?