XML SQL Utility - OracleXMLStore?

I am stepping thru the release notes for the "Oracle XML SQL
Utility for Java". I have incorporated the env.csh into my
.cshrc file as shown below. I am currently trying to "Load the
Oracle XML SQL Utility for Java into an Oracle DB". I am having
problems running the oraclexmlsqlload.csh. It seems to run
@xmlgenpkg.sql without errors; however, the
@oraclexmlsqltest.sql produces the following error:
ERROR at line 1
class OracleXMLStore does not exist
at SCOTT.XMLGEN line 32
at line 38
class OracleXMLStore does not exist
Here is my .cshrc file
# @(#)cshrc 1.11 89/11/29 SMI
umask 022
set path=( /bin /usr/bin /usr/ucb /etc /usr/openwin/bin
/usr/local/bin /usr/sbin /usr/ccs/bin .)
if ( $?prompt ) then
set history=32
endif
#setenv ORACLE_HOME /usr/oracle-home
setenv ORACLE_BASE /usr/oracle
setenv ORACLE_HOME /usr/oracle/8.1.5
set path = ( $path $ORACLE_HOME/bin )
#setenv PATH $PATH:$ORACLE_HOME/bin:/usr/openwin/bin:/usr/sbin
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib
setenv ORACLE_SID p
setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data
setenv PD $ORACLE_HOME/OracleXSU
setenv CLASSPATHJ $ORACLE_HOME/jdbc/lib/classes111.zip
setenv XMLSQL_DIR $PD/lib/oraclexmlsql.jar:$PD
setenv ORACLE_PARSER $PD/lib/xmlparser.jar
setenv JDK_HOME /usr/java1.1
set CLASSPATH = ($ORACLE_PARSER $CLASSPATHJ $JDK_HOME
$XMLSQL_DIR)
setenv TNS_ADMIN $ORACLE_HOME/network/admin
setenv ORACLE_TERM sun5
echo 'Running .cshrc...'
alias ls ls -F
null

