OracleXML putXML error
I upgraded the Oracle XML SQL Utility from 1.1.1 to 1.2 (and changed my ClassPath to use classes12.zip). When I run OracleXML putXML, rows are getting inserted into my table, but I'm getting the following error. Should I worry about it? I did not get this error message with XSU111. Thanks.
========================================
E:\vj\Test>java OracleXML putXML -user scott/tiger -fileName test-out_MANUAL.xml
t1
A nonfatal internal JIT (3.10.107(x)) error 'Structured Exception(c0000005)' has
occurred in :
'oracle/xml/sql/dml/OracleXMLSave.cleanLobList ()V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
successfully inserted 3 rows into t1
========================================
Please ignore this posting. My classpath was messed up. It's resolved.
Similar Messages
-
XML to SQL conversion using OracleXML putXML
Hi,
How many rowTag values can I use when I use OracleXML putXML ? I have an XML file in the following format.
I have to use "ABC" as rowTag. What Can I do with "GRANT_ROW" ? I have a table with
R_DATE and
GRANT columns
where GRANT is an object type with elements
NAME and ATYPE.
Thanks.
<?xml version = '1.0'?>
<EXCH>
<ABC num="1">
<R_DATE>5/21/2003 0:0:0</R_DATE>
<GRANT>
<GRANT_ROW num="1">
<NAME>GUNACAR</NAME>
<ATYPE>TE</ATYPE>
</GRANT_ROW>
<GRANT_ROW num="2">
<NAME>GUNACAR</NAME>
<TYPE>TE</TYPE>
</GRANT_ROW>
</GRANT>
</ABC>
</EXCH>
I get the following error when I run
java OracleXML putXML ....
oracle.xml.sql.OracleXMLSQLException: 'The XML element tag 'GRANT_ROW'
does not match the name of any of the columns/attributes of the
target database object.' encountered during processing ROW element 0.
Thanks....RTF FormattingKit
http://www.schema.de/sitehtml/site-e/xmlnach0.htm -
Java OracleXML putXML & non-unique keys
I am using the XML SQL Utility for java on the client (NT) to insert multi-row XML documents into an ORACLE table. Everything works fine until I hit a row with a non-unique key. It appears insertXML throws an error and the insert stops at that point. Rows after the non-unique key row are not processed.
Is there any way to process all rows of an XML document, telling me how many read, how many inserted, how many not processed??
Also, what about update capabilities? Presently I am not needing to update from XML into ORACLE, all I can do now is insert.
Thanks in advance,
RickOne way to make this work would be to take advantage of Oracle8i's INSTEAD OF triggers on views.
Basically, you would:
(1) CREATE VIEW someview
AS SELECT * FROM sometable;
(2) CREATE TRIGGER someview_trig
INSTEAD OF INSERT ON someview
DECLARE
BEGIN
-- Check for existence of
-- row using the value of
-- :NEW.pk_column_name
IF (you-found-an-existing-one) THEN
-- Do something here like
-- NULL; to ignore the insert altogether
-- or possible an INSERT into
-- and EXCEPTIONS table...
ELSE
INSERT INTO sometable
VALUES (:NEW.column1, ..., :NEW.columnn);
END IF;
END;
(3) Then point XML SQL Utility at someview
instead of sometable
and you'll be in business, as they say. -
How to putXML on a joined View?
Hi
I would like to insert an XML document into two tables (some
elements into table 1 and some into table 2). I have created a
joined view of the two tables and have tried to insert into the
view with:
java OracleXML putXML -user %USER_PASSWORD% -filename myfile.xml
myView
But I get the error "cannot modify a column which maps to a non
key-preserved table". PLEASE GIVE A SPECIFIC EXAMPLE OF AN
UPDATABLE 'VIEW' WHERE AN INSERT CAN MODIFY MORE THAN ONE
UNDERLYING TABLE. Is it possible?
Any example will do. But here is what I tried to do. I tried
to map the first few ROW child elements of an XML document (shown
at the bottom) into columns of the EMP table and the remaining
child
elements into another table called RELATIVE (this is a table
containing next-of-kin contact information for each employee). I
created a RELATIVE table with:
CREATE TABLE RELATIVE (
IDREL NUMBER(15) PRIMARY KEY,
EMPNUM NUMBER(4) CONSTRAINT FK_REL REFERENCES SCOTT.EMP(EMPNO),
RNAME VARCHAR2(20) NOT NULL,
TEL NUMBER(14),
STREET VARCHAR2(30),
CITY VARCHAR2(20),
STATE VARCHAR2(10),
ZIP VARCHAR2(12),
COUNTRY VARCHAR2(20)
I added a EMPNO_DUP column to the EMP table that is a copy of
the
EMPNO primary key (I did this so as to use EMPNO_DUP for the two
table join, rather than the EMPNO primary key. My first attempts
to make the joined view with EMPNO also gave the same error). I
wrote a PL/SQL trigger than would make sure that EMPNO_DUP and
EMPNO remain in synch if EMPNO is updated or if there is an
INSERT on EMP. Then I created a joined view of EMP and RELATIVE
with:
CREATE OR REPLACE VIEW EMPREL
(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO, EMPNO_DUP
IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
AS SELECT
E.EMPNO, E.ENAME, E.JOB, E.MGR, E.HIREDATE, E.SAL, E.COMM,
E.DEPTNO,E.EMPNO_DUP,
R.IDREL, R.EMPNUM, R.RNAME, R.TEL, R.STREET, R.CITY, R.STATE,
R.ZIP, R.COUNTRY
FROM EMP E, RELATIVE R WHERE E.EMPNO_dup=R.EMPNUM;
I tried to insert the XML document shown at the bottom with:
java OracleXML putXML -user %USER_PASSWORD% -filename myfile.xml
myView
I also tried the direct SQL command:
INSERT INTO EMPREL
(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO,EMPNO_DUP,
IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
VALUES
(7944, 'WIZARD', 'CLERK', 7782, '25-JUL-82', 1325, 0, 10, 7944,
1, 7944, 'SUE', 4087200111, '200 MAIN ST.', 'PALO ALTO', 'CA',
'94043', 'USA')
Both attempts resulted in this error message:
"cannot modify a column which maps to a non key-preserved table"
I would really appreciate an example of how to create an
updatable view where two or more underlying tables can be
modified. Thanks.
Regards
Mehran Moshfeghi
Here is the sample XML file. I want the first set of elements to
map to EMP table columns and the second set of elements (after
the blank line) to map to the RELATIVE table columns.
<?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7942</EMPNO>
<ENAME>GUNNEL</ENAME>
<JOB>CLERK</JOB>
<MGR>7782</MGR>
<HIREDATE>1982-02-25 00:00:00.0</HIREDATE>
<SAL>1350</SAL>
<DEPTNO>10</DEPTNO>
<EMPNO_DUP>7942</EMPNO_DUP>
<IDREL>2</IDREL>
<RNAME>SMITH</RNAME>
<TEL>6504262551</TEL>
<STREET>2171 LANDINGS DRIVE</STREET>
<CITY>MOUNTAIN VIEW</CITY>
<STATE>CA</STATE>
<ZIP>94043-0837</ZIP>
<COUNTRY>USA</COUNTRY>
</ROW>
</ROWSET>
nullHi Mehran,
This is a classic view update problem where the database cannot
figure out automatically which table(s) to update given a join
view. Any update/insert/delete cannot act on more than one
table.So if you are updating a column in a join-view, then that
column must map to a particular column of a single table
unambigously. You should look at the documentation on updatable
join views.
One of the easiest solutions to your problem is to create
INSTEAD-OF trigger on those views. INSTEAD-OF triggers are
triggers that can be created over non-updatable views to make
them updatable. Here in the trigger body you specify the
appropriate insert statements into the base tables. So your view
can be as complicated as possible and yet updatable using these
triggers.
Thx
oracle XML team
Mehran (guest) wrote:
: Hi
: I would like to insert an XML document into two tables (some
: elements into table 1 and some into table 2). I have created a
: joined view of the two tables and have tried to insert into
the
: view with:
: java OracleXML putXML -user %USER_PASSWORD% -filename
myfile.xml
: myView
: But I get the error "cannot modify a column which maps to a
non
: key-preserved table". PLEASE GIVE A SPECIFIC EXAMPLE OF AN
: UPDATABLE 'VIEW' WHERE AN INSERT CAN MODIFY MORE THAN ONE
: UNDERLYING TABLE. Is it possible?
: Any example will do. But here is what I tried to do. I tried
: to map the first few ROW child elements of an XML document
(shown
: at the bottom) into columns of the EMP table and the remaining
: child
: elements into another table called RELATIVE (this is a table
: containing next-of-kin contact information for each employee).
I
: created a RELATIVE table with:
: CREATE TABLE RELATIVE (
: IDREL NUMBER(15) PRIMARY KEY,
: EMPNUM NUMBER(4) CONSTRAINT FK_REL REFERENCES SCOTT.EMP
(EMPNO),
: RNAME VARCHAR2(20) NOT NULL,
: TEL NUMBER(14),
: STREET VARCHAR2(30),
: CITY VARCHAR2(20),
: STATE VARCHAR2(10),
: ZIP VARCHAR2(12),
: COUNTRY VARCHAR2(20)
: I added a EMPNO_DUP column to the EMP table that is a copy of
: the
: EMPNO primary key (I did this so as to use EMPNO_DUP for the
two
: table join, rather than the EMPNO primary key. My first
attempts
: to make the joined view with EMPNO also gave the same error).
I
: wrote a PL/SQL trigger than would make sure that EMPNO_DUP and
: EMPNO remain in synch if EMPNO is updated or if there is an
: INSERT on EMP. Then I created a joined view of EMP and
RELATIVE
: with:
: CREATE OR REPLACE VIEW EMPREL
: (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO, EMPNO_DUP
: IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
: AS SELECT
: E.EMPNO, E.ENAME, E.JOB, E.MGR, E.HIREDATE, E.SAL, E.COMM,
: E.DEPTNO,E.EMPNO_DUP,
: R.IDREL, R.EMPNUM, R.RNAME, R.TEL, R.STREET, R.CITY, R.STATE,
: R.ZIP, R.COUNTRY
: FROM EMP E, RELATIVE R WHERE E.EMPNO_dup=R.EMPNUM;
: I tried to insert the XML document shown at the bottom with:
: java OracleXML putXML -user %USER_PASSWORD% -filename
myfile.xml
: myView
: I also tried the direct SQL command:
: INSERT INTO EMPREL
: (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO,EMPNO_DUP,
: IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
: VALUES
: (7944, 'WIZARD', 'CLERK', 7782, '25-JUL-82', 1325, 0, 10, 7944,
: 1, 7944, 'SUE', 4087200111, '200 MAIN ST.', 'PALO
ALTO', 'CA',
: '94043', 'USA')
: Both attempts resulted in this error message:
: "cannot modify a column which maps to a non key-preserved
table"
: I would really appreciate an example of how to create an
: updatable view where two or more underlying tables can be
: modified. Thanks.
: Regards
: Mehran Moshfeghi
: Here is the sample XML file. I want the first set of elements
to
: map to EMP table columns and the second set of elements (after
: the blank line) to map to the RELATIVE table columns.
: <?xml version="1.0"?>
: <ROWSET>
: <ROW>
: <EMPNO>7942</EMPNO>
: <ENAME>GUNNEL</ENAME>
: <JOB>CLERK</JOB>
: <MGR>7782</MGR>
: <HIREDATE>1982-02-25 00:00:00.0</HIREDATE>
: <SAL>1350</SAL>
: <DEPTNO>10</DEPTNO>
: <EMPNO_DUP>7942</EMPNO_DUP>
: <IDREL>2</IDREL>
: <RNAME>SMITH</RNAME>
: <TEL>6504262551</TEL>
: <STREET>2171 LANDINGS DRIVE</STREET>
: <CITY>MOUNTAIN VIEW</CITY>
: <STATE>CA</STATE>
: <ZIP>94043-0837</ZIP>
: <COUNTRY>USA</COUNTRY>
: </ROW>
: </ROWSET>
Oracle Technology Network
http://technet.oracle.com
null -
XML to database using OracleXML ...
I am trying to insert xml file into CCX_persons table :
I got the error message:
C:\XML>java OracleXML putXML -user shrikant/akola@devdb -fileName xmlperson.xml
"ccx_persons"
oracle.xml.sql.OracleXMLSQLException: java.lang.ClassCastException: oracle.xml.p
arser.v2.XMLPI
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:245)
at OracleXML.Put_XML(OracleXML.java:352)
at OracleXML.ExecutePutXML(Compiled Code)
at OracleXML.Execute(OracleXML.java:164)
at OracleXML.main(OracleXML.java:139)
java.lang.ClassCastException: oracle.xml.parser.v2.XMLPI
What could be wrong. Please help.
Thanks
ShriDo you have XML Processing instructions in the XML document that you're trying to insert?
They'd look like:
<?xxx ?>
null -
I am working on a 2200 row table with 20 columns. Datatypes a mixture of smallish varchar, integer and date.
Oracle 8.1.5.2 on Redhat Linux 6.1. Pentium III 500, 256MB.
JRE and JDK 1.1.6v5
I have output the table to an XML document (java OracleXML getXML ....). This takes about 25 seconds, which is fine (although spool to a table takes only 3 seconds). The resulting file size is 1.2mb
However, when I re-load the table (java OracleXML putXML ...) it takes 35 minutes, which is way slower than I want or expected...
As a comparison, I have also output the table to a tab-delimited file, which I have loaded using SQL*Loader. This load takes about 10 seconds.
So my questions are:
1. Why is it so slow on the XML load? Am I doing something wrong; can I tune somehow?
2. I could implement an XML loader in PRO*C (presumably the C XML parser will help here), but is there a better solution?
nullHi,
We have improved the speeds of execution of the generation component recently after doing some deep analysis. But there are going to be overheads with regard to creating Strings.
With respect to insert, 35 minutes is completely unacceptable. The reason is that internally, we parse the document into a DOM object and then bind it row by row to an insert statement. We are working next to improve this performance by using direct load APIs and using SAX instead of DOM.
It would also help if u can send the SQL script (with all sensitive info blocked), which would be useful for us to take a look at and do some improvements on the current engine.
But currently, if u want to increase the speed the only way is to transform the XML data using XSL or otherwise into SQL loader format and directly load it.
Thx
Murali -
XML document in CLOB with reference to external DTD
If you place the xml document in clob using dbms_lob and the document has reference to external (system) DTD then it gives an error 'Error opening external DTD'. Whats the work around. See example below...
declare
xmlstring CLOB;
xmlstring1 CLOB;
os_file BFILE := bfilename('BFILE_DIR','family.xml');
> > > rowsp INTEGER; > > > errnum NUMBER; > > > errmsg VARCHAR2(2000);
> > > time VARCHAR2(20); > > > begin
> > > select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS')
> > > into time from dual; > > > dbms_output.put_line(time);
> > > dbms_lob.createtemporary(xmlstring, true, > > > dbms_lob.session);
> > > dbms_lob.fileopen(os_file, > > dbms_lob.file_readonly);
> > > dbms_lob.loadfromfile(xmlstring, os_file,
> > > dbms_lob.getlength(os_file));
> > > select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS')
> > > into time from dual; > > > dbms_output.put_line(time);
> > > xmlgen.resetOptions; > > > xmlgen.setRowTag('family');
> > > --xmlgen.setIgnoreTagCase(xmlgen.IGNORE_CASE);
> > > rowsp := xmlgen.insertXML('family',xmlString);
> > > dbms_output.put_line(' Rows processed = '| | > > > TO_CHAR(rowsp));
> > > dbms_lob.freetemporary(xmlstring);
> > > dbms_lob.fileclose(os_file); > > > commit; > > > exception
> > > when no_data_found then > > > rollback;
> > > dbms_lob.freetemporary(xmlstring);
> > > dbms_lob.fileclose(os_file); > > > errnum := abs(SQLCODE);
> > > errmsg := SQLERRM;
> > > dbms_output.put_line(errnum| |'----'| |errmsg); > > > when others then
> > > rollback; > > > dbms_lob.freetemporary(xmlstring);
> > > dbms_lob.fileclose(os_file); > > > errnum := abs(SQLCODE);
> > > errmsg := SQLERRM;
> > > dbms_output.put_line(errnum| |'----'| |errmsg); > > > end;Can be one of two problems.
One
Your database user does not have
privileges to open a socket inside
the database. This will prevent
the XML parser running inside the DB
from retrieving the DTD which it must
do to properly parse the document.
Two
you are sitting behind a corporate
firewall and need to properly set
the Proxy Server host and port to
properly retrieve the DTD.
From looking at your code it would appear
that your job can more easily be done by
using the OracleXML putXML command line
utility outside the database.
You can specify the -D options to your
JavaVM to set the System properties for
the proxy server if need be like this:
java -DproxySet=true -DproxyHost=yourproxyserver OracleXML putXML -
Problem inserting XML doc (character set)
Hi all,
I'm having trouble trying to insert XML either "posting" it (xsql) or "putting" it
(OracleXML putXML).
The error that I get: "not supported
oracle-character-set-174".
The environment is:
Oracle 8i 8.1.5
(NLS_CHARACTERSET EL8MSWIN1253 for greek)
JDK 1.2.2
Apache Web Server 1.3.11
Apache JServ 1.1
XSQL v 0.9.9.1 and
XMLSQL, XML parser v2 that comes with it.
I had dropped all java classes and reloaded
them using oraclexmlsqlload batch file.
But still getting the same error.
The thing that is that I am
able to insert XML doc that was generated
with an authoring tool called W4F that extracts data from HTML pages and map them to
XML document, even with greek characters
in it. But when XML is generated using
an editor or the servlet like the following:
newschedule.xsql like
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="latestschedules.xsl"?>
<page connection="dtv" xmlns:xsql="urn:oracle-xsql">
<xsql:insert-request date-format="DD'/'MM'/'YYYY" table="schedule_details_view"
transform="request-to-newschedule.xsl"/>
<xsql:query table="schedule"
tag-case="lower" max-rows="5" rowset-element="latestschedules"
row-element="schedule">
select *
from schedules
order by schedule_id desc
</xsql:query>
</page>
request-to-newschedule.xsl like
<?xml version = '1.0'?>
<ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
<xsl:for-each select="request/parameters">
<ROW>
<SCHEDULE_ID><xsl:value-of select="Schedule_id_field"/></SCHEDULE_ID>
<DESCRIPTION><xsl:value-of select="Description_field"/></DESCRIPTION>
<DETAILS>
<DETAILS_ITEM>
<STARTING_TIME><xsl:value-of select="Starting_Time_field_1"/></STARTING_TIME>
<DURATION><xsl:value-of select="Duration_field_1"/></DURATION>
</DETAILS_ITEM>
<DETAILS_ITEM>
<STARTING_TIME><xsl:value-of select="Starting_Time_field_2"/></STARTING_TIME>
<DURATION><xsl:value-of select="Duration_field_2"/></DURATION>
</DETAILS_ITEM>
<DETAILS_ITEM>
<STARTING_TIME><xsl:value-of select="Starting_Time_field_3"/></STARTING_TIME>
<DURATION><xsl:value-of select="Duration_field_3"/></DURATION>
</DETAILS_ITEM>
<DETAILS_ITEM>
<STARTING_TIME><xsl:value-of select="Starting_Time_field_4"/></STARTING_TIME>
<DURATION><xsl:value-of select="Duration_field_4"/></DURATION>
</DETAILS_ITEM>
<DETAILS_ITEM>
<STARTING_TIME><xsl:value-of select="Starting_Time_field_5"/></STARTING_TIME>
<DURATION><xsl:value-of select="Duration_field_5"/></DURATION>
</DETAILS_ITEM>
</DETAILS>
</ROW>
</xsl:for-each>
</ROWSET>
Hope that someone could help me on this ...
Any advice is highly appreciated.
Thanks in advance
Nicos Gabrielides
email: [email protected]Hi,
How about applying an XSL on the existing XML doc to create another XML doc to filter out the table column not found in the target db table, so that all the columns are matched and then use putXML to load?
Hope that helps.
OTN team@IDC -
Inserting data in table using XSU's command line interface
I have this XML document to store:
<?xml version="1.0" ?>
- <ROWSET>
- <CustOrder>
<OrderID>1</OrderID>
- <Customer>
<Name>Shirley Cohen</Name>
<Address>2425 skylane, Dallas, TX</Address>
<Phone>615-414-4112</Phone>
</Customer>
- <ItemList>
- <Item num="1">
<ProductID>111</ProductID>
<ProductName>Computer</ProductName>
<Quantity>2</Quantity>
<Price>2000</Price>
</Item>
- <Item num="2">
<ProductID>113</ProductID>
<ProductName>Monitor</ProductName>
<Price>865</Price>
</Item>
</ItemList>
</CustOrder>
</ROWSET>
I have created the table custorder (below) to store the above XML document shown below:
create or replace type CustObj as object
Name varchar2(40),
Address varchar2(70),
Phone varchar2(20)
create or replace type Item as object
ProductID number,
ProductName varchar2(50),
Quantity number,
Price number
--create type Items as table of Item;
create table CustOrder
OrderID number,
Customer CustObj,
ItemList Items
) nested table ItemList store as nested_itemlist;
However, using the following command in XSU; I get this error:
--THE COMMAND
C:\Documents and Settings\SKOS>java OracleXML putXML -user "samuel/samuel" -fil
eName "\ProjectDocuments\myXMLStore\temp.xml" "custorder"
--THE ERROR MESSAGE
file:/C:/ProjectDocuments/myXMLStore/temp.xml<Line 1, Column 11>: XML-0109: (Fat
al Error) PI names starting with 'xml' are reserved.
oracle.xml.sql.OracleXMLSQLException: PI names starting with 'xml' are reserved.
at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2173)
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1264)
at OracleXML.Put_XML(OracleXML.java:467)
at OracleXML.ExecutePutXML(OracleXML.java:389)
at OracleXML.main(OracleXML.java:177)
Can anyone please let me know what I am doing wrong? ThanksPlease remove the xml declaration,
<?xml version="1.0" ?>, from the xml document. -
ISO8859 & UTF 8 default encoding
Hi:
My data comes to me with the ISO 8859 encoding. So it has the
umlauts and ess-sets (double dots over the character) in it. So
whenever I try to do
java OracleXMl putXMl
I got the error of Invlid UTF8 encoding. Even I have tried
mentioning in my first line of the data as
<?xml version="1.0" encoding="ISO-8859-1?>
OR
<?xml version="1.0" encoding="ISO8859_1"?>
both. Well I manually removed, as a testing, those characters
from the input file and tried. This time the error is
'PI names starting with 'xml' are reserved
Means I have to remove the first line also. So I assume that the
parser is not looking the first line at all.
Otherwise Could you please tell me where exactly I am making the
mistake?
Thanks
nullPrakash (guest) wrote:
: Yeah I am using v2.0.0.2 which I downloaded from OTN few days
: back. Since I was facing the problem of uploading control
: characters on your previous verison, I switched to v2. But
here I
: am facing this problem
: V Prakash
: Oracle XML Team wrote:
: : Prakash (guest) wrote:
: : : Hi:
: : : My data comes to me with the ISO 8859 encoding. So it has
the
: : : umlauts and ess-sets (double dots over the character) in
it.
: So
: : : whenever I try to do
: : : java OracleXMl putXMl
: : : I got the error of Invlid UTF8 encoding. Even I have tried
: : : mentioning in my first line of the data as
: : : <?xml version="1.0" encoding="ISO-8859-1?>
: : : OR
: : : <?xml version="1.0" encoding="ISO8859_1"?>
: : : both. Well I manually removed, as a testing, those
characters
: : : from the input file and tried. This time the error is
: : : 'PI names starting with 'xml' are reserved
: : : Means I have to remove the first line also. So I assume
that
: : the
: : : parser is not looking the first line at all.
: : : Otherwise Could you please tell me where exactly I am
making
: : the
: : : mistake?
: : : Thanks
: : Are you using v2.0.0.2 of the Java XML Parser? If not please
: try
: : it.
: : Oracle XML Team
: : http://technet.oracle.com
: : Oracle Technology Network
Please try again with the production version (2.0.2) of the
parser which just got released. If you are still having
problems, please send an email to [email protected] with your
xml file and dtd if applicable as an attachment.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null -
Loading Datagrams with XML SQL Ulitility
I am trying to exercise the following command from Steve's book Chapter 12.
java OracleXML putXML -user xmlbook/xmlbook -filename out.xml newsstory
I get a class not found error.
Can you tell me where I can find the OracleXML in the PATH assuming I have installed everything correctly ?Hi Frank,
Frank, make sure that the two "select xmlgen....." are
returning a valid XML document. If these aren't working let me
know, otherwise add a:
set serveroutput on
after the commit.
Also, before you do this, restore oraclexmlsqltest.sql to its
original state ... the exception section was masking exceptions
which we are aware we generate. If you look closely you will see
that we do a very rough job outputing the lob containing the XML
document (we print out past the length of the LOB, which raises
an exception).
Let me know what happens.
Frank Hubeny (guest) wrote:
: I have been unable to get the sample code to run successfully
: after installing the XML SQL Utility on Oracle 8.1.5.0.0 on
: Windows NT4 Service Pack 4.
: To make sure I was doing nothing wrong, I reinstalled Oracle 8i
: and loaded all the java into scott/tiger. Also the PLXMLPARSER
: codes does appear to run correctly. At least the samples seem
to
: work.
: I tried to use the oraclexmlsqlload.bat script, but the script
: stopped after after loading oraclexmlsql.jar. So I ran each of
: the loadjava scripts on the command line. They exited without
: errors. Even the xmlgen package installed without errors. But
: when I ran oraclexmlsqltest.sql, I got a message that said the
: procedure completed successfully, but there was not output.
: I put a dbms_output.put_line(SQLCODE) with each of the two
: exceptions and got the following error. The procedure actually
: failed on "when others" with error -29531. According to the
: Error Manual this is
: ORA-29531 no method string in class string
: Cause: An attempt was made to execute a non-existent method in
a
: Java class.
: Action: Adjust the call or create the specified method.
: At this point I am not sure what to do.
Oracle Technology Network
http://technet.oracle.com
null -
Java.lang.UnsatisfiedLinkError: no ocijdbc8
I received the java.lang.UnsatisfiedLinkError: no ocijdbc8 error while running the following command:
java OracleXML putXML -user xxx/xxx .....
I saw a few posts regarding dll files for NT but nothing for AIX.
Any help would be greatly appreciated.
Thanks,
JohnHi Jinyu,
Here are the things I was checking for to fix this error.
I made sure the xsu12.jar and classes12.zip file were in the classpath, and they are.
I made sure the directory that contains the libocijdbc8.so library was in the classpath. It wasn't so I added it.
I added the directory that holds the libocijdbc8.so library to the LD_LIBRARY_PATH env variable.
Thanks,
John -
XML problem in 8.0.5
Hi I am using Oracle 8.0.5. Just now downloaded "XML SQL Utility
for Java". Well. when I try to execute the file ( I am working on
Solaris, and jdk1.1.6) oraclexmlsqlload.csh it is giving me the
following error:
Loading jar files...
Loading xmlparser...
Loading oraclexmlsql.jar...
Cleaning up...
Completed loading classes
Creating functions...
SQL*Plus: Release 8.0.5.0.0 - Production on Fri Jul 2 12:42:26
1999
(c) Copyright 1998 Oracle Corporation. All rights reserved.
Connected to:
Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
PL/SQL Release 8.0.5.0.0 - Production
Package dropped.
DOC>==============================================================================
DOC>NAME
DOC> XMLGEN - xml generation pl/sql package
DOC>
DOC>DESCRIPTION
DOC> XMLGEN is a PL/SQL wrapper of the OracleXMLStore java
class.
DOC>-------------------------------------------------------------------------------
DOC>-----------------------------------------------------------------------------*/
Package created.
No errors.
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY XMLGEN:
LINE/COL ERROR
4/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
8/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
12/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
LINE/COL ERROR
the following:
:= . ( @ % ; not null range renames default character
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
16/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
20/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
LINE/COL ERROR
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
24/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
28/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
LINE/COL ERROR
The symbol ":= was inserted before "NAME" to continue.
41/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
45/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
LINE/COL ERROR
49/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
53/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
LINE/COL ERROR
57/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
61/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
61/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
the following:
:= . ( @ % ; not null range renames default character
The symbol ":= was inserted before "NAME" to continue.
71/20 PLS-00103: Encountered the symbol "NAME" when expecting
one of
LINE/COL ERROR
the following:
:= . ( @ % ; not null range renames default character
Disconnected from Oracle8 Enterprise Edition Release 8.0.5.0.0 -
Production
PL/SQL Release 8.0.5.0.0 - Production
Testing..
SQL*Plus: Release 8.0.5.0.0 - Production on Fri Jul 2 12:42:30
1999
(c) Copyright 1998 Oracle Corporation. All rights reserved.
Connected to:
Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
PL/SQL Release 8.0.5.0.0 - Production
SQL>
SQL> Rem Use these to test the results..
SQL> select xmlgen.getXML('select * from
prakash.bv_alert_spec',1) from dual;
select xmlgen.getXML('select * from prakash.bv_alert_spec',1)
from dual
ERROR at line 1:
ORA-06571: Function GETXML does not guarantee not to update
database
SQL> select xmlgen.getXML('select * from all_Tables where
owner=''PRAKASH''') from dual;
select xmlgen.getXML('select * from all_Tables where
owner=''PRAKASH''') from dual
ERROR at line 1:
ORA-06571: Function GETXML does not guarantee not to update
database
SQL>
SQL> Rem
SQL>
SQL>
SQL> commit;
Commit complete.
SQL>
SQL> Rem Test out the PL/SQL side
SQL> declare
2 xmlString CLOB := null;
3 -- Here we are reading 250 bytes at a time. We should be
really reading a
4 -- whole chunk. dbms_output.put_line can only accomodate 256
characters per line
5 -- so we have this limitation.
6 amount integer:= 255;
7 position integer := 1;
8 charString varchar2(255);
9
2 xmlString CLOB := null;
3 -- Here we are reading 250 bytes at a time. We should be
really reading a
4 -- whole chunk. dbms_output.put_line can only accomodate 256
characters per line
5 -- so we have this limitation.
6 amount integer:= 255;
7 position integer := 1;
8 charString varchar2(255);
9
10 begin
11
12 xmlgen.setRowTag('EMP_ROW');
13 xmlgen.setRowsetTag('EMP_RESULTS');
14 xmlgen.setMaxRows(3);
15 xmlgen.setskipRows(2);
16 xmlgen.useLowerCaseTagNames();
17 xmlgen.setErrorTag('ERROR_RESULT');
18 xmlgen.setRowIdAttrName('ENO');
19 xmlgen.setRowIdColumn('EMPNO');
20 xmlgen.useNullAttributeIndicator(false);
21 xmlgen.setStyleSheet('http://www.oracle.com/xsl');
22
23 xmlString := xmlgen.getXML('select * from
prakash.bv_alert_spec',1);
24
25 dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
26 loop
27 dbms_lob.read(xmlString,amount,position,charString);
28 dbms_output.put_line(charString);
29 position := position + amount;
30 end loop;
31
32 exception
33 when no_data_found then
34 dbms_lob.close(xmlString);
35 dbms_lob.freetemporary(xmlString);
36 xmlgen.resetOptions;
37 when others then
38 xmlgen.resetOptions;
39 end;
40 /
dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
ERROR at line 25:
ORA-06550: line 25, column 37:
PLS-00302: component 'LOB_READONLY' must be declared
ORA-06550: line 25, column 4:
PL/SQL: Statement ignored
ORA-06550: line 34, column 14:
PLS-00302: component 'CLOSE' must be declared
ORA-06550: line 34, column 5:
PL/SQL: Statement ignored
ORA-06550: line 35, column 14:
PLS-00302: component 'FREETEMPORARY' must be declared
ORA-06550: line 35, column 5:
PL/SQL: Statement ignored
SQL>
SQL> exit
Disconnected from Oracle8 Enterprise Edition Release 8.0.5.0.0 -
Production
PL/SQL Release 8.0.5.0.0 - Production
Done..
Please advise me regarding this. Whether it is a Code bug or some
env. variable to be set up? My intention is to load data into my
database. The data is in XML format.
Thanks
V Prakash
nullHi,
This is because you need to download the JDBC jar files and
shared libraries, freely available for download from the OTN
website (under Java/JDBC)
You would need to setup the LD_LIBRARY_PATH to point to the
directory where you put the lib file in case of UNIX.
Thx
Murali
Prakash (guest) wrote:
: Without executing the file
: I just tried java OracleXML. Then I am getting the following
: error:
: java OracleXML putXML -user prakash/prakash123@dbs1 -fileName
: data.txt y_sig_event
: java.lang.UnsatisfiedLinkError: no oci805jdbc in shared library
: path
: at java.lang.Throwable.<init>(Compiled Code)
: at java.lang.Error.<init>(Compiled Code)
: at java.lang.LinkageError.<init>(Compiled Code)
: at java.lang.UnsatisfiedLinkError.<init>(Compiled Code)
: at java.lang.Runtime.loadLibrary(Compiled Code)
: at java.lang.System.loadLibrary(Compiled Code)
: at oracle.jdbc.oci7.OCIDBAccess.logon(Compiled Code)
: at oracle.jdbc.driver.OracleConnection.<init>(Compiled
: Code)
: at oracle.jdbc.driver.OracleDriver.connect(Compiled
Code)
: at java.sql.DriverManager.getConnection(Compiled Code)
: at java.sql.DriverManager.getConnection(Compiled Code)
: at OracleXML.getConnection(Compiled Code)
: at OracleXML.Put_XML(Compiled Code)
: at OracleXML.ExecutePutXML(Compiled Code)
: at OracleXML.Execute(Compiled Code)
: at OracleXML.main(Compiled Code)
: I am not doing any server side programming or anything. I just
: wanted to upload a data which is in XML format.
: V Prakash
: Prakash (guest) wrote:
: : Hi I am using Oracle 8.0.5. Just now downloaded "XML SQL
: Utility
: : for Java". Well. when I try to execute the file ( I am
working
: on
: : Solaris, and jdk1.1.6) oraclexmlsqlload.csh it is giving me
the
: : following error:
: : Loading jar files...
: : Loading xmlparser...
: : Loading oraclexmlsql.jar...
: : Cleaning up...
: : Completed loading classes
: : Creating functions...
: : SQL*Plus: Release 8.0.5.0.0 - Production on Fri Jul 2
12:42:26
: : 1999
: : (c) Copyright 1998 Oracle Corporation. All rights reserved.
: : Connected to:
: : Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
: : PL/SQL Release 8.0.5.0.0 - Production
: : Package dropped.
DOC>=============================================================
=================
: : DOC>NAME
: : DOC> XMLGEN - xml generation pl/sql package
: : DOC>
: : DOC>DESCRIPTION
: : DOC> XMLGEN is a PL/SQL wrapper of the OracleXMLStore java
: : class.
: DOC>-----------------------------------------------------------
: DOC>-----------------------------------------------------------
: : Package created.
: : No errors.
: : Warning: Package Body created with compilation errors.
: : Errors for PACKAGE BODY XMLGEN:
: : LINE/COL ERROR
: : 4/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 8/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 12/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : LINE/COL ERROR
: : the following:
: : := . ( @ % ; not null range renames default
character
: : := . ( @ % ; not null range renames default character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 16/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 20/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : LINE/COL ERROR
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 24/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 28/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : LINE/COL ERROR
: : The symbol ":= was inserted before "NAME" to
continue.
: : 41/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 45/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : LINE/COL ERROR
: : 49/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 53/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : LINE/COL ERROR
: : 57/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 61/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : 61/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : the following:
: : := . ( @ % ; not null range renames default
character
: : The symbol ":= was inserted before "NAME" to
continue.
: : 71/20 PLS-00103: Encountered the symbol "NAME" when
: expecting
: : one of
: : LINE/COL ERROR
: : the following:
: : := . ( @ % ; not null range renames default
character
: : Disconnected from Oracle8 Enterprise Edition Release
8.0.5.0.0
: : Production
: : PL/SQL Release 8.0.5.0.0 - Production
: : Testing..
: : SQL*Plus: Release 8.0.5.0.0 - Production on Fri Jul 2
12:42:30
: : 1999
: : (c) Copyright 1998 Oracle Corporation. All rights reserved.
: : Connected to:
: : Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
: : PL/SQL Release 8.0.5.0.0 - Production
: : SQL>
: : SQL> Rem Use these to test the results..
: : SQL> select xmlgen.getXML('select * from
: : prakash.bv_alert_spec',1) from dual;
: : select xmlgen.getXML('select * from prakash.bv_alert_spec',1)
: : from dual
: : ERROR at line 1:
: : ORA-06571: Function GETXML does not guarantee not to update
: : database
: : SQL> select xmlgen.getXML('select * from all_Tables where
: : owner=''PRAKASH''') from dual;
: : select xmlgen.getXML('select * from all_Tables where
: : owner=''PRAKASH''') from dual
: : ERROR at line 1:
: : ORA-06571: Function GETXML does not guarantee not to update
: : database
: : SQL>
: : SQL> Rem
: : SQL>
: : SQL>
: : SQL> commit;
: : Commit complete.
: : SQL>
: : SQL> Rem Test out the PL/SQL side
: : SQL> declare
: : 2 xmlString CLOB := null;
: : 3 -- Here we are reading 250 bytes at a time. We should be
: : really reading a
: : 4 -- whole chunk. dbms_output.put_line can only accomodate
: 256
: : characters per line
: : 5 -- so we have this limitation.
: : 6 amount integer:= 255;
: : 7 position integer := 1;
: : 8 charString varchar2(255);
: : 9
: : 2 xmlString CLOB := null;
: : 3 -- Here we are reading 250 bytes at a time. We should be
: : really reading a
: : 4 -- whole chunk. dbms_output.put_line can only accomodate
: 256
: : characters per line
: : 5 -- so we have this limitation.
: : 6 amount integer:= 255;
: : 7 position integer := 1;
: : 8 charString varchar2(255);
: : 9
: : 10 begin
: : 11
: : 12 xmlgen.setRowTag('EMP_ROW');
: : 13 xmlgen.setRowsetTag('EMP_RESULTS');
: : 14 xmlgen.setMaxRows(3);
: : 15 xmlgen.setskipRows(2);
: : 16 xmlgen.useLowerCaseTagNames();
: : 17 xmlgen.setErrorTag('ERROR_RESULT');
: : 18 xmlgen.setRowIdAttrName('ENO');
: : 19 xmlgen.setRowIdColumn('EMPNO');
: : 20 xmlgen.useNullAttributeIndicator(false);
: : 21 xmlgen.setStyleSheet('http://www.oracle.com/xsl');
: : 22
: : 23 xmlString := xmlgen.getXML('select * from
: : prakash.bv_alert_spec',1);
: : 24
: : 25 dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
: : 26 loop
: : 27 dbms_lob.read(xmlString,amount,position,charString);
: : 28 dbms_output.put_line(charString);
: : 29 position := position + amount;
: : 30 end loop;
: : 31
: : 32 exception
: : 33 when no_data_found then
: : 34 dbms_lob.close(xmlString);
: : 35 dbms_lob.freetemporary(xmlString);
: : 36 xmlgen.resetOptions;
: : 37 when others then
: : 38 xmlgen.resetOptions;
: : 39 end;
: : 40 /
: : dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
: : ERROR at line 25:
: : ORA-06550: line 25, column 37:
: : PLS-00302: component 'LOB_READONLY' must be declared
: : ORA-06550: line 25, column 4:
: : PL/SQL: Statement ignored
: : ORA-06550: line 34, column 14:
: : PLS-00302: component 'CLOSE' must be declared
: : ORA-06550: line 34, column 5:
: : PL/SQL: Statement ignored
: : ORA-06550: line 35, column 14:
: : PLS-00302: component 'FREETEMPORARY' must be declared
: : ORA-06550: line 35, column 5:
: : PL/SQL: Statement ignored
: : SQL>
: : SQL> exit
: : Disconnected from Oracle8 Enterprise Edition Release
8.0.5.0.0
: : Production
: : PL/SQL Release 8.0.5.0.0 - Production
: : Done..
: : Please advise me regarding this. Whether it is a Code bug or
: some
: : env. variable to be set up? My intention is to load data into
: my
: : database. The data is in XML format.
: : Thanks
: : V Prakash
null -
XSL-1009: Attribute 'xsl:version' not found in 'BatchDelivery'.
I have seen this error in many postings and have never understood just what was being transgressed. I am trying to prepare an xml file for inserting into a table using OracleXML putXML but I never get that far. I have exhausted all my guesses and interpretations of others' postings.
C:\oracle\Samples\BatchDelivery>oraxsl -debug batchdelivery.xsl batchdelivery.txt out.xml
Error occurred while processing batchdelivery.txt: file:/C:/oracle/Samples/Batch
Delivery/batchdelivery.txt<Line 2, Column 83>: XSL-1009: Attribute 'xsl:version' not found in 'BatchDelivery'.
C:\oracle\Samples\BatchDelivery>
batchdelivery.xsl:
<ROWSET xsl.version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/Transform" >
<xsl:for-each select="BatchDelivery/BatchConfiguration">
<ROW >
<KEYCONFIGID><xsl:value-of select="KeyConfigID"/></KEYCONFIGID>
<CARDREQUIREMENTSID><xsl:value-of select="CARDREQUIREMENTSID"/></CARDREQUIREMENTSID>
<CARDPRODUCTID><xsl:value-of select="CardProductID"/></CARDPRODUCTID>
<PHYSICALDESCRIPTIONID><xsl:value-of select="PhysicalDescriptionID"/></PHYSICALDESCRIPTIONID>
<LOGICALDESCRIPTIONID><xsl:value-of select="LogicalDescriptionID"/></LOGICALDESCRIPTIONID>
<PACKAGECONFIGID><xsl:value-of select="PackageConfigID"/></PACKAGECONFIGID>
</ROW>
</xsl:for-each>
</ROWSET>
batchdelivery.xml
<BatchDelivery xmlns="http://www.activcard.com/xml/ns/acms/batch/1.0" xmlns:xsl="http://www.w3.org/2001/XMLSchema-instance"
xsl:schemaLocation="http://www.activcard.com/xml/ns/acms/batch/1.0/batch_1.0.xsd">
<Header>
<DocID>BD-CAC-0000000001</DocID>
<Date>2001-06-15T00:00:00</Date>
<Author>Oberthur</Author>
<Comment>Batch Delivery sample</Comment>
</Header>
<DeliveryPlaceInfo>
<DeliveryPlaceID>OCS-01</DeliveryPlaceID >
<OrganizationName>Oberthur</OrganizationName>
<Address>1600 Vault St</Address>
<City>Storage City</City>
<ZipCode>33333</ZipCode>
<State>CA</State>
<Country>USA</Country>
<MainContactPerson>
<PersonName>joeDoe</PersonName>
<Tel1>1-608-578-5000</Tel1>
<Tel2/>
<Fax/>
<Email>[email protected]</Email>
</MainContactPerson>
</DeliveryPlaceInfo>
<CardManufacturerInfo>
<CardManufacturerID>Oberthur-01</CardManufacturerID>
<OrganizationName>Oberthur Card Systems</OrganizationName>
<Address/>
<City/>
<ZipCode/>
<State/>
<Country/>
<MainContactPerson>
<PersonName/>
<Tel1/>
<Tel2/>
<Fax/>
<Email/>
</MainContactPerson>
</CardManufacturerInfo>
<BatchConfiguration>
<KeyConfigID>0000000002</KeyConfigID> <CardRequirementsID>0000000001</CardRequirementsID>
<CardProductID>0000000002</CardProductID> <PhysicalDescriptionID>0000000001</PhysicalDescriptionID>
<LogicalDescriptionID>0000000001</LogicalDescriptionID>
<PackageConfigID>0000000001</PackageConfigID>
</BatchConfiguration>
</BatchDelivery>I am cursed by the tendency to mistype whenever I repeatedly cut/paste/test/post! Changing the "." to ":" has no affect whatsoever. I wish it did!
Mike -
To Steve Muench - VERY URGENT!!!
I am getting this error:
ORA-20001: ORA-29532: Java call terminated by uncaught Java exception:
oracle.xml.sql.OracleXMLSQLException: Exception
'java.lang.IllegalArgumentException:Timestamp format must be yyyy-mm-dd
hh:mm:ss.fffffffff' encountered during processing ROW element 0All prior XML
row changes were rolled back. in the XML document.
Trying to insert this:
(xml)
<ROWSET>
<ROW num="1">
<OUT_ID>8879</OUT_ID>
<OUT_STATUS>OPN</OUT_STATUS>
<FIRST_RPT_TS>03/01/2002 13:06:41</FIRST_RPT_TS>
<CUST_CNT>5</CUST_CNT>
<O_CALL_CNT>0</O_CALL_CNT>
<DEV_TYP>999</DEV_TYP>
<ETOR_TS>03/01/2002 13:06:41</ETOR_TS>
<TRBL_CD>BIG</TRBL_CD>
<CIRCUIT>CT-100</CIRCUIT>
<CREW>PIKE</CREW>
<OPR_CMT>THIS IS A TEST COMMENT</OPR_CMT>
<TRANS>
<TRANS_ITEM>
<OUT_ID>8879</OUT_ID>
<TRNFRMR_ID>011426065</TRNFRMR_ID>
<INIT_TS>03/01/2002 13:06:41</INIT_TS>
</TRANS_ITEM>
<TRANS_ITEM>
<OUT_ID>8877</OUT_ID>
<TRNFRMR_ID>011426066</TRNFRMR_ID>
<INIT_TS>03/01/2002 13:06:41</INIT_TS>
</TRANS_ITEM>
</TRANS>
</ROW>
</ROWSET>
I am actually calling this in stored proc, that does an insert into the view. Which in turn trigger's the 'trigger'.
insNum := 0;
xmlGen.setRowTag('ROW');
xmlGen.setRaiseException(TRUE);
xmlGen.setCommitBatch(1);
xmlGen.setDateFormat('M/d/yyyy HH:mm:ss');
insNum := xmlGen.insertXML(pi_stblName, pi_sXmlDOC);
this parm 'pi_stblName' has this value 'OUTAGE_V'. Which is defined below. The 'pi_sXmlDOC' parm is the XML doc above.
into this view:
(outage_v)
MSGTYPE NUMBER
OUT_ID NOT NULL CHAR(32)
OUT_STATUS NOT NULL CHAR(3)
FIRST_RPT_TS NOT NULL DATE
CUST_CNT NUMBER(7)
O_CALL_CNT NUMBER(7)
DEV_TYP NUMBER(22)
END_TS DATE
ETOR_TS DATE
TRBL_CD NOT NULL VARCHAR2(64)
PO_DEV VARCHAR2(32)
CIRCUIT VARCHAR2(32)
CREW VARCHAR2(38)
OPR_CMT VARCHAR2(255)
TRANS TRANS_LIST
The error occurs in the trigger when the loop is executing with the TRANS_list.
SELECT 0 AS MSGTYPE,
O.OUT_ID,
O.OUT_STATUS,
O.FIRST_RPT_TS,
O.CUST_CNT,
O.O_CALL_CNT,
O.DEV_TYP,
O.END_TS,
O.ETOR_TS,
O.TRBL_CD,
O.PO_DEV,
O.CIRCUIT,
O.CREW,
O.OPR_CMT,
CAST(MULTISET(SELECT
OUT_ID,
TRNFRMR_ID,
INIT_TS
FROM OMS.OUTAGE_TRANSFORMER OT
WHERE OT.OUT_ID = O.OUT_ID) AS TRANS_LIST) TRANS
FROM OMS.OUTAGE O
TABLES:
(OUTAGE)
OUT_ID NOT NULL CHAR(32)
OUT_STATUS NOT NULL CHAR(3)
FIRST_RPT_TS NOT NULL DATE
CUST_CNT NUMBER(7)
O_CALL_CNT NUMBER(7)
DEV_TYP NUMBER(22)
END_TS DATE
ETOR_TS DATE
TRBL_CD NOT NULL VARCHAR2(64)
PO_DEV VARCHAR2(32)
CIRCUIT VARCHAR2(32)
CREW VARCHAR2(38)
OPR_CMT VARCHAR2(255)
(OUTAGE_TRANSFORMER)
OUT_ID NOT NULL CHAR(32)
TRNFRMR_ID NOT NULL CHAR(32)
INIT_TS NOT NULL DATE
OBJECT TYPE:
(OUTAGE_TRANS_T)
OUT_ID CHAR(32)
TRNFRMR_ID CHAR(32)
INIT_TS DATE
CREATE OR REPLACE TYPE OUTAGE_TRANS_T AS OBJECT (
OUT_ID CHAR(32),
TRNFRMR_ID CHAR(32),
INIT_TS DATE
CREATE TYPE "TRANS_LIST" AS
TABLE OF "OUTAGE_TRANS_T"
TRIGGER:
CREATE OR REPLACE TRIGGER instead_of_insert_on_Outage
INSTEAD OF INSERT ON OUTAGE_V
FOR EACH ROW
DECLARE
liOUTID NUMBER;
tran_t OUTAGE_TRANS_T;
trans_l TRANS_LIST;
iMSGTYPE NUMBER;
BEGIN
BEGIN
iMSGTYPE := :new.MSGTYPE;
SELECT COUNT(*)
INTO liOUTID
FROM
OMS.OUTAGE O
WHERE
O.OUT_ID = :new.OUT_ID AND
O.OUT_STATUS = :new.OUT_STATUS AND
O.OPR_CMT = :new.OPR_CMT AND
O.CREW = :new.CREW AND
O.ETOR_TS = :new.ETOR_TS AND
O.PO_DEV = :new.PO_DEV AND
O.DEV_TYP = :new.DEV_TYP AND
O.CIRCUIT=:NEW.CIRCUIT AND
3 = iMSGTYPE;
/* IF WE FOUND IT EXIT WE DON'T NEED TO UPDATE */
IF liOUTID > 0
THEN
GOTO get_out; /* this means we already have this info */
else
liOUTID := 0;
end if;
/* DELETE FROM OT AND O TABLES */
if iMSGTYPE = 2
THEN
DELETE FROM OMS.OUTAGE_TRANSFORMER OT
WHERE
OT.OUT_ID = :new.OUT_ID;
DELETE FROM OMS.OUTAGE O
WHERE
O.OUT_ID = :new.OUT_ID;
GOTO get_out;
END IF;
SELECT COUNT(*)
INTO liOUTID
FROM OMS.OUTAGE O
WHERE O.OUT_ID = :new.OUT_ID;
IF liOUTID > 0
THEN
UPDATE OMS.OUTAGE
SET
OUT_STATUS=:NEW.OUT_STATUS,
FIRST_RPT_TS=:NEW.FIRST_RPT_TS,
CUST_CNT=:NEW.CUST_CNT,
O_CALL_CNT=:NEW.O_CALL_CNT,
DEV_TYP=:NEW.DEV_TYP,
END_TS=:NEW.END_TS,
ETOR_TS=:NEW.ETOR_TS,
TRBL_CD=:NEW.TRBL_CD,
PO_DEV=:NEW.PO_DEV,
CIRCUIT=:NEW.CIRCUIT,
CREW=:NEW.CREW,
OPR_CMT=:NEW.OPR_CMT
WHERE
OUT_ID=:NEW.OUT_ID;
FOR i IN 1..trans_l.COUNT LOOP
tran_t := trans_l(i);
INSERT INTO OMS.OUTAGE_TRANSFORMER
(OUT_ID,
TRNFRMR_ID,
INIT_TS)
VALUES
(tran_t.OUT_ID,
tran_t.TRNFRMR_ID,
to_date(tran_t.INIT_TS, 'mm/dd/yyyy hh24:mi:ss'));
END LOOP;
ELSIF liOUTID = 0
THEN
INSERT INTO OMS.OUTAGE(
OUT_ID,
OUT_STATUS,
FIRST_RPT_TS,
CUST_CNT,
O_CALL_CNT,
DEV_TYP,
END_TS,
ETOR_TS,
TRBL_CD,
PO_DEV,
CIRCUIT,
CREW,
OPR_CMT)
VALUES(
:NEW.OUT_ID,
:NEW.OUT_STATUS,
:NEW.FIRST_RPT_TS,
:NEW.CUST_CNT,
:NEW.O_CALL_CNT,
:NEW.DEV_TYP,
:NEW.END_TS,
:NEW.ETOR_TS,
:NEW.TRBL_CD,
:NEW.PO_DEV,
:NEW.CIRCUIT,
:NEW.CREW,
:NEW.OPR_CMT);
trans_l := :new.TRANS;
FOR i IN 1..trans_l.COUNT LOOP
tran_t := trans_l(i);
INSERT INTO OMS.OUTAGE_TRANSFORMER
(OUT_ID,
TRNFRMR_ID,
INIT_TS)
VALUES
(tran_t.OUT_ID,
tran_t.TRNFRMR_ID,
to_date(tran_t.INIT_TS, 'mm/dd/yyyy hh24:mi:ss'));
END LOOP;
END IF;
<<get_out>>
NULL;
EXCEPTION
WHEN OTHERS
THEN
-- outageHandler.LogErrMsg('instead_of_insert_on_Outage', TO_CHAR(SQLCODE), SQLERRM);
END;
END;I'm not Steve.:-) But I think you probably can try to use:
"MM/dd/yyyy HH:mm:ss"
I've made a simple test case for this and it works OK. Here is the sample for your reference:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW>
<TS>03/01/2002 13:06:41</TS>
</ROW>
</ROWSET>
SQL File:
drop table test;
create table test
TS DATE
Command:
java OracleXML putXML -user "xdkplsql/xdkplsql" -dateFormat "MM/dd/yyyy HH:mm:ss" -fileName try.xml test
Maybe you are looking for
-
Siliconmotion video driver no longer working
Updating xorg broke the siliconmotion video driver - the new module no longer works with my hardware - an asus laptop. I have to use vesa at 16. In previous incarnations I was able to fall back or build direct from xorg but the previous versions no
-
Error:express document "Update was terminated" received from author
Hi All, I m creating shipment frm the transaction VL01. While creating the shimpment i am assigning one Z output type and clicking on the planning phase on the shipment. After that i am saving my shipment. At this point of time my shimpmnet is create
-
Broken fridge for almost 2 months. Geeksquad issues..
Hello all. I was hoping I could get a responce from a forum admind on what I can do to properly get my fridge fixed asap.Here is the total process of my experiance from day 1. June 19th 2014 I make a call to get the ice machine repaired, it wasnt mak
-
Employee Data in Chinese and English
Hi, Is it possible to maintin the Employee Name in Chinese language along with English, example: Display employee data in chinese or input data in chinese while Logon language is EN. 1. Is there any Infotype where the Employee name could be stored in
-
Do I need to upgrade both LR 5.7 and Camera Raw 8.7 to import files from Canon 7dMark2? or is LR 5.7 enough or is camera raw 8.7 enough