Select data from database via XML

I want to select data for display and insert data to tables via XML, and I want
to do this from a browser.
I am using "Oracle8i Enterprise Edition Release 8.1.7.4.0" on HP-UX server
with "JServer Release 8.1.7.4.0.".
The oracle documentation says I need the following in order to do this.
1. XML-SQL Utility
2. XML Parser for Java, V2
3. JDBC driver
4. JDK
5. A Java compliant web server
6. XSL Servlet
How do I verify, if the above software list is available in my environment.
What are all available within the database and what are other software I need to
install.
Thanks
Pushparaj

It's a classpath problem. Either you mistyped the class name, or you don't have the class in your classpath. I think Oracle's drivers come in db12.zip or db12.jar or some such. Whatever that jar or zip file is, it has to be in your classpath, but it's not.
Or it is in your classpath, but you're in an appserver context where the classloader that the container provides for your app uses something other than the classpath variable. For instance, in tomcat, the jar file would be uder webapps/yourApplication/WEB-INF/lib I think.

Similar Messages

  • Issue to load data from database to XML file. error: ODI-40768

    Hi,
    While I am trying to load data from database to XML following error is appearing.
    ODI-1228: Task TEST_XML_DATA (Integration) fails on the target XML connection MyLOCALXSD.
    Caused By: java.sql.SQLException: ODI-40768: Could not save the file <default>:C:\DATA_FILE\www.xml because a class java.io.IOException occurred and said: The filename, directory name, or volume label syntax is incorrect
         at com.sunopsis.jdbc.driver.xml.SnpsXmlFile.writeToFile(SnpsXmlFile.java:751)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlConnection.internalExecute(SnpsXmlConnection.java:769)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatement.execute(SnpsXmlPreparedStatement.java:46)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:166)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    jdbc url: jdbc:snps:xml?d=C:\test_xsd.xsd&s=TESTSQL&re=employeesX&ro=true
    physical schema: TESTSQL
    Knowledge modules are:
    LKM: LKM SQL to SQL
    IKM: IKM XML Control Append
    CKM: CKM SQL
    Parameters set are:
    CREATE_XML_FILE: true
    XML_PATH:<default>:C:\DATA_FILE\www.xml
    I have tried to change the directory path but error is still there.
    Could some one please help me to resolve the issue?
    Regards,
    user1672911

    Hi,
    The trouble in "<default>:"  - if you set XML_PATH as C:\DATA_FILE\www.xml instead  <default>:C:\DATA_FILE\www.xml- it will work correctly.
    Greetings,
    Eugene

  • Select data from DataBase

    Hi;
    I try to select data from DataBase, But I get the following error, Could anyone help? thanks.
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.
    OracleDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at Lookup.main(Lookup.java:12)
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    public class Lookup {
        public static void main(String[] args)
            throws SQLException, ClassNotFoundException {
            String dbUrl = "jdbc:oracle:thin:@augur.scms.waikato.ac.nz:1521:comp319";
            String user = "group029";
            String password = "group029";
            // Load the driver (registers itself)
            Class.forName("oracle.jdbc.driver.OracleDriver");
            Connection c = DriverManager.getConnection(dbUrl, user, password);
            Statement s = c.createStatement();
            //SQL code:
            ResultSet r =
                s.executeQuery("SELECT * " +"FROM movie");
         StringBuffer results= new StringBuffer();
            ResultSetMetaData metaData = r.getMetaData();
         int numberOfColumns = metaData.getColumnCount();
         for(int i=1; i<=numberOfColumns; i++)
             results.append(metaData.getColumnName(i)+"\t");
         results.append("\n");
         while (r.next()){
             for( int i=1; i <=numberOfColumns; i++)
              results.append(r.getObject(i)+"\t");
             results.append("\n");
         s.close();
    }

    It's a classpath problem. Either you mistyped the class name, or you don't have the class in your classpath. I think Oracle's drivers come in db12.zip or db12.jar or some such. Whatever that jar or zip file is, it has to be in your classpath, but it's not.
    Or it is in your classpath, but you're in an appserver context where the classloader that the container provides for your app uses something other than the classpath variable. For instance, in tomcat, the jar file would be uder webapps/yourApplication/WEB-INF/lib I think.

  • Select data from database tables with high performance

    hi all,
    how to select data from different database tables with high performance.
    im using for all entries instead of inner joins, even though burden on data base tables is going very high ( 90 % in se30)
    hw to increase the performance.
    kindly, reply.
    thnks

    Also Check you are not using open sql much like distict order by group by , use abap techniques on internal table to acive the same.
    also Dont use select endselect.
    if possible use up to n rows claus....
    taht will limit the data base hits.
    also dont run select in siode any loops.
    i guess these are some of the trics oyu can use to avoid frequent DATA BASE HITS AND ABVOID THE DATA BASE LAOD.

  • Extract data from database to xml ?

    is there any API, classes or tools ready to extract data from oracle database and generate xml files, Instead to implement a DOM class and build little by little the xml file??
    thanks for every info in advance.

    Yes, download the Oracle XML Development Kit from Oracle's website and look at the documentation of the XML-SQL Utility.

  • Selecting Data from DSO via ABAP Routine

    Hello,
    i dont know how to solve my special requirements with sap bw. Maybe you have some idea.
    I have a row of data in my DSO, which is like:
    Date               ObjectA     ObjectB          Amount
    2014 08 18     testA          testB              1000
    2014 08 19     testA          testC              500
    2014 08 20     testA          testB              2000
    I want to have a key figure in my reports, which shows a special smoothed average per day of the past 3 months for each day-object combination.
    The formula how the average is calculated, should be neglected in that example.
    Date               ObjectA     ObjectB          Amount     smoothed average
    2014 08 18     testA          testB              1000          900
    2014 08 19     testA          testC              200            150  
    2014 08 20     testA          testB              2000          950
    2014 09 20     testA          testB              3000          1000
    My first idea was that I have to create that key figure in the transformation from DSO to my cube, because there is no option for that advanced calculations in queries.
    So I need access to all the data in my DSO while i am in an abap environment in the transformation routine. I need that because i have to do calculations from data in the past. How can I achieve this? Or are there other ways to solve my requirements?
    I hope you can help.
    Best regards
    Simon

    You should utilize the start routine or end routine functionality of a 7.x transformation.
    You can read from the DSO active table which has the naming convention: /BI0/A + dsoName + 00 (business content dso) or /BIC/A + dsoName + 00.
    For example in end routine:
    //local data declaration
    DATA: lt_dso TYPE standard table of /bic/azfi_o0100.
    FIELD-SYMBOLS: <fs_dso> type /bic/azfi_o0100.
    //get data
    SELECT *
    FROM /bic/azfi_o0100
    INTO table lt_dso
    FOR ALL ENTRIES IN RESULT_PACKAGE
    WHERE objectA = objectA AND
                   objectB = objectB.
    SORT lt_dso BY objectA objectB.
    //populate result package
    LOOP AT RESULT_PACKAGE ASSIGNING <result_fields>.
    READ TABLE lt_dso ASSIGNING <fs_dso>
    WITH KEY objectA = <result_fields>-objectA
                      objectB = <result_fields>-objectB
    binary search.
    //do calculation...
    <result_fields>-zsmoothavg = ...
    ENDLOOP.

  • Display data in Web DynPro table from database via EJB

    I have a JavaBeans model which has a method populateDataToTable()to retrieve data from database via Session bean (calling entity bean, returning ArrayList of data) and the data needed to be display in the Web DynPro table.
    User Interface (Web DynPro) <-> JavaBeans Model <-> Busineess Logic (session bean) <-> Persistence (Entity Bean)<-> DB table.
    The context bindiing and table part is ok. How do i load the data to the table ? what the coding to put in wdDoInit() ?
    Any help would be appreciated.

    in wdinit(),
    Collection col = new ArrayList();
    try{                    
      MyCommandBean bean = new MyCommandBean();
      col = bean.getDataFromDbViaEJB();
      wdContext.nodeMyCommandBean().bind(col);
    } catch (Exception ex) {
       ex.printStackTrace(ex); 
    in your JavaBean model class, MyCommandBean getDatafromDbViaEJB() method:
    Collection col = new ArrayList();
    Collection newcol = new ArrayList();
    //include your own context initialization etc...
    col = local.getDataViaSessionBean(param);
    // if your returned result also a bean class, reassigned it to current MyCommandBean
    for (Iterator iterator = col.iterator(); iterator.hasNext();) {
        MyOtherBean otherBean=(MyOtherBean)iterator.next();
        MyCommmandBean bean = new MyCommandBean();
        bean.attribute1 = outBean.getAttirbute1();
        // get other attibutes
        newcol.add(bean);
    return newcol;

  • How to select data from a PL/SQL table

    Hi,
    I am selecting data from database after doing some screening i want to store it in a PL/SQL table (temporary area) and pass it to oracle reports.
    Is there any way to select the data from a PL/SQL table as a cursor. Or is there any other way of holding the temporary data and then pass it back as a cursor.
    Regards
    Kamal

    A PL/SQL "table" is anything but a table. Whoever came up with this term in PL/SQL to describe what is known as dynamic arrays (the correct programming terminology that existed since the 70's if not earlier and what is used in all other programming languages I'm familiar with)... well, several descriptions come to mind and none of them are complimentary.
    You cannot "select" from a PL/SQL dynamic array as it is not a table within the Oracle context of tables.
    Thus you need to convert (cast) a PL/SQL dynamic array into a temporary Oracle data set/table in order to select from it. This is in general a Bad Idea (tm). Oracle tables and SQL and concurrency controls and all that are especially designed for processing data. PL/SQL arrays is a very simplistic data structure with very limited usage. Why would you want to use that in SQL via a SELECT statement when you can use Oracle tables (or proper temp tables) instead? Besides that, it is also slow to cast a dynamic PL/SQL array into an Oracle SQL data set structure (context switching, copying of memory, etc).
    The proper way to use PL/SQL to generate data sets for use via the SQL engine is pipelined table functions.
    This is not to say that you should never use PL/SQL arrays and casting in SQL.. simply that you need to make sure that this is the correct and scalable way to do it. And that will also always be an exception to the rule when you do.

  • How can we transfer huge amount of data from database server to xml format

    hi guru
    how can we transfer huge amount of data from database server to xml format.
    regards
    subhasis.

    Create ABAP coding
    At first we create the internal table TYPES and DATA definition, we want to fill with the XML data. I have declared the table "it_airplus" like the structure from XML file definition for a better overview, because it is a long XML Definition (see the XSD file in the sample ZIP container by airplus.com)
    *the declaration
    TYPES: BEGIN OF t_sum_vat_sum,
              a_rate(5),
              net_value(15),
              vat_value(15),
             END OF t_sum_vat_sum.
    TYPES: BEGIN OF t_sum_total_sale,
            a_currency(3),
            net_total(15),
            vat_total(15),
            vat_sum TYPE REF TO t_sum_vat_sum,
           END OF t_sum_total_sale.
    TYPES: BEGIN OF t_sum_total_bill,
            net_total(15),
            vat_total(15),
            vat_sum TYPE t_sum_vat_sum,
            add_ins_val(15),
            total_bill_amount(15),
           END OF t_sum_total_bill.TYPES: BEGIN OF t_ap_summary,
            a_num_inv_det(5),
            total_sale_values TYPE t_sum_total_sale,
            total_bill_values TYPE t_sum_total_bill,
           END OF t_ap_summary.TYPES: BEGIN OF t_ap,
            head    TYPE t_ap_head,
            details TYPE t_ap_details,
            summary TYPE t_ap_summary,
           END OF t_ap.DATA: it_airplus TYPE STANDARD TABLE OF t_ap
    *call the transformation
    CALL TRANSFORMATION ZFI_AIRPLUS
         SOURCE xml l_xml_x1
         RESULT xml_output = it_airplus
         .see the complete report: Read data from XML file via XSLT program
    Create XSLT program
    There are two options to create a XSLT program:
    Tcode: SE80 -> create/choose packet -> right click on it | Create -> Others -> XSL Transformation
    Tcode: XSLT_TOOL
    For a quick overview you can watch at the SXSLTDEMO* programs.
    In this example we already use the three XSLT options explained later.
    As you can see we define a XSL and ASX (ABAP) tags to handle the ABAP and XML variables/tags. After "

  • Xml data from database using jdbc

    I should get the xml data from database. Is this scenario possible using jdbc adapter ? If possible, how can I get it ?. Plz help me

    I suppose that probably, xml data are stored in a BlobImage Field.
    You can use a Stored Procedure on Database Side, to select and put out the xml data structured in output fields or structures.
    From JDBC Sender channel, you can call the SP, that raise out a Structure formatted like the XML Data stored in Xml Database field.
    In your opinion, this should be a possible way to achieve this issue?

  • Select data from another database

    Hi,
    Is it possible to retrieve data from a table from another database?
    For instance, I have two databases db_1 and db_2
    I login to the database db_1 using
    sqlplus username/psw@db1
    and to the database db_2 using
    sqlplus username/psw@db2
    In SQL> db1 I would like to use select statement from a table in the db2. Is it possible?
    Another question:
    I have two tablespaces TP1 and TP2 in the database db1
    The TP1 is my default tablespace.
    Can I switch from TP1 to TP2 tablespace in the sqlplus?
    If not, how can I select all tables obtained in the TP2? Or how can I select data from a table in the TP2?
    Thanks

    I don't know how to create a db link.<br>
    SQL Reference Guide - CREATE DATABASE LINK<br>
    There are some examples in the doc above.<br>
    <br>
    What about if db1 and db2 have the same table name?<br>No problem, exactly like when you have two same table name accross two schemas on same database. The table suffixed by the dblink name come from the other schema of other database (schema which you use to connect through the dblink to the other database).<br>
    <br>
    Nicolas.

  • SELECT data from two databases

    I have two databases that I need to select data from in a
    single SELECT. Using DWs Advanced window for creating the select I
    don't see any way to select more than 1 Connection. Both databases
    have unique user and passwords but reside on the same server. Any
    idea how I can write a single SELECT to get data from both dbs. I
    assumed it would be similar to selecting data from multiple tables
    within the same db but the connection part is stumping me. Any
    ideas would be greatly appreciated.

    TouchstonePress wrote:
    > Page 48, Developing a Web Database Application . . .
    speaks about making a
    > database with two related TABLES each with the same
    PRIMARY KEY column with
    > which to identify a customer using their unique number.
    That's the basic technique for joining two tables in the same
    database.
    The original poster has tables in different databases that
    have
    different user accounts and passwords.
    Although it's possible to join two databases, you cannot do
    it unless
    you have one user account with the same privileges on both
    databases.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Select data from different database

    hi,
    may I know how to select data from different database?
    for example,
    I've 2 databases, OracleDB and OracleAR
    Connect with OracleAR in SQL*Plus
    select * from OracleDB.TableName
    does Oracle support this kind of query?
    how can I retrieve data from other database while im connecting with
    other database?

    Hi,
    Yes, it's possible. No, your syntax won't work.
    First of all you have to define a DATABASE LINK inside the DB where you are already connected (in this case OracleAR). Read docs how to do that.
    Second thing is the query. It will look like
    SELECT * from TableName@<NameOfDatabaseLink>Greetings,
    Guido

  • Oracle select data from ms access database

    please dear sirs,
    exactly what i need is when i make select statment from oracle sql, i can select data from ms access database
    please help me
    thanks in advance
    Yasser
    Edited by: user4490340 on 27-Oct-2010 01:09

    You will need to use ODBC. Pl post details of OS and database versions.
    http://download.oracle.com/docs/cd/E11882_01/gateways.112/e12070/intro.htm
    HTH
    Srini

  • Selecting data from a RDBMS table using connector framework, JDBC-Connector

    Hi Experts,
    I'm trying to select data from a mysql database that is connected via the BI-JDBC System in the portal (EP 7 SP 11).
    The connection (using the Connector Gateway Service) is set up, but selecting data fails.
    Can you please give me a code example how to select data from a table using INativeQuery or IOperation / IExcecution ?? IQuery is depracted...
    Here my piece of code, actually method "connection.newNativeQuery()" throws exception "BICapabilityNotSupportedException: Operation is not supported":
         IConnection connection = null;
         public void connectToJDBCSystem(String jdbcSystem) {
           // open a connection
           try { // get the Connector Gateway Service
              Object connectorservice =
              PortalRuntime.getRuntimeResources().getService(IConnectorGatewayService.KEY);
              IConnectorGatewayService cgService =
              (IConnectorGatewayService) connectorservice;
              if (cgService == null) {
                   response.write("Error in get Connector Gateway Service <br>");
              try {
                ConnectionProperties prop =
                   new ConnectionProperties(request.getLocale(), request.getUser());
                connection = cgService.getConnection(jdbcSystem, prop);     
              } catch (Exception e) {
                   response.write("Connection to JDBC system " + jdbcSystem + " failed <br>");
                   response.write((String)e.getMessage() + "<br>");
                   e.printStackTrace();
              if (connection == null) {
                   response.write("No connection to JDBC system " + jdbcSystem + "<br>");
              } else {
                   response.write("Connection to JDBC system " + jdbcSystem + " successful <br>");
           } catch (Exception e) {
                response.write("Exception occurred <br>");
                           // up to this point it works fine...
           // build query using an IExecution object obtained from the Connection object
           response.write("prepare query 'SELECT idArt, art FROM art' <br>");
           String qstr = "SELECT idArt, art FROM art";
           INativeQuery query = null;
           try {
              query = connection.newNativeQuery();             
              response.write("execute query...<br>");
              ResultSet rs = (ResultSet)query.execute(qstr);
              while (rs.next()) {
                   response.write("<th>" + rs.getString(1) + "</th>");     
           } catch(Exception e)
              response.write("connection.newNativeQuery() failed <br>");
              response.write((String)e.getMessage() + "<br>");
              e.printStackTrace();
           } finally {
                 if( connection != null )
                 try {connection.close();}
                              catch(Exception ee){}
    Many thanks in advance, Monika
    Edited by: Monika Verwohlt on Jan 26, 2010 9:49 AM

    However this doesn't affect the XML encoding in data retrieved from XMLType using PL/SQL or programs (but it does work OK for SQLPlus SELECT).When performing an explicit serialization, with getClobVal method or XMLSerialize function, the database character set is used :
    NLS_LANG = FRENCH_FRANCE.WE8MSWIN1252
    NLS_CHARACTERSET = AL32UTF8
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> create table test_nls of xmltype;
    Table créée.
    SQL> insert into test_nls values(xmltype('<?xml version="1.0" encoding="UTF-8"?><root/>'));
    1 ligne créée.
    SQL> select * from test_nls;
    SYS_NC_ROWINFO$
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <root/>
    SQL> select t.object_value.getclobval() from test_nls t;
    T.OBJECT_VALUE.GETCLOBVAL()
    <?xml version="1.0" encoding="UTF-8"?><root/>
    SQL> select xmlserialize(document object_value as clob) from test_nls;
    XMLSERIALIZE(DOCUMENTOBJECT_VALUEASCLOB)
    <?xml version="1.0" encoding="UTF-8"?><root/>

Maybe you are looking for

  • Error on generating reports from forms -- 499 Oracle SSO

    hai friends.. while am tryng to generate a report from a form(without passing any parameters), am geting the following message: *499 Oracle SSO* Oracle SSO am posting my code used: PROCEDURE RUN_REP_RRO ( ip_report_name_incl_path VARCHAR2, ip_report_

  • Mavericks issues. Will doing a clean install from Snow Leopard back to Mavericks get rid of the bugs?

    I'm using a Mac pro 2008, 10GB RAM (6 after Mavs upgrade), Nvidia 8800 GT. After Mavs upgrade Chrome crashes when I go to youtube. Tried reinstalling Chrome and it kept crashing. It even crashes when I open up the preferences. Final Cut X's share men

  • Jotminder - looking for your feedback

    Hello, We've been testing the Jotminder personal wik on Android and iOS devices, but are keen to get feedback from the Nokia community. We'd be particularly interested in feedback from S^3, Anna and maemo users. You'll find information about Jotminde

  • Nfor table ZPP cannot be generated, error while transport

    Hi All I have made a change to ZTABLE ( essentially added another field which is not key field ). i have checked that all are active. technical settings are complete too. now when i adjust in se14 it shows me no error. but when i transport to Quality

  • SharePoint 2013: Hide/Unhide column based on another column.

    Dear all, I have a dropdown list "Correspondence Type".  What I want is to display/hide some fields when "Correspondence Type" is selected. In the drop down list I have the following choices:  "IN" , "OUT". What is happening is, when i am selecting "