Oracle XML Team,
After running the initjvm script and re-executing
oraclexmlsqlload, no errors occurred. Also, the sample java
files which come with the kit worked correctly. Thanks for all
the help that you have provided. The support was fantastic!
Oracle XML Team wrote:
: Hello Ron,
: It sounds more and more like your db is not java enabled. To
: java enable it connect to it using server manager as internal
and
: then run the initjvm script (goto javavm/install directory and
: you should see the initjvm script). The other option which
would
: make life easier is for you to contact your dba. Let me know
how
: things go.
: Ron Newby (guest) wrote:
: : Ahhhh, executing the script with csh started several
loading...
: : and creating... commands; however, an error did occur:
: : Creating xmlparser _2.0.0.1.0_beta
: : Error creating xmlparser _2.0.0.1.0_beta
: : ORA-29547 Java system class not available
: : oracle/aurora/rdbms/Compiler
: : After this error, several "ORA-29534 referenced object...
could
: : not be resolved" errors occured.
: : Oracle XML Team wrote:
: : : Your db might be already java initialized (if not, please
: : look
: : : at your documentation on how to do this). One problem that
I
: : did
: : : notice is that you are trying to execute a csh script in
sh.
: : : Please try
: : : $ csh oraclexmlsqlload.csh
: : : or
: : : $ tcsh oraclexmlsqlload.csh
: : : Let me know the outcome.
: : : Ron Newby (guest) wrote:
: : : : After a closer look at the output from running
: : : oraclexmlsqlload,
: : : : it doesn't look like the loadjava worked correctly. We
are
: : : : running Oracle 8.1.5. What is required to make the db
java
: : : : enabled? I have run the examples using the thin driver
: which
: : : : worked correctly. Below are the results of running
: : : : oraclexmlsqlload.csh.
: : : : $ sh oraclexmlsqlload.csh
: : : : Loading jar files...
: : : : Loading xmlparser...
: : : : loadjava: Usage: loadjava [-user user/password@database]
: : [-oci8
: : : |
: : : : -thin] [-help]
: : : : [-verbose] [-resolve] [-andresolve] [-force] [-synonym]
: : : : [-definer] [-resolver r
: : : : esolver] [-grant user,user...] [-schema schema] [-debug]
: : : : [-oracleresolver] class
: : : : es..jars..resources..properties...
: : : : Loading oraclexmlsql.jar...
: : : : loadjava: Usage: loadjava [-user user/password@database]
: : [-oci8
: : : |
: : : : -thin] [-help]
: : : : [-verbose] [-resolve] [-andresolve] [-force] [-synonym]
: : : : [-definer] [-resolver r
: : : : esolver] [-grant user,user...] [-schema schema] [-debug]
: : : : [-oracleresolver] class
: : : : es..jars..resources..properties...
: : : : Cleaning up...
: : : : dropjava: Usage: dropjava [-user user/password@database]
: : [-oci8
: : : |
: : : : -thin] [-help]
: : : : [-verbose] [-schema schema] [-debug]
: : : : classes..jars..resources..properties...
: : : : Completed loading classes
: : : : Creating functions...
: : : : SQL*Plus: Release 8.1.5.0.0 - Production on Fri Nov 26
: : 10:03:37
: : : : 1999
: : : : (c) Copyright 1999 Oracle Corporation. All rights
: reserved.
: : : : Enter password:
: : : : Oracle XML Team wrote:
: : : : : Hi Ron.
: : : : : Before creating the xmlgen pkg, oraclexmlsqlload.csh
: : tries
: : : to
: : : : : load the oracle xml parser and the oraclexmlsql.jar
into
: : your
: : : : db
: : : : : (i.e. it does a "loadjava..."). Is that part finishing
: : : : properly?
: : : : : Realize that to be able to run the utility within the
: db
: : : you
: : : : : need to have at least Oracle 8.1.5 and have it java
: : enabled.
: : : : If
: : : : : you don't have this you can always run the utility as a
: : : client
: : : : : connecting via the Oracle JDBC1.22 compliant drivers.
: : : : : Ron Newby (guest) wrote:
: : : : : : I am stepping thru the release notes for the "Oracle
: XML
: : : SQL
: : : : : : Utility for Java". I have incorporated the env.csh
: into
: : my
: : : : : : .cshrc file as shown below. I am currently trying to
: : "Load
: : : : the
: : : : : : Oracle XML SQL Utility for Java into an Oracle DB".
I
: am
: : : : : having
: : : : : : problems running the oraclexmlsqlload.csh. It seems
to
: : run
: : : : : : @xmlgenpkg.sql without errors; however, the
: : : : : : @oraclexmlsqltest.sql produces the following error:
: : : : : : ERROR at line 1
: : : : : : class OracleXMLStore does not exist
: : : : : : at SCOTT.XMLGEN line 32
: : : : : : at line 38
: : : : : : class OracleXMLStore does not exist
: : : : : : Here is my .cshrc file
: : : : : : # @(#)cshrc 1.11 89/11/29 SMI
: : : : : : umask 022
: : : : : : set path=( /bin /usr/bin /usr/ucb /etc
/usr/openwin/bin
: : : : : : /usr/local/bin /usr/sbin /usr/ccs/bin .)
: : : : : : if ( $?prompt ) then
: : : : : : set history=32
: : : : : : endif
: : : : : : #setenv ORACLE_HOME /usr/oracle-home
: : : : : : setenv ORACLE_BASE /usr/oracle
: : : : : : setenv ORACLE_HOME /usr/oracle/8.1.5
: : : : : : set path = ( $path $ORACLE_HOME/bin )
: : : : : : #setenv PATH
: : : : $PATH:$ORACLE_HOME/bin:/usr/openwin/bin:/usr/sbin
: : : : : : setenv LD_LIBRARY_PATH $ORACLE_HOME/lib
: : : : : : setenv ORACLE_SID p
: : : : : : setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data
: : : : : : setenv PD $ORACLE_HOME/OracleXSU
: : : : : : setenv CLASSPATHJ
$ORACLE_HOME/jdbc/lib/classes111.zip
: : : : : : setenv XMLSQL_DIR $PD/lib/oraclexmlsql.jar:$PD
: : : : : : setenv ORACLE_PARSER $PD/lib/xmlparser.jar
: : : : : : setenv JDK_HOME /usr/java1.1
: : : : : : set CLASSPATH = ($ORACLE_PARSER $CLASSPATHJ $JDK_HOME
: : : : : : $XMLSQL_DIR)
: : : : : : setenv TNS_ADMIN $ORACLE_HOME/network/admin
: : : : : : setenv ORACLE_TERM sun5
: : : : : : echo 'Running .cshrc...'
: : : : : : alias ls ls -F
: : : : : Oracle Technology Network
: : : : : http://technet.oracle.com
: : : Oracle Technology Network
: : : http://technet.oracle.com
: Oracle Technology Network
: http://technet.oracle.com
null

