OracleXMLQuery

I am using a set of PL/SQL packages to maintain business logic. The PL/SQL packages return nested tables to Java Beans which interact with JSP's. I am having problems in Java when I get the oracle.sql.ARRAY and get the ResultSet to create an OracleXMLQuery object (OracleXMLQuery(Connection,ResultSet).
The Oracle ARRAY returns an Oracle ArrayDataResultSet which is not a java.sql.ResultSet and does not support OracleXMLQuery's call to getMetaData() when attempting to parse the ResultSet into XML. Any ideas?
NOTE: We have chosen not to pass (SQL Strings) queries to the OracleXMLQuery object to improve performance on the backend. (Reduce unnecessary parsing, reuse cursors and allow bind variables to be used.)
Thanks-
Jon

How are you first getting a hold of the ARRAY? selecting it from an object table or object view ? In other words, at some part of your program do you SELECT the ARRAY column or attribute into a program language variable of type oracle.sql.ARRAY or are you programmatically constructing it?
null

Similar Messages

  • Decode function in OracleXMLQuery

    selectStr = "SELECT DECODE(email,null,'',email), FROM mytable WHERE user_id=\'" + search_id + "\'";
    using this select statement in conjunction with OracleXMLQuery produces the following exception.
    oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name.
    any hints why ')' ist not supported?
    null

    solved, renaming the decode function helps
    like
    selectStr = "SELECT DECODE(email,null,'',email) email, FROM mytable WHERE user_id=\'" + search_id + "\'";
    null

  • Null or Empty string  in OracleXMLQuery -  XDK

    Dear all,
    I am using OracleXMLQuery of XDK to construct an XML File from the contents retrieved from the database.
    I see that for columns which have null values or empty string, the corresponding tag is not displayed in the XML File. Instead, even for columns that have empty string I need the tags to be displayed in the following format <tag1> </tag1>
    Kindly let me know if this is possible.

    Ya, I will try that. That seems to be a good idea. Thanks for the response.
    I have one more query. Whenever we add a new column to any table in Oracle, the column name is stored in Upper case. So when we generate XML File from the database, all the tags are either in upper case (or we can use qry.useLowerCaseTagNames() to retrieve the tag names in lower case). But the XSD contains tag names in mixed case. So when validating the XML Document against an XSD, it throws a validation error.
    Is there any way I can avoid this?

  • How to generate PDF output from OracleXMLQuery

    I want to generate a PDF out put from XML by using JSP. For this i writen jsp and xsl. My jsp code works fine if i include html formated xsl and it displays as a text when i pass pdf formated xls.
    Here i am providing my jsp code.
    I don't want to use XSQL, please provide me information ASAP.
    <%@ page import = "java.sql.*,oracle.xml.sql.query.OracleXMLQuery" %>
    <% Connection conn = null;
    Statement stmt = null;
    ResultSet rset = null;
    String dbURL = "jdbc:oracle:thin:@localhost:1521:oracle9i";
    try{
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         conn = DriverManager.getConnection(dbURL, "scott", "tiger");
         stmt = conn.createStatement ();
         rset = stmt.executeQuery ("SELECT * " +
                   "FROM scott.emp ORDER BY ename");
    OracleXMLQuery xq = new OracleXMLQuery(conn, rset); %>
    <% xq.setStyleSheet("emptablefo.xsl"); %>
    <%= xq.getXMLString() %>
    <% } catch (java.sql.SQLException e) {  %>
    SQL error: <%= e %>
    <% }
    finally {
    if (stmt != null) stmt.close();
    if (rset != null) rset.close();
    if (conn != null) conn.close();
    } %>
    Thanks,
    Ramana

    >
    if the report output format is xls this code is generating the pdf output
    >
    looks like pdf is default output in template definition in xml publisher resp
    so for r12 use FND_REQUEST.ADD_LAYOUT as example
    v_request_id   number;
    xml_layout boolean;
    xml_layout := FND_REQUEST.ADD_LAYOUT('XXCUSTOM','XXCONCNAME','en','00','EXCEL');
    v_request_id := fnd_request.submit_request(application => 'XXCUSTOM',
                                               program     => 'XXCONCNAME',
                                               description => NULL,
                                               start_time  => NULL,
                                               sub_request => FALSE,
                                               argument1   => p_date
                                               );also see http://andyblg.wordpress.com/2012/08/23/run-concurrent-program-twice-with-different-layout-r12/

  • Oracle.xml.sql.OracleXMLSQLException when using OracleXMLQuery getXMLDOM()

    Hi!
    I am trying to reuse a code in JDeveloper to get XML from a query. I have copied the code from a method and created a new method with the copied code and changed it. The problem is that when I run the old code I now get following error:
    Ett oförväntat fel har inträffat: Application: FND, Message Name: FND_GENERIC_MESSAGE.
    Tokens: MESSAGE = oracle.xml.sql.OracleXMLSQLException: Det här objektet har stängts.
    Vill du inte att objektet ska stängas automatiskt mellan anropen kan du granska metoden 'keepObjectOpen()'.;
    This means in english something like:
    An unexpected error accoured: Application: FND, Message Name: FND_GENERIC_MESSAGE = oracle.xml.sql.OracleXMLSQLException: This object is closed. If you don't want the object to close automatically between calls you can check method 'keepObjectOpen()';
    the code I'm running is:
    public String punchoutSomething()
    throws Exception
    StringBuffer sqlForXml =new StringBuffer("select pv.*"
    +", cursor(select * from XXPOS_PUNCHOUT_TABLE2 c where c.vendor_id=pv.vendor_id) as contacts"
    +" from XXPOS_PUNCHOUT_TABLE1 pv where vendor_id in (");
    // add all ids
    SuppSummVOImpl vendorView = getSuppSummVO();
    Row row;
    int punchoutCnt=0;
    // vendorView.reset();
    Row[] selectedRows = vendorView.getFilteredRows("SelectStatus","Y");
    for(int i=0;i<selectedRows.length;i++)
    if(punchoutCnt>0)
    sqlForXml.append(",");
    sqlForXml.append(((Number)selectedRows.getAttribute("VendorId")).toString());
    punchoutCnt++;
    if(punchoutCnt==0)
    sqlForXml.append("-1"); // make sql valid, will not return rows
    sqlForXml.append(")");
    // System.out.println(sqlForXml); // DEBUG
    OADBTransaction tx = (OADBTransaction)getOADBTransaction();
    OracleXMLQuery xq = new OracleXMLQuery( tx.getJdbcConnection()
    , sqlForXml.toString()
    xq.setRaiseException(true); // in case of error raise an exception (default
    // is to generate an error document
    xq.setEncoding("UTF-8"); // not necessary?
    xq.useLowerCaseTagNames();
    xq.setRowsetTag("vendors");
    xq.setRowTag("vendors_row");
    //System.out.println(xq.getXMLString()); // DEBUG
    XMLDocument suppl = (XMLDocument)xq.getXMLDOM();
    XSLProcessor xslt = new XSLProcessor();
    InputStream sheetStream = this.getClass().getResourceAsStream("mystylesheet.xsl");
    if(sheetStream==null)
    throw new Exception("Could not load stylesheet");
    XSLStylesheet sheet = xslt.newXSLStylesheet(
    sheetStream
    StringWriter serialize = new StringWriter();
    xslt.processXSL(sheet,suppl,new PrintWriter(serialize));
    String returnXML = serialize.getBuffer().toString();
    // System.out.println("X:"+returnXML); // DEBUG
    sheetStream.close();
    return returnXML;
    ===================
    i've copied the same code into another method and only changed the sql-statment to be used and the stylesheet to use to transform the xml. Is something wrong with that?
    Another question: if the xsl refers to a xsd but wihtout any path where should it be?
    Thanks for the help,
    Patricia

    Actually, having looked at Metalink, seems that although this message may be accurate and correct,
    it has been 'introduced' as part of the 9i JDBC driver.
    So, I used the 8i JDBC driver I happened to have instead and that worked fine.

  • Converting ResultSet to XML by OracleXMLQuery

    Hello,
    I'm newbie in XML and I have following problem:
    I'm using OracleXMLQuery to convert ResultSet from oracle db to XML document. I'm using getXMLDOM()(from oracle package) to convert this OracleXMLQuery into DOM representation. I can extract node names but all values of the nodes are null's (if I convert the document to string and put it on the screen, the values are connect). Here's my code:
    QracleXMLQuery qry;
    ResultSet rset = (ResultSet)stmt.getObject(1);
    qry = new OracleXMLQuery(conn,rset);
          qry.setRaiseNoRowsException(true);
          qry.setRaiseException(true);
          qry.keepObjectOpen(true);
          qry.useNullAttributeIndicator(true);
    Document d=(Document)qry.getXMLDOM();
            //---to this point all seems to be correct
            // -OracleXMLQuery object stores correct xml document and
            // qry.getXMLDOM() return good Document object
      NodeList nl=d.getElementsByTagName("some_tag_name");
      for(int i=0;i<nl.getLength();i++){
           Node temp=nl.item(i);
           System.out.println(temp.getNodeValue()); //null's
           System.out.println(temp.getNodeName()); //correct name of the string
           }Maybe i'm missing something, as I wrote earlier I'm newbie in XML - I would be very grateful for any help. Thanks in advance!

    Thanks for your reply - it really helped. I have another problem,maybe some of you may help me: I have two DOM documents and I want to join then like this
    Documant a:
    <?xml version = '1.0'?>
    <ROWSET>
         <ROW num="1">
            <attr1>sometext1</attr1>
            <attr2>sometext2</attr2>
            <attr3>sometext3</attr3>
         </ROW>
         <ROW num="2">    
         </ROW>
         <ROW num="3">
         </ROW>
    </ROWSET>Doc b
    <?xml version = '1.0'?>
    <attrib>
      <ROW num="1">
         <atr1>sometext1</atr1>
         <text>othertext1</text>
      </ROW>  
      <ROW num="2">
         <atr2>sometext2</atr2>
         <text>othertext1</text>
      </ROW>
      <ROW num="3">
         <atr3>sometext3</atr3>
         <text>othertext1</text>
       </ROW>
    </attrib>Now I want to insert the whole <attrib>...</attrib> section from document b as a node to document a in for example <ROW num="1">...</ROW> section. I've tried to create Node element form document b (<attrib></attrib>) and use insertBefore() method on Node <ROW num="1"></ROW> but I have a nullpointer exception - well it probably wasn't good idea.I hope my description is clear, I vould be happy for any advice. Thanks in advance

  • OracleXMLQuery not fetching ALL rows

    Problem:
    ======
    For example, if there are 10 rows in the Table, sometimes the XMLQuery sees less than 10 rows. We wrote a small test program with a JDBC query for select count(*) from Table, which always shows 10. So nothing wrong with Connection/Statement settings. They all use DEFAULT settings (READ_COMMITTED, TYPE_FORWARS_ONLY).
    Why does n't XMLQuery see all rows available from the Query?
    Software Version:
    ============
    Oracle 10.1.0.5
    XDK: Oracle XDK 10g
    JAVA 5
    My program:
    =========
    Connection connection = dataSource.getConnection();
    Statement stmt = connection.createStatement(); <-- We tried with TYPE_SCROLL*. Still not working.
    ResultSet rs = stmt.executeQuery("select * from MyTable);
    //1. Query the database with the OracleXMLQuery. Result will be in XML format.
    OracleXMLQuery query = new OracleXMLQuery(connection, rs);
    query.keepObjectOpen(true);
    query.setMaxRows(1); //We don't want to build huge XML DOM for all rows.
    while (rs.next()) { <--- Ideally it should iterate 10 times XMLDocument xmlDoc = (XMLDocument) query.getXMLDOM();          
    System.out.println(xmlDoc);
    if (query.getNumRowsProcessed() > 0) {          
    //Do something here
    Thanks.
    Kanugula.

    I am providing the stack trace. You have more information.
    By the way, what surprises me is "OracleXMLQuery sees 1/2 of the rows only. Means if you have 12 rows, it sees 6 only"
    query= OracleXMLQuery (id=2148)
    conv= OracleXMLConvert (id=2154)
    colCount= 48
    collectTimingInfo= false
    collIdAttrName= null
    collItemTag= "_ITEM"
    colNames= OracleColumnName[48] (id=2376)
    colNamesHash= Hashtable<K,V> (id=2377)
    conn= LogicalConnection (id=2145)
    curCount= 2
    dataHeader= null
    dateFormat= "yyyyMMddhhmmss"
    docTag= null
    docType= 1
    dset= OracleXMLDataSetExtJdbc (id=2378)
    bindPosHash= null
    conn= LogicalConnection (id=2145)
    connUser= null
    cursorCols= int[0] (id=2380)
    dsetList= null
    isConsistent= true
    msg= XSUMesg (id=2166)
    ncharSuported= true
    rmdata= OracleResultSetMetaData (id=2381)
    rowCount= 4
    rset= ScrollableResultSet (id=2147)
    close_statement_on_close= false
    m_allRowsCached= false
    m_autoRefetch= true
    m_beginColumnIndex= 0
    m_cache= OracleResultSetCacheImpl (id=2190)
    m_columnCount= 48
    m_conn= T4CConnection (id=2195)
    m_currentRow= 6
    m_lastRefetchSz= 0
    m_metadata= OracleResultSetMetaData (id=2371)
    m_numRowsCached= 6
    m_refetchRowids= null
    m_refetchStmt= null
    m_rset= OracleResultSetImpl (id=2196)
    m_scrollStmt= T4CStatement (id=2146)
    m_type= 1004
    m_update= 1007
    m_usrFetchDirection= 1000
    m_warning= null
    m_wasNull= 0
    rsetFirstTime= false
    rsetIsExt= true
    rsetVal= true
    sdf= SimpleDateFormat (id=2382)
    stmt= null
    tempS= T4CStatement (id=2146)
    dsetIsExt= false
    DTDString= null
    errTag= "ERROR"
    extException= null
    firstXElemNmIdx= 0
    isNull= "TRUE"
    keepCursor= true
    maxRows= 1
    metaHeader= null
    metaType= 0
    miscFlags= 0
    namesValid= true
    noRowsException= false
    notNull= "FALSE"
    nullAttrId= "NULL"
    objClosed= false
    qstring= null
    raiseException= false
    refAttrName= "REFTYPE"
    rootNodeSupplied= false
    rowCountStr= "num"
    rowIdAttrDt= 2
    rowIdColName= null
    rowIdColNum= 0
    rowsetTag= "ROWSET"
    rowTag= "ROW"
    rset= ScrollableResultSet (id=2147)
    rsetIsExt= true
    skipRows= 0
    styleSheetType= null
    styleSheetURI= null
    tagCase= 0
    tim= null
    tns= null
    updateDateFormat= false
    useColumnLabelAsRoot= false
    useNullAttrId= false
    useTypeForCollElemTag= false
    val= OracleScalarName (id=2379)
    xAttrAfterElem= false
    xAttrIdxs= null
    xElemCnt= 48
    encoding= null
    encSet= false
    xslp= null
    xslt= null

  • Using OracleXMLQuery with Oracle 9i

    Sample code example -
    OracleXMLQuery xmlData = new OracleXMLQuery(conn, sqlQuery);
    String xmlString = xmlData.getXMLString();
    PrintWriter xmlFile.print(xmlString);
    I am able to connect to the database and print out the XML file. I'm querying an object that has a table embedded and everything was printing out okay in 8i, but now it 9i the string data fields in the embedded table are printing out in hexadecimal format. I've been to Sun's web site and in the forum discussions other developers are having the same problems without any know solution.
    Has anyone here came up with a fix?

    I thought that imp, with full=Y option will import everything into this empty dB, no matter There are not any schemes and users that were in the original dB...
    Your understanding is 100% correct, but the question is, how did you take the export? Because, if you have taken full export, you haven't hit this problem. Could you tell us how did you made export?

  • Oracle XSU: oracle.xml.sql.query.OracleXMLQuery is not recognized

    Hi, there!
    I've got a problem when tryed to use Oracle XSU (xml-sql utility to generate xml). My simple java application works fine using XSU. But when I created session stateless bean I've got an EJBException regarding this
    line:
    oracle.xml.sql.query.OracleXMLQuery qry = new oracle.xml.sql.query.OracleXMLQuery(conn, commandSQLStatement);
    It doesn't recognize OracleXMLQuery class as I've got in dump. So my classpath includes original location of that utility and Oracle parser.
    I really appreciate for any help.
    Thanks.
    strXML = qry.getXMLString();

    Patricia,
    Did you go through the link
    Re: XML SQL Utility
    You have to put xsu12.jar in the lib directory of the jdev.
    xsu12.jar is in the lib directory of the XDK installation.
    You can download XDK from
    http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
    Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
    -- Arvind

  • Oracle.xml.sql.query.OracleXMLQuery   GetXML -withDTD

    I'm trying to create a dtd for each table in my schema. I've created a java program that loops through the user_tables and I am then trying to create the DTD with oracle.xml.sql.query.OracleXMLQuery -withDTD. I am able to make it work using the XSU Command Line Utility, but I'm having a hard time trying to find out where the -withDTD flag goes inside my java program. Anyone know how to use the -withDTD option inside of a java program?
    Thanks

    [from XmlRpc-Java]
    As a result, my XML
    is contained in a String instead of an InputStream.
    It is possible to convert a String to an InputStream using
    StringBufferInputStream, but this class is deprecated in favor of
    StringReader (as StringBufferInputStream does not properly convert
    characters into bytes).
    For the default HTTP transport, an InputStreamReader could be used to
    wrap the InputStream before calling parse().
    Ultimately, the InputStream is converted to an InputSource for use by
    the SAX parser. InputSource will accept a Reader as well.
    [from XmlRpc-Java]
    There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
    null

  • Oracle.xml.sql.query.OracleXMLQuery not found

    Hi!
    Sorry, but I got a project to continue and there is an import statement "import oracle.xml.sql.query.OracleXMLQuery;" and this gives me a compilation error...
    What do I need to do, where do I find this class??? Any help?
    //Patricia

    Patricia,
    Did you go through the link
    Re: XML SQL Utility
    You have to put xsu12.jar in the lib directory of the jdev.
    xsu12.jar is in the lib directory of the XDK installation.
    You can download XDK from
    http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
    Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
    -- Arvind

  • Oracle.xml.sql.query.OracleXMLQuery?

    Anyone know where I can find a java doc or any method infomation on:
    oracle.xml.sql.query.OracleXMLQuery
    thanks,
    chad.

    [from XmlRpc-Java]
    As a result, my XML
    is contained in a String instead of an InputStream.
    It is possible to convert a String to an InputStream using
    StringBufferInputStream, but this class is deprecated in favor of
    StringReader (as StringBufferInputStream does not properly convert
    characters into bytes).
    For the default HTTP transport, an InputStreamReader could be used to
    wrap the InputStream before calling parse().
    Ultimately, the InputStream is converted to an InputSource for use by
    the SAX parser. InputSource will accept a Reader as well.
    [from XmlRpc-Java]
    There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
    null

  • Java.lang.NoClassDefFoundError: oracle/xml/sql/query/OracleXMLQuery

    Hello, all.
    I get this error message:
    java.lang.NoClassDefFoundError: oracle/xml/sql/query/OracleXMLQuery
    at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(Compiled Code) ...
    when trying to view an xsql page with the jswdk 1.0.1 web server. (I have no problems when using Web-to-go)
    Classpath includes:
    C:\jdk1.1.8\lib\classes.zip;
    C:\xsql\lib\oraclexsql.jar;
    C:\xsql\lib\xmlparserv2.jar;
    C:\xsql\lib\xsu111.jar;
    C:\xsql\lib\classes111.zip;
    C:\xsql\lib;
    What could be the problem?
    Mateja
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Only thing I can think of is that maybe your server classpath is getting too long. I recall one of the Java Web Server releases having a classpath length limit that caused strange errors like this because that .jar files you thought were on your classpath were getting their path names truncated so the Java VM cannot find the JAR's.
    Try putting xsu111.jar earlier in the list of JAR's and/or try shortening the classpath (perhaps by using SUBST'd drive letters or softlinks on Unix to shorten the path names).<HR></BLOCKQUOTE>
    Putting the xsu11.jar file towards the start of the path did not help.
    I have rewriten the entire bat file that creates the CLASSPATH and starts the server and things now seem to work. There must have been some error in the original bat file, that I just couldn't see.
    Anyway - I thank you for your help.
    null

  • Class oracle.xml.sql.query.OracleXMLQuery not found in import

    I tried to perform load java using a non-sys user :
    loadjava -user user1/passwd -v -o -r Archive.java
    but encountered the following error:
    Errors in Archive:
    ORA-29535: source requires recompilation
    Archive:11: Class oracle.xml.sql.query.OracleXMLQuery not found in import.
    Info: 1 errors
    loadjava: 3 errors
    But if I use sys user I don't have any error:
    loadjava -user sys/manager -v -o -r Arachive.java
    initialization complete
    loading : Archive
    creating : Archive
    resolver :
    resolving: Archive
    Why is this so?
    ANy security setup that I missed?
    Thanks in advance.
    Note:
    my Archive.java file contains:
    // Core Java Classes
    import java.io.*;
    import java.sql.*;
    // Oracle Java classes
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Azman Diron ([email protected]):
    I tried to perform load java using a non-sys user :
    loadjava -user user1/passwd -v -o -r Archive.java
    but encountered the following error:
    Errors in Archive:
    ORA-29535: source requires recompilation
    Archive:11: Class oracle.xml.sql.query.OracleXMLQuery not found in import.
    Info: 1 errors
    loadjava: 3 errors
    But if I use sys user I don't have any error:
    loadjava -user sys/manager -v -o -r Arachive.java
    initialization complete
    loading : Archive
    creating : Archive
    resolver :
    resolving: Archive
    Why is this so?
    ANy security setup that I missed?
    Thanks in advance.
    Note:
    my Archive.java file contains:
    // Core Java Classes
    import java.io.*;
    import java.sql.*;
    // Oracle Java classes
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    <HR></BLOCKQUOTE>
    Managed to solve this problem.
    Drop all xml objects owned by sys and user1.
    Reload xml objcets for user1 with -force option.
    null

  • Pls help...No class found for Datum in OracleXMLquery

    Hello,
    I tried to generate a simple XML document using OracleXMLQuery. But it gives me the following error.
    ==========================
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/sql/Datum
    at oracle.xml.sql.query.OracleXMLQuery.<init>(OracleXMLQuery.java:127)
    at testJDBC.main(testJDBC.java:43)
    ==========================
    I was using JDBC.ODBC driver. When I took out the following lines from my code, my code works and returns some information in that table, but of course not XML document.
    ==========================
    OracleXMLQuery qry = new OracleXMLQuery(con,result);
    // get the XML document is the string format
    String xmlString = qry.getXMLString();
    // print out the result
    System.out.println(" OUPUT IS:\n"+xmlString);
    ===========================
    What is wrong with the above paragraph?
    Thank you very much for your help!
    -Steve
    The complete code is attached as follows:
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import java.math.*;
    import oracle.xml.sql.query.*;
    public class testJDBC{
    public static void main(String args[]){
    String URL = "jdbc dbc:steveUUdialTest";
    String username = "sa";
    String password = "lamb";
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch (Exception e1) {
    System.out.println("Failed to load JDBC/ODBC driver.");
    return;
    Statement stmt = null;
    Connection con=null;
    try {
    con = DriverManager.getConnection (URL,username,password);
    stmt = con.createStatement();
    } catch (Exception e2) {
    System.out.println("problems connecting to "+URL);
    try {
    ResultSet result = stmt.executeQuery("SELECT * FROM ModemTable;");
    result.next(); // move to first row
    String name = result.getString("PhoneNumber");
    String temp = "";
    //int cups = result.getInt("cups");
    System.out.println("SELECT * FROM ModemTable;\nPhonenumber=\n "+name);
    // init the OracleXMLQuery; note we could have passed the sql query string
    // instead of the ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(con,result);
    // get the XML document is the string format
    String xmlString = qry.getXMLString();
    // print out the result
    System.out.println(" OUPUT IS:\n"+xmlString);
    con.close();
    }catch (Exception e3) {
    // e.printStackTrace();
    System.out.println("error:"+e3.toString());
    ----------------------------------------

    Are you using JDBC/ODBC to access Oracle,
    or another database? Either should work,
    but just for diagnosing the problem.
    If Oracle, are you using Oracle8 object
    types in your queries?
    Thanks.

Maybe you are looking for

  • Problem with mid-2009 MacBook Pro 13" hard drives

    In May of this year I upgraded my stock hard drive to a 500GB Hitachi from the stock 160. About 5 days ago the computer froze and hung gor several minutes. Mouse still moved but no response from the OS. Forced a restart after several minutes. The com

  • Mapping Issue in Triggering Email

    Hi All, I am having problem in PI Mapping. Requirement: Trigger an email target structure only if ReturnCode is not equal to 0 and 1. Source Structure                                                                                Target Structure Inv

  • Ipod and itunes lost music

    ok well someone deleted music off of my computer but it is still on my ipod and im wondering if there is a way to put it all back on my computer by my ipod ive tried many things and i dont want to download thousands of songs again

  • Final Cut Pro Timeline Appearance ?

    Hey guys, I was looking on some websites and I found this screenshot, and i was wondering how to get the timeline too look like the one in the image.. heres the link to the image: http://img23.imageshack.us/my.php?image=finalcutstudio.png thanks guys

  • How to upload the exported report without data to BO ?

    Hi all, The version is BO XI3 As captioned, there is data in the exported report. while upload the report to BO in java program, even  setKeepSavedData(false) , but the uploaded report still has data. IReport boReport = (IReport) reports.get(0); IFil