XML and Oracle 8i Lite

Hi Wizards
I'm in an endeavour to do the following things -
1.Generate XML output from Oracle 8i Lite database
2.Modify the XML and update the database taking the modified XML.
My java platform is JDK 1.2. I've used the XML SQL Utility for Java, and in doing so i've been successful with the 1st step. I've used the Oracle 8.1.6SDK JDBC Driver which is compatible with JDK 2.The code fragment is like the following -
import java.io.*;
import java.sql.*;
import java.math.*;
import oracle.xml.sql.query.*;
import oracle.jdbc.*;
import oracle.jdbc.driver.*;
public class orasql1
public static void main(String args[]) throws SQLException
Connection conn = null;
String tabName = "emp";
try {
Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
conn = DriverManager.getConnection("jdbc:Polite:POlite", "SYSTEM", "manager");
catch (Exception e) {
System.out.println("Oracle Connection error\t:");
System.out.println(e);
System.exit(0);
OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from " + tabName);
qry.setRowsetTag("SCHEMADOC_1");
qry.setRowTag("EMPLOYEE");
qry.setStyleSheet("emp.xsl");
String xmlString = qry.getXMLString(true);
conn.close();
try {
File output = new File("emp.xml");
FileWriter xmlFile = new FileWriter(output);
xmlFile.write(xmlString,0,xmlString.length());
xmlFile.close();
catch (Exception e) {
System.out.println("Output file error\t:");
System.out.println(e);
System.exit(0);
I am putting some sample code for step 2 in the following section -
import oracle.xml.sql.dml.*;
import java.sql.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.*;
import java.net.*;
public class orasql2
public static void main(String args[]) throws SQLException
Connection conn = null;
String tabName = "emp";
String fileName = "emp.xml";
try {
Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
conn = DriverManager.getConnection("jdbc:Polite:POlite", "SYSTEM", "manager");
catch (Exception e) {
System.out.println("An error has occurred.");
System.out.println("Please check your CLASSPATH variable..");
System.out.println(e);
System.exit(0);
OracleXMLSave save = new OracleXMLSave(conn, tabName);
URL url = save.createURL(fileName);
save.setRowTag("SCHEMADOC_1");
int rowCount = save.insertXML(url);
System.out.println("Successfully inserted "+rowCount+" rows into "+tabName);
conn.close();
Compiling the above code is fine, no errors! But while running the application I get the error -
Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: java.lang.Class
CastException: oracle.lite.poljdbc.OracleStatement
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:345)
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:248)
at orasql2.main(orasql2.java:27)
My question is whether this thing can be done at all using Oracle 8i Lite? If so then how?
Waiting for ur advices.
Biplab
(An Indian, but at present in Houston, Texas)

It looks like be a classpath issue. Would you check with the class name.

Similar Messages

  • New to XML and Oracle

    Just trying to clarify some issues as I try and learn about XML, and specifically how it integrates into the DB.
    1 - Is there a way with Oracle tools for me to get an XSD of an existing 9i relational schema? We are not currently using the XML DB, but our middleware developers would like to have an up to date XSD to use for their internal mapping.
    2 - Is there any way that I can keep that XSD up-to-date automatically, so I get a new one whenever the schema gets updated?
    3 - If I wanted to investigate storing XML docs within the DB in native XML format, I need to have an XML DB, correct? Is this DB construct maintained seperatelly from my "normal" relational schema? or are they kept in sync by Oracle?
    I know these may all be real basic questions, but as I said, I'm new to XML and Oracle. I am reading as much as I can, but there are a lot of docs out there.
    Thanks,
    Mike

    Hi
    1. On my opinion such a tool doesn't exists. Some parts can be implemented elsewhere, but not as described by you... e.g. with XSU if you specify the parameter "withschema" the XSD of the executed statement is generated. Another example is to use DBMS_METADATA to dump the data dictionary in XML (but not XSD, of course you could write your own XSLT to do this transformation...).
    2. -
    3. If you use XSD-based tables the XSD and the relational model are stored separately in the data dictionary. Therefore if you change the XSD you have to drop/create the XSD-based table... no schema evolution yet.
    Chris

  • Imp and Oracle 8i LITE

    iH:
    There was another post on this topic, but the answer was vague.
    I have an Oracle 8 database dump file (a DMP). I would like to import (a subset of) this dump file into my Oracle 8i LITE database.
    Is this possible? I don't have access right now to an Oracle8(i) server, so I can't use the Oracle 8 Navigator to cut and paste the data that I need from the dump file ...
    When I run imp80.exe (which was installed by the Oracle Lite installer) I get the message:
    IMP-00003: ORACLE error 942 encountered
    OCA-30034: table not found
    [POL-5130] table or view not found
    IMP-00021: operating system error - error code (dec 2, hex 0x2)
    IMP-00023: Import views not installed, please notify your DBA
    IMP-00000: Import terminated unsuccessfully
    So is imp80.exe supported by Oracle LITE or not?
    Aaron
    [email protected]
    null

    Before you can import/export, you need to run the SQL catexp.sql from the $ORACLE_HOME/rdbms/admin directory.

  • SQL*Plus and Oracle 9i Lite

    What is the trick to connecting to Oracle 9i Lite using SQL*Plus?
    I am using the following:
    Username: system
    Password: aaa
    Host String: ODBC:POLite
    I recieve an ORA-12203: TNS:unable to connect to destination: Function not performed
    do I need an entry in my tnsnames.ora file? If yes what? Also, if yes, where in the docs is this discussed?
    Thanks in advance

    Try format
    ODBC:POLITE:datasource
    for Polite:
    ODBC:POLITE:POLITE
    But since 4.0.1 Oracle Lite you can't use SQL plus.
    Use new tool named msql (<ora home>\Mobile\SDK\BIN\msql.exe) or SQL Worksheet in Oracle9i JDeveloper.

  • Difference between oracle 9i database and oracle 9i lite

    Dear Sir/Mam,
    I like to know the performance and functionality difference
    between oracle 9i database and oracle9i lite.
    Is there is any performance variations between
    oracle 9i 9.0.1.1.1 and 9i 9.2.0.1.1

    Hello,
    you can see this note
    #139580.1, Oracle - Compatibility Matrices and Release Information, for detailed information.
    regards, Jorge

  • Xml and oracle 8i (geom)

    I try to excute the program called SampleSDOtoXML; wich exist in sdoapi_samples.zip and ;this program has for role to generate XML file from geom in oracle spatial 8i (sdo_geometry),and i include the directory for SampleSDOtoXML.class in my JAVA Classpath ,the compilation is good ,however, in execution it didnt generate any file but it give me this message:
    Exception in thread "main" java.lang.NoClassDefFoundError: SampleSDOtoXML (wrong
    name: sample/SampleSDOtoXML)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:242)
    at java.net.URLClassLoader.access$1(URLClassLoader.java:210)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:191)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:185)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:249)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:308)
    please, if you have any solutions dont hesitate.
    thanks.

    It looks like be a classpath issue. Would you check with the class name.

  • Help with XML and Oracle 8i

    Hi Oracle XML Team,
    I really need to understand clearly about how 8i supports XML.
    Please help to answer the following questions quickly.
    1) Using the available components such as XML SQL utilities, XML
    Class gen, Parser and the Servlet. Can I use all this to develop
    an application to retrieve, store and query XML doc in 8i (do I
    need any components such as intermedia)?
    2) The licensing scheme for all the above 4 four components
    stated that it is not for commercial use? But what if I need to
    deploy my application soon ? Is there a separate licensing
    scheme for deployment?
    3) I am using 8i standard edition now, if I would to use
    iFS/intermedia....do I need to get the Enterprise Edition?
    Please help me. Thank you very much
    Sam
    null

    i think you want something along the lines of :
    stageFade_mc.swapDepths(theMovieOnTopAtTheMoment);
    Note that only dynamically created movies have depths. So if
    either of the movieclips in question are just sitting in your
    timeline you cant swap their depths.
    In that case you either need to duplicateMovieClip() or just
    set things _visible property where apropriate.
    good luck
    jon

  • Jdev And Oracle 8i Lite (Help me)

    When I create a new project with the wizard I have a problem with the connection to my scheme (Oralce 8i late)(Polite is the database of the oracle 8i late). I can connect suceful but, I can't see the tables, the program say me that
    SQL Error
    POL-5130 message file is not loaded
    java.sql.SQLException
    Thanx

    JD3112 installation readme file contains the following hint. This might be useful to you...
    >>
    Please see the section "Using Oracle8i Lite with JDeveloper" in the online HELP for information on configuring Oracle8i Lite for use with JDeveloper.
    >>
    Regards.
    Anil
    null

  • IMP80 and Oracle 8i Lite

    Hello,
    Does anybody know how to import data from a .dmp file into 8i Lite? I've tried using the imp80 and exp80 tools but I got an error that the import/export views were not installed in the database. Thanks in advance.
    Brian

    Before you can import/export, you need to run the SQL catexp.sql from the $ORACLE_HOME/rdbms/admin directory.

  • XML and Oracle 9.0.1.0.0

    how active function XML(XMLElement,..) in [
    Oracle9i Enterprise Edition Release 9.0.1.0.0 -]
    thanks.

    Alex,
    does a
    select xmlelement("SQLX", 'Hello ,World!') from dual; work?
    SQL> select xmlelement("SQLX", 'Hello World!') from dual;
    XMLELEMENT("SQLX",'HELLOWORLD!')
    <SQLX>Hello World!</SQLX>
    It works for me in 9.2
    SQL> select xmlelement("orderid", order_num) from orders;
    XMLELEMENT("ORDERID",ORDER_NUM)
    <orderid>1</orderid>
    <orderid>2</orderid>
    <orderid>3</orderid>
    <orderid>1</orderid>
    <orderid>2</orderid>
    <orderid>3</orderid>
    6 rows selected.
    SQL>

  • XML and oracle 7.3.X Urgent

    Dear Sir/Madam
    Is there any product/package available to load XML files into database tables when running on a 7.3.X database in a client/server environment?
    Thanks a lot

    I need to do the work on a UNIX box (if I am not mistaken, ODBC/JDBC would not work there). Ideas?
    Thanks,
    ah

  • Oracle 8i Lite - OO4O and other Questions

    1.) Can OO4O (Oracle Objects for OLE) be used with the Oracle 8i Lite database ?
    2.) Does Oracle 8i Lite operate as a "client/server" database ?
    3.) Is it possible to have multi-user access to Oracle 8i Lite ?
    4.) Is there documentation somewhere that lists all of the limitations with 8i Lite as compared to 8i ?
    We are in the planning stages of a partial mobile system, and want to know how much difference in development efforts for the 2 platforms (Oracle 8i on Win 2000 server and Oracle 8i Lite on NT/98/95 Laptops).
    Any information on Oracle 8i Lite would be appreciated. -- Especially need an answer to question 1 right now.
    Thanks,
    Paula

    Hi,
    I am qouting below from the oracle 8i Lite documentation which says it supports triggers . Please clarify.
    Oracle Lite DBMS
    Oracle Lite DBMS is a lightweight (50KB - 750KB), Java enabled database designed from the ground up for laptops, handheld computers, PDAs and smartphones. It supports industry standard ODBC, JDBC, SQLJ, and Java Stored Procedures and Triggers. It provides a streaming fast "C" interface, OKAPI, to its object kernel. It also supports Java Access Classes, JAC, a fast and easy way to make Java Objects persistent. Oracle Lite DBMS now supports all popular mobile platforms, including Palm OS, EPOC, and Windows CE, letting you deploy enterprise applications on virtually any mobile device.
    Regards
    null

  • Any difference in the dbms and jdbc drivers btw oracle 8i lite and 9i lite

    Is there any significant difference between oracle 8i lite and oracle 9i lite in terms of database and jdbc drivers?
    If not, it may be better off using oracle8i.

    According to Oracle , 9i lite is more powerful than 8i Lite.
    one thing, 8i Lite is not certified for windows 2000.
    jothi

  • Oracle 9i LIte Connectivity with MIDP

    Hello,
    I am facing problem for connectivity of MIDP and Oracle 9i Lite. Anyone knows the which tool is good to desing the MIDP. Shall i use the Swing/AWT in MIDP. Is there any way to make Grid Layout and Buttons with MIDP.

    you cant user those in the MIDP
    but you have to call server application and then server applciation will fetch teh data from the oracle and retunr them back to midlet
    [email protected]

  • Oracle 8i Lite connection problem

    I'm trying to make connection with Oracle 8i Lite native jdbc driver. I'm getting error "Unable to find driver oracle.lite.poljdbc.POLJDBCDriver" when pressing Test button.
    olite40.jar is in IDEClassPath in jdeveloper.ini and Oracle 8i Lite is in Default Project Libraries.
    What I've missed?

    If you have added the Olite40.jar file to the IDE_CLASSPATH setting in the jdeveloper.ini file, make sure you restarted JDeveloper after editing the ini file.
    Also, make sure you specity 'Olite40.jar' not 'olite40.jar' (watch the case of the archive file name).