Similar Messages

  • Unable to load Oracle XML SQL utility

    The following error appears for each java
    class, when we attempt to load Oracle XML sql
    utility into Oracle using the oraclexmlsqlload
    script:
    E.g.
    Error while resolving class OracleXMLStore
    ORA-00904: invalid column name
    Does anyone know why we would receive this error?
    Platform: Hp-UX 11.0
    Oracle Version: 8.1.5.0
    Background information:
    The database was original created with the
    compatible=8.0.5 set in the init.ora file, and
    the creatation of java classes failed due to this,
    so switched compatible to 8.1.0. Now after we
    we adjusted the compatible setting and restarted
    database, we started to receive the errors as
    described above.
    null

    Murali,
    Thank you, after I initialized Oracle's javavm
    the errors disappeared.
    The scripts were located under the javavm/install
    directory.
    Thanks again.
    Murali K (guest) wrote:
    : Hi Steven,
    : Is the JavaVM loaded. i.e. are all the classes necessary for
    : running Java in the server are loaded into the server? The
    most
    : common answer to your problem is that the javavm has not been
    : initialized correctly or the database does not have all the
    java
    : library files necessary to load java programs.
    : Please read chapter 4 in the Oracle8i java developers guide
    : which talks about initializing a java-enabled database by
    : running the initjvm script.
    : If this still occurs then maybe it is a bug and we will have
    to
    : look at it.
    : Thx
    : Murali
    : Steven Wegner (guest) wrote:
    : : The following error appears for each java
    : : class, when we attempt to load Oracle XML sql
    : : utility into Oracle using the oraclexmlsqlload
    : : script:
    : : E.g.
    : : Error while resolving class OracleXMLStore
    : : ORA-00904: invalid column name
    : : Does anyone know why we would receive this error?
    : : Platform: Hp-UX 11.0
    : : Oracle Version: 8.1.5.0
    : : Background information:
    : : The database was original created with the
    : : compatible=8.0.5 set in the init.ora file, and
    : : the creatation of java classes failed due to this,
    : : so switched compatible to 8.1.0. Now after we
    : : we adjusted the compatible setting and restarted
    : : database, we started to receive the errors as
    : : described above.
    null

  • XML SQL Utility - persistent problems

    Hi,
    We are trying to install the XML SQL Utility for Oracle 8.1.5 on Solaris 2.6. We keep getting the problem OracleXMLStore could not be resolved. Based on different threads in this group, we have tried the following:
    1. Installed JDK 1.1.8 in place of the 1.1.3 that we had. This did not change the error.
    2. Carefully rechecked env.csh to ensure that the paths are all accurate.
    3. Ran initjvm from within the SVRMGR.
    The error we get is:
    ERROR at line 1:
    ORA-29541: class BETA_DEV.OracleXMLStore could not be resolved
    ORA-06512: at "BETA_DEV.XMLGEN", line 412
    ORA-06512: at line 10
    Any suggestions on what to try next?
    Thanks!

    Select * from User_errors
    and see what errors are preventing it from being resolved. This might give a clue...

  • XML SQL utility ( Urgent)

    Hi,
    I am trying to install XML SQL utility. I have jdk1.2.2 and
    oracle xml parser v2. I ran the env.bat file. Then when I try to
    run the oraclexmlsqlload.sql file i got 822 errors. Then I try
    to run the first file "loadjava -resolve -verbose -user %
    USER_PASSWORD% xmlparser.jar" I got some these kind of errors,
    resolving: org/w3c/dom/html/HTMLBodyElement
    Error while resolving class org/w3c/dom/html/HTMLBodyElement
    ORA-04043: object org/w3c/dom/html/HTMLBodyElement does not
    exist
    resolving: org/xml/sax/helpers/LocatorImpl
    Error while resolving class org/xml/sax/helpers/LocatorImpl
    ORA-04043: object org/xml/sax/helpers/LocatorImpl does not
    exist
    resolving: oracle/xml/parser/v2/Axis
    Error while resolving class oracle/xml/parser/v2/Axis
    ORA-04043: object oracle/xml/parser/v2/Axis does not exist
    resolving: oracle/xml/parser/v2/PathExpr
    Error while resolving class oracle/xml/parser/v2/PathExpr
    ORA-04043: object oracle/xml/parser/v2/PathExpr does not
    exist
    resolving: oracle/xml/parser/v2/FromDescPrecedingSibling
    Error while resolving class
    oracle/xml/parser/v2/FromDescPrecedingSibling
    ORA-04043: object
    oracle/xml/parser/v2/FromDescPrecedingSibling does not exi
    st
    "I GOT SOME VIEW/TABLE DOES NOT EXIST ERROR ALSO"
    Here is my env.bat file..................
    rem Copyright (c) Oracle Corporation 1999. All Rights Reserved.
    rem
    rem NAME
    rem env
    rem
    rem DESCRIPTION
    rem environmental variables needed to compile or run
    OracleXML utility
    rem
    rem ------------------------ oraclexmlsql utility directory path
    rem set PD to point to the directory in which you expanded the
    zip file
    set PD=C:\Oracletools\OracleXSU
    rem ------------------------ JDBC classes
    set CLASSPATHJ=D:\Oracle\Ora8i\jdbc\lib\classes111.zip
    rem ------------------------
    rem This need not be changed
    set XMLSQL_DIR=%PD%\lib\oraclexmlsql.jar;%PD%;%PD%\src;%PD%\lib;%
    PD%\sample
    rem ------------------------ Oracle XML parser settings
    rem This need not be changed
    set ORACLE_PARSER=%PD%\lib\xmlparser.jar
    rem ------------------------ JDK_HOME
    set JDK_HOME=C:\JDK1.2.2
    rem ------------------------ CLASSPATH settings
    set CLASSPATH=%ORACLE_PARSER%;%CLASSPATHJ%;%JDK_HOME%
    \lib\classes.zip;%XMLSQL_DIR%;%CLASSPATH%
    I need urgent help from you...........
    Thanks,
    Chandran...
    null

    Hi,
    Here is the problem. As per your suggestion I had installed
    Jdk1.8.8 and jdbc driver too. Though I am having one JDBC driver
    in oracle8i, I have downloaded from your site and set the env
    path and run the env.bat file. Then when I tried to execute the
    Java OracleXML getXML -user "scott/tiger" "select * from emp"
    file I got runtime error. But first time what I did was I had
    already run the oraclexmlsqlload file so there are lot of
    chances for OracleXML class file to be deleted. So Again I ran
    the oraclexmlsqlload bat file, so definitely it should load the
    oraclexmlsql file and xmlparser file. I didn't get any error. So
    I tried the file for xmlgenpkg it says package created with no
    errors and when I tried the oraclexmlsqltest file I got the same
    error...what I did get yesterday............
    Here is the output , please help me out....
    SQL> @C:\Oracletools\OracleXSU\lib\oraclexmlsqltest.sql;
    SQL> Rem
    SQL> Rem $Header: oraclexmlsqltest.sql 27-jul-99.22:53:37
    vnimani Exp $
    SQL> Rem
    SQL> Rem oraclexmlsqltest.sql
    SQL> Rem
    SQL> Rem Copyright (c) Oracle Corporation 1999. All Rights
    Reserved.
    SQL> Rem
    SQL> Rem NAME
    SQL> Rem oraclexmlsqltest.sql - <one-line expansion of
    the name>
    SQL> Rem
    SQL> Rem DESCRIPTION
    SQL> Rem <short description of component this file
    declares/defines>
    SQL> Rem
    SQL> Rem NOTES
    SQL> Rem <other useful comments, qualifications, etc.>
    SQL> Rem
    SQL> Rem MODIFIED (MM/DD/YY)
    SQL> Rem vnimani 07/27/99 - add testing for
    setStyleSheetType
    SQL> Rem vnimani 06/19/99 -
    Rem mkrishna 06/13/99 -
    Rem mkrishna 06/13/99 - add more testsSQL> Rem mkrishna 05/27/99 - sql testing the db loaded util
    SQL> Rem mkrishna 05/27/99 - Created
    SQL> Rem
    SQL>
    SQL> Rem Do not set serveroutput to be on here. There are
    problems (bug) when the
    SQL> Rem serveroutput is turned on before the last PL/SQL block
    is executed.
    SQL>
    SQL> set long 4000
    SQL> set pages 8000
    SQL> set echo on
    SQL>
    SQL> Rem Use these to test the results..
    SQL> select xmlgen.getXML('select * from scott.emp',1) from dual;
    select xmlgen.getXML('select * from scott.emp',1) from dual
    ERROR at line 1:
    ORA-29540: class OracleXMLStore does not exist
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at line 1
    SQL> select xmlgen.getXML('select * from all_Tables where
    owner=''SCOTT''') from dual;
    select xmlgen.getXML('select * from all_Tables where
    owner=''SCOTT''') from dual
    ERROR at line 1:
    ORA-29540: class OracleXMLStore does not exist
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at line 1
    SQL>
    SQL> Rem
    SQL>
    SQL>
    SQL> commit;
    Commit complete.
    Thanks,
    Chan...
    Oracle XML Team wrote:
    : Hi Chan,
    : Soon we will release a version of the XSU which runs with
    : JDK1.2 but for now the XSU requires JDK1.1.x. Also, your
    : Oracle8i (or later) database must be java enabled.
    : for starters, try and run the command line front end of the
    : utility:
    : java OracleXML getXML -user "scott/tiger" "select * from emp"
    : once you get this part running then proceed trying to load
    the
    : utility into the db. Note, to run the command line front end
    you
    : will need to have the Oracle JDBC drivers for use with
    JDK1.1.x.
    : They are freely available from:
    : technet.oracle.com/tech/java/sqlj_jdbc
    : Chan (guest) wrote:
    : : Hi,
    : : I am trying to install XML SQL utility. I have jdk1.2.2
    and
    : : oracle xml parser v2. I ran the env.bat file. Then when I try
    : to
    : : run the oraclexmlsqlload.sql file i got 822 errors. Then I
    try
    : : to run the first file "loadjava -resolve -verbose -user %
    : : USER_PASSWORD% xmlparser.jar" I got some these kind of
    errors,
    : : resolving: org/w3c/dom/html/HTMLBodyElement
    : : Error while resolving class org/w3c/dom/html/HTMLBodyElement
    : : ORA-04043: object org/w3c/dom/html/HTMLBodyElement does
    not
    : : exist
    : : resolving: org/xml/sax/helpers/LocatorImpl
    : : Error while resolving class org/xml/sax/helpers/LocatorImpl
    : : ORA-04043: object org/xml/sax/helpers/LocatorImpl does
    not
    : : exist
    : : resolving: oracle/xml/parser/v2/Axis
    : : Error while resolving class oracle/xml/parser/v2/Axis
    : : ORA-04043: object oracle/xml/parser/v2/Axis does not
    exist
    : : resolving: oracle/xml/parser/v2/PathExpr
    : : Error while resolving class oracle/xml/parser/v2/PathExpr
    : : ORA-04043: object oracle/xml/parser/v2/PathExpr does not
    : : exist
    : : resolving: oracle/xml/parser/v2/FromDescPrecedingSibling
    : : Error while resolving class
    : : oracle/xml/parser/v2/FromDescPrecedingSibling
    : : ORA-04043: object
    : : oracle/xml/parser/v2/FromDescPrecedingSibling does not exi
    : : st
    : : "I GOT SOME VIEW/TABLE DOES NOT EXIST ERROR ALSO"
    : : Here is my env.bat file..................
    : : rem Copyright (c) Oracle Corporation 1999. All Rights
    : Reserved.
    : : rem
    : : rem NAME
    : : rem env
    : : rem
    : : rem DESCRIPTION
    : : rem environmental variables needed to compile or run
    : : OracleXML utility
    : : rem
    : : rem ------------------------ oraclexmlsql utility directory
    : path
    : : rem set PD to point to the directory in which you expanded
    the
    : : zip file
    : : set PD=C:\Oracletools\OracleXSU
    : : rem ------------------------ JDBC classes
    : : set CLASSPATHJ=D:\Oracle\Ora8i\jdbc\lib\classes111.zip
    : : rem ------------------------
    : : rem This need not be changed
    : : set
    : XMLSQL_DIR=%PD%\lib\oraclexmlsql.jar;%PD%;%PD%\src;%PD%\lib;%
    : : PD%\sample
    : : rem ------------------------ Oracle XML parser settings
    : : rem This need not be changed
    : : set ORACLE_PARSER=%PD%\lib\xmlparser.jar
    : : rem ------------------------ JDK_HOME
    : : set JDK_HOME=C:\JDK1.2.2
    : : rem ------------------------ CLASSPATH settings
    : : set CLASSPATH=%ORACLE_PARSER%;%CLASSPATHJ%;%JDK_HOME%
    : : \lib\classes.zip;%XMLSQL_DIR%;%CLASSPATH%
    : : I need urgent help from you...........
    : : Thanks,
    : : Chandran...
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • 1.2 JVM crashes using XML SQL Utility 1.1.10 (NT 8.1.5)

    I am trying to use the XML SQL Utility for Java (Oracle 8.1.5) to obtain a DTD or XML schema for tables in our database.
    I have installed the XSU111.ZIP archive,
    set the CLASSPATH and stuff, loaded the JAR
    files (xmlparserv2.jar, oraclexmlsql.jar)
    processed the xmlgenpkg.sql script (following the installation instructions)
    When I execute the samples in Java, the JVM (JDK 1.2.2) crashes in javai.dll.
    The same error occurs when I run java OracleXML getXML ....
    The installation file (env.bat) lists the JDBC driver ZIP as CLASSES12.ZIP, which is of course, not available for 8.1.5, which is what the download instructions indicated is appropriate for XSU 1.1.1.
    Any ideas? Do I need to upgrade to 8.1.6?
    Can I patch the JDBC with classes12.ZIP.
    By the way, when I execute the commands in PL/SQL using xmlgen package, everything is fine.
    Regards and Much thanks

    Set JDK_HOME to the directory where you install your JDK (Java Development Kit).
    So instance, I've install JDK1.1.8 on my
    C drive so
    set JDK_HOME=c:\jdk1.1.8;c:\jdk1.1.8\bin

  • Help Needed -- Oracle XML/SQL utility and PL/SQL parser

    Let's say we have an xml file
    <?xml version="1.0" standalone="no"?>
    <abc>
    <def>
    <ghi>test</ghi>
    </def>
    <jkl>
    <mno>testing</mno>
    </jkl>
    </abc>
    We can store the <def> tag in one table say def and <jkl> tag in another table say jkl.
    Is there a way to combine def and jkl and insert in one table so that there in one row with two columns test and testing??
    null

    Hi,
    Are u sure that it is a java enabled database? The most common
    case of failure with the xmlgen package is because the loadjava
    command did not succeed.
    Please make sure that oraclexmlsqlload.bat file loaded all the
    java procedures successfully. If not then u would have to java-
    enable your database by running the initjvm script. (please see
    the docs).
    Thx
    Murali
    Iveta Vojtko (guest) wrote:
    : Hi,
    : I have downloaded XML SQL Utility for Java against Oracle
    8.0.5
    : on WindowsNT. The xmlgen package was created successfully but
    : its body is invalid and my PL/SQL test has failed because of
    : following error: PLS-00103: Encountered the symbol "NAME"
    : when expecting one of the following: := . ( @ % ; not null
    range
    : renames default character. The symbol ":= was inserted abefore
    : "NAME" to continue.
    : Is it because I am not using Oracle8i? I just want to use the
    : server side of XML SQL. Please, reply asap. Thank you.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Oracle 8i Lite and XML SQL Utility

    Can I use XML SQL Utility with Oracle 8i Lite
    using the Oracle 8i Lite Driver
    null

    There will be an version of the XML SQL Utility appearing here shortly. In the meantime you can download the current version of the XSQL Servlet which has the new v2 compatible oraclexmlsql.jar.
    Oracle XML Team

  • XML SQL Utility, Unicode

    Hi,
    I have some questions to the XML-SQL-Utility:
    1.) Is there a bug in the oracle.xml.sql.query class:
    OracleXMLQuery qry = new OracleXMLQuery(conn,"select POSITION from DATAS");
    qry.setRowTag("DROW");
    OracleXMLDocGenDOM gdoc = new OracleXMLDocGenDOM();
    qry.getXML(gdoc);
    conn.close();
    Document docin = gdoc.getXMLDocumentDOM();
    NodeList rows = docin.getDocumentElement().getElementsByTagName("DROW");
    // The Node "DROW" wasn't found.
    // It work if I do it below
    NodeList rows = docin.getDocumentElement().getElementsByTagName("ROW");
    // It doesn't matter what is set in the "qry1.setRowTag("DROW");"
    (I use the sun parser)
    2.) I have a problem by insertXML(Document);
    I will insert a Document with a structure as below in my database:
    <?xml version="1.0" encoding="UTF-16"?>
    <ROOTDOC>
    <ROW>
    <DOCUMENTREF>133-12224</DOCUMENTREF>
    <TEXT>hello</TEXT>
    </ROW>
    <ROW>
    <DOCUMENTREF>133-124</DOCUMENTREF>
    <TEXT>world</TEXT>
    </ROW>
    </ROOTDOC>
    XmlDocument sdoc = new XmlDocument();
    Element rootDEl = sdoc.createElement("ROOTDOC");
    sdoc. appendChild(rootDEl);
    Element rowEl = sdoc.createElement("ROW");
    Element docREl = sdoc.createElement("DOCUMENTREF");
    docREl.appendChild(sdoc.createTextNode("133-12224"));
    NodeList rows = sdoc.getDocumentElement().getElementsByTagName("ROW");
    int size = rows.getLength();
    System.out.println("SIZE: " size "\n");
    // The size is null, what's wrong ?
    OracleXMLSave save = new OracleXMLSave(conn, tabName);
    int rowCount = save.insertXML(sdoc);
    // It didn't insert something in my table !
    3.) I save Unicode UTF-16 in my database with the XML SQL Utility:
    <?xml version="1.0" encoding="UTF-16"?>
    <ROOTDOC>
    <ROW>
    <TEXT>D$55DD</TEXT>
    </ROW>
    <ROW>
    <TEXT>tt%zu||</TEXT>
    If I read it whit the oracle.xml.sql.query, it is Unicode UTF-8:
    OUTPUT IS:
    <?xml version="1.0"?>
    <ROOTDOC>
    <ROW num="1">
    <TEXT>D$55--</TEXT>
    </ROW>
    <ROW num="2">
    <TEXT>tt%zu33</TEXT>
    </ROW>
    I want a output as the input (Unicode UTF-16).
    Can anyone please advise on the problems.
    Thanks
    null

    Hi H.Ozawa,
    thanks for trying but non of the solution helped me, sorry.
    Question 1:
    I'll try it again like this:
    OracleXMLQuery qry = new OracleXMLQuery(conn,"select POSITION from DATAS");
    qry.setRowTag("DROW");
    Document docin = qry.getXMLDOM();
    conn.close();
    NodeList rows = docin.getDocumentElement().getElementsByTagName("DROW");
    // The Node "DROW" wasn't found.
    Question 2:
    <?xml version="1.0" encoding="UTF-16"?>
    <ROOTDOC>
    <ROW>
    <DOCUMENTREF>133-12224</DOCUMENTREF>
    <TEXT>hello</TEXT>
    </ROW>
    <ROW>
    <DOCUMENTREF>133-124</DOCUMENTREF>
    <TEXT>world</TEXT>
    </ROW>
    </ROOTDOC>
    XmlDocument sdoc = new XmlDocument();
    Element rootDEl = sdoc.createElement("ROOTDOC");
    sdoc. appendChild(rootDEl);
    Element rowEl = sdoc.createElement("ROW");
    Element docREl = sdoc.createElement("DOCUMENTREF");
    docREl.appendChild(sdoc.createTextNode("133-12224"));
    Element docTEl = sdoc.createElement("TEXT");
    docTEl.appendChild(sdoc.createTextNode("hello"));
    An error message occur:
    java.lang.reflect.InvocationTargetException: java.lang.IllegalAccessError: try to access class com/sun/xml/tree/ParentNode from class project/dbase/xmlwritedb at project.dbase.xmlwritedb.main(xmlwritedb.java:33)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.borland.jbuilder.util.BootStrap.invokeMain(Unknown Source)
    at com.borland.jbuilder.util.BootStrap.main(Unknown Source)
    Question 3:
    I try it like below but the output is "UTF-8" encoding
    OracleXMLDocGenDOM gdoc = new OracleXMLDocGenDOM();
    query.getXML(gdoc);
    XMLDocument docin = (XMLDocument)gdoc.getXMLDocumentDOM();
    docin.setEncoding("ISO-8859-1"); //docin.setEncoding("UTF-16");
    NodeList rows = docin.getDocumentElement().getElementsByTagName("ROW");
    Element row = (Element)rows.item( i );
    NodeList elements = row.getElementsByTagName( "DOCUMENTREF" );
    So you or someone have another idea to fix this problems.
    Thanks
    null

  • XML SQL Utility - settagcase - all tags are upper or lower

    I am using the XML SQL Utility (XSU) for PL/SQL to generate a xml document from some tables and objects. Is it possible to have the xml elements start and end tags appear in the case of the objects I have defined (i.e. CamelCase)? I can either have them appear as all upper or all lower case. However the oracle documentation has a SETTAGCASE function with an option for "as are". Is this supposed to allow for the case to follow how i have defined the fields in the object? If not is there a way?
    For example here is an object
    create or replace TYPE     CREDIT_APPLICANTTYPE AS OBJECT
      First VARCHAR2(15 BYTE),
      Last  VARCHAR2(35 BYTE),
      Middle VARCHAR2(1 BYTE),
      Suffix VARCHAR2(3 BYTE)
    );Settagcase 0 option doesn't seem to do anything different than the upper_case option when i generate the xml
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmlque.htm#i1033636
    set serveroutput on
    declare
      queryCtx dbms_xmlquery.ctxType;
      charstring VARCHAR2(255);
      outxml CLOB;
    begin
        queryCtx := dbms_xmlquery.newContext('select CREDIT_APPLICANTTYPE(''Joe'',''Smith'',''A'',''Jr.'') as AppName from dual');
        dbms_xmlquery.settagcase(queryCtx, 0);
        outxml := dbms_xmlquery.getXml(queryCtx);
        dbms_xmlquery.closeContext(queryCtx);
        charstring := dbms_lob.substr(outxml, 255, 1);
        dbms_output.put_line(charString);
    end;Output is in uppercase but i would like camel case:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <APPNAME>
    <FIRST>Joe</FIRST>
    <LAST>Smith</LAST>
    <MIDDLE>A</MIDDLE>
    <SUFFIX>Jr.</SUFFIX>
    </APPNAME>
    </ROW>
    </ROWSET>

    Actually I figured out the issue. Oracle automatically outputs the column alias as upper case unless you put it in quotes. I defined my object like this and it works with settagcase 0
    create or replace TYPE CREDIT_APPLICANTTYPE AS OBJECT
    "First" VARCHAR2(15 BYTE),
    "Last" VARCHAR2(35 BYTE),
    "Middle" VARCHAR2(1 BYTE),
    "Suffix" VARCHAR2(3 BYTE)
    );

  • XML SQL Utility (XSU) in BPEL process

    Is it possible to use XML SQL Utility (XSU) in BPEL process? I would like to generate XML from a query.

    I'm using Oracle 8.1.6.1.0 (but instead of classes12.zip I'm attempting to use ojdbc14.jar)

  • Generating multi-level XML in Oracle 8i using XML-SQL utility

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

  • XML SQL utility

    Hi,
    When I try to execute this query using XML SQL utility
    I am getting the following error. I had declared 'XMLGEN &
    GETXML' as CLOB and tried but got the same error. Advice me. I
    am struggling to find the solution using XSQL Servlet..but
    couldn't get..I spend one week on that..no results...this is the
    second trial. Is there any online help or service to do that.
    xmlString := xmlgen.getXML('select * from scott.emp');
    ERROR at line 9:
    ORA-06550: line 9, column 16:
    PLS-00201: identifier 'XMLGEN.GETXML' must be declared
    ORA-06550: line 9, column 3:
    PL/SQL: Statement ignored
    I have Oracle XML parser for Java 2, and XML SQL utility and
    oracle 8i database....
    This is the query.........(Your example)
    declare
    xmlString CLOB;
    amount integer:= 4000;
    position integer := 1;
    charString varchar2(4000);
    i binary_integer := 0;
    inclDTD number := 0;
    begin
    xmlString := xmlgen.getXML('select * from scott.emp');
    dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
    loop
    dbms_lob.read(xmlString,amount,position,charString);
    dbms_output.put_line(charString);
    position := position + amount;
    end loop;
    exception
    when no_data_found then
    dbms_lob.close(xmlString);
    dbms_lob.freetemporary(xmlString);
    end;
    null

    Have you loaded the xmlgenpkg.sql in the schema in which you
    are trying to execute your PL/SQL block?
    Chan (guest) wrote:
    : Hi,
    : When I try to execute this query using XML SQL utility
    : I am getting the following error. I had declared 'XMLGEN &
    : GETXML' as CLOB and tried but got the same error. Advice me. I
    : am struggling to find the solution using XSQL Servlet..but
    : couldn't get..I spend one week on that..no results...this is
    the
    : second trial. Is there any online help or service to do that.
    : xmlString := xmlgen.getXML('select * from scott.emp');
    : ERROR at line 9:
    : ORA-06550: line 9, column 16:
    : PLS-00201: identifier 'XMLGEN.GETXML' must be declared
    : ORA-06550: line 9, column 3:
    : PL/SQL: Statement ignored
    : I have Oracle XML parser for Java 2, and XML SQL utility and
    : oracle 8i database....
    : This is the query.........(Your example)
    : declare
    : xmlString CLOB;
    : amount integer:= 4000;
    : position integer := 1;
    : charString varchar2(4000);
    : i binary_integer := 0;
    : inclDTD number := 0;
    : begin
    : xmlString := xmlgen.getXML('select * from scott.emp');
    : dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
    : loop
    : dbms_lob.read(xmlString,amount,position,charString);
    : dbms_output.put_line(charString);
    : position := position + amount;
    : end loop;
    : exception
    : when no_data_found then
    : dbms_lob.close(xmlString);
    : dbms_lob.freetemporary(xmlString);
    : end;
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Is XML-SQL Utility for Java run on Client Side?

    A question about the XML-SQL Utility for Java
    When a client program connect to a Oracle database (the clinet program and Oracle DB is run on two different machine. Oracle 8i is used) and use the oracle.xml.sql.query.OracleXMLQuery Class (form the XSU) to generate XML by given a SQL query. I want to know the transforation process is execute in the Clinet side or the database?
    Is there any method that i can retrieve the XML directly from the database rather then doing the transformation form the Client side?

    Set JDK_HOME to the directory where you install your JDK (Java Development Kit).
    So instance, I've install JDK1.1.8 on my
    C drive so
    set JDK_HOME=c:\jdk1.1.8;c:\jdk1.1.8\bin

  • XML SQL Utility:Why it doesn't work?

    I am trying to use the XML SQL Utility
    by modifying the given example samp1.java
    for the JDBC-ODBC driver but errors emerged.
    Is there any thing wrong? Thanks.
    (The classpath setting is ok, I think)
    ***** Here is the error message:
    D:\OracleXSU\sample>java Sample
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/sql/Datum
    at oracle.xml.sql.query.OracleXMLQuery.<init>(OracleXMLQuery.java:127)
    at Sample.main(Sample.java:42)
    D:\OracleXSU\sample>
    ***** Here is the source code:
    /** Simple example on using Oracle XMLSQL API; this class queries the database with "select * from emp" in scott/tiger schema; then from the results of query it generates an XML document */
    import java.sql.*;
    import java.math.*;
    import oracle.xml.sql.query.*;
    // import oracle.jdbc.*;
    // import oracle.jdbc.driver.*;
    public class Sample
    //========================================
    // main() - public static void
    public static void main(String args[]) throws SQLException
    String tabName = "sbook";
    String user = "scott/tiger";
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    // DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //init a JDBC connection
    // Connection conn =
    // DriverManager.getConnection("jdbc:oracle:oci8:"+user+"@");
    Connection conn = DriverManager.getConnection("jdbc:odbc:SQLUtil");
    // create statement and execute it to get the ResultSet
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select * from "+tabName );
    if(rset!=null)
    // init the OracleXMLQuery; note we could have passed the sql query string
    // instead of the ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(conn,rset);
    // get the XML document is the string format
    String xmlString = qry.getXMLString();
    // print out the result
    System.out.println(" OUPUT IS:\n"+xmlString);
    null

    Firstly I think it is because the XML SQL Utility does not work with JDBC-ODBC driver.
    So I try it again with Oracle driver.
    But it still doesn't work? Why?
    ***** Here is the source code:
    /** Simple example on using Oracle XMLSQL API; this class queries the database with "select * from emp" in scott/tiger schema; then from the results of query it generates an XML document */
    import java.sql.*;
    import java.math.*;
    import oracle.xml.sql.query.*;
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    public class Sample2
    //========================================
    // main() - public static void
    public static void main(String args[]) throws SQLException
    String tabName = "emp";
    String user = "scott/tiger";
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //init a JDBC connection
    // Connection conn =
    // DriverManager.getConnection("jdbc:oracle:oci8:"+user+"@");
    //init a JDBC connection
    Connection conn = DriverManager.getConnection ("...Connection information...");
    // create statement and execute it to get the ResultSet
    Statement stmt = conn.createStatement();
    // ResultSet rset = stmt.executeQuery("select * from "+tabName );
    ResultSet rset = stmt.executeQuery("select * from COFFEES" );
    // Test if connection is sucessful -- it works!
    int i=0;
    while(rset.next())
    i++;
    System.out.println("Total rows="+i);
    // init the OracleXMLQuery; note we could have passed the sql query string
    // instead of the ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(conn,rset);
    // get the XML document is the string format
    String xmlString = qry.getXMLString();
    // print out the result
    System.out.println(" OUPUT IS:\n"+xmlString);
    null

  • Updating a database using XML SQL Utility

    Hi all,
    It seems that the Oracle XML SQL Utility provides only to insert rows into a table/view. However, if one wants to update a table from an XML no support is available.
    How does one proceed if this is to be achieved?
    Thanks in advance.
    Regards,
    Manoj
    null

    While inserting i get a
    oracle.xml.sql.OracleXMLSQLException and further a
    NumberFormatException. Which parameter do I have to set to avoid
    these Exceptions. I can insert the file in my local db but I get
    the Exception on the server db. The value I want to insert for
    expample is 30,1. Maybe the JDBC-Driver tries to convert the String ;30,1+ to an
    Integer-Object. This will cause the described Exception since
    the Integer-Class requires ;.+ instead of ;,+ for decimal point.
    I have another problem generating an xmlfile when there
    are "Umlaute" in the data. E.g. V and \. Exchanging these to Oe
    and Ue than it works fine.Use ISO-8859-1 character set to work with umlauts, e.g.:
    <?xml version = '1.0' encoding = 'ISO-8859-1'?>
    .. but you can use the default UTF-8 encoding too, umlauts will
    be replaced by equivalents as ;C&#376;+
    Alex

Maybe you are looking for

  • Moving data from one table to another table in a diferent Database..

    I need to move the data of one table from one database to another table in a different database, is there a way to do this. Do I need the systemn password? or the password of the schema that own the table is enough? the tables are name different, sam

  • Opening files in Photoshop CS6

    Yesterday, before closing down, I uninstalled P/S 7, CS2 and CS3 to gain space, but do not know whether that action is relevant to my problem. Today I find that Jpegs will not open in Photoshop, and in Bridge only by going through Camera Raw. Photosh

  • Reports not displaying properly on server

    <p>I have created several crystal reports using Visual Studio 2005.  They work fine on my local IIS on Windows XP.  However, when I move them to my server none of the report buttons, drop downs, etc. display correctly, they just display a red X.  Any

  • Set Field as text before exporting to excel

    HELLO GURUS, i have a program which exports material numbers and other relevant data from sap tables to excel sheet. certain material numbers contain text 'E' in between the material number (Eg. 17700E0056). When such data is exported to excel, Excel

  • Printing problems from Photoshop Elements to Epson XP-800

    I cannot print photogrpaic images with my desktop MAC (OS X10.8.4) from Photoshop Elements 9.0 to my new Epson XP-800 printer. Printing is not a problem with  Word text or images from iPhoto- it is only with PSE that there is a problem.  The problem