Maybe you are looking for

  • Error while importing model in NWDS 7.1

    Hi All, I am trying to consume a Web Service in NWDS 7.1. Following are the steps which I have followed for consuming the web service : Create a model in the DC using 'Adaptive Web Service model' template. Create component and reference this model as

  • With the new seession in IE gives session error for new user

    Hi, In new opened IE if i tries to login with new user. It is switching b/w the files in the status bar(ie., Header1.jsp and ListServicecall.jsp simultaneously) and at end the session error result will arise. But for the second time if i login with t

  • Having problem opening iMovie 7... with Panasonic PV-GS500.

    Hi there, I just bought iMac 4Gb. I am tried to conect my Panasonic Digital comcoder PV-GS500 into iMAC. Camcoder inserts using Firewire and USD port for Mac. When I inserting, it does read my SD card on the camcoder, but iMovie should opeb automatic

  • 9.5.3 Help / About reports version as 9.0.0

    After downloading AcrobatUpd953_all_incr.msp, installing it to patch Acrobat from 9.5.2 to 9.5.3, and rebooting, when I select Help / About in Acrobat, the dialog shows the version of Acrobat as 9.0.0. When I open Control Panel / Programs and Feature

  • QUALIFIED table import at single step

    Hi all if any one can tell me hoe to import qualified table and hierarchy table. Qualified table has 3 yes qualifiers and one 2 no qualifiers. Thanks in advance Nm