Weblogic jpa and oracle xmltype column type

Hi,
i try to use jpa with a table with a column of "xmltype"
i use weblogic 10.3.2.0(eclipselink) and i got this error :
java.lang.NoClassDefFoundError: oracle/xdb/XMLType
Of course the xdb.jar and the xmlparverV2.jar are bundled in the ear with the others library,
and i also put them in the lib directory of the weblogic server.
In my persistence class the filed is declared as a "String".
I try also to use a DescriptorCustomizer with a DirectToXMLTypeMapping
to access to the value of the field as a string.
Thank you for your help.

Option-1). If you want the classes to be loaded from inside your Application only then you can use ClassLoader filtering ...
That will be a best option ....Just put your Xdb.jar file inside your applications Lib directory and apply classloader filtering. Like this you need not to edit the Server Classpath....so other applications will not be forced to use the Jar which u want for a specific application.
Classloader filtering example demonstrated here: http://weblogic-wonders.com/weblogic/parsers_issues/
<font color=red>Below Option i think will work 95% in your case.</font><br>
Option-2). add the path of this Jar in *"setDomainEnv.cmd"* (This script is present in <DOMAIN_HOME>\bin directory) in the POST_CLASSPATH variable...
set POST_CLASSPATH=D:\oracle\Middleware\user_projects\domains\base_domain\config\lib\oracle.xdb_11.1.0.jar;

Similar Messages

  • WebLogic CMP and Oracle LONG columns

    I noticed that the Oracle LONG is not supported in
    http://edocs.bea.com/wls/docs61/ejb/cmp.html#1059575
    but doesn't seem to cause an error when I use it in the descriptors or
    column types.
    Am I going to be bopped on the head down the road with hidden issues? I'm
    trying to store arbitrarily (well, reasonably so) long strings? Should I use
    CLOBs instead? LONG are easier to work with other database tools which is
    why I'd prefer them but...
    thanks,
    greg

    The link you've mentioned doesn't say that Oracle long is not supported. In
    fact it is supported and the corresponding java data-type for WLS is
    Longvarchar.
    For more on this you can refer to
    http://e-docs.bea.com/wls/docs61//oracle/advanced.html#1158561 under "Data
    Types". Here you'll find elaborate discussion on Java supported data-types
    for Oracle.
    Regards,
    Santanu
    "Gregory Gerard" <[email protected]> wrote in message
    news:3c1f0784$[email protected]..
    I noticed that the Oracle LONG is not supported in
    http://edocs.bea.com/wls/docs61/ejb/cmp.html#1059575
    but doesn't seem to cause an error when I use it in the descriptors or
    column types.
    Am I going to be bopped on the head down the road with hidden issues? I'm
    trying to store arbitrarily (well, reasonably so) long strings? Should Iuse
    CLOBs instead? LONG are easier to work with other database tools which is
    why I'd prefer them but...
    thanks,
    greg

  • Any kind of integration experience with Weblogic JMS and Oracle AQ?

    Hi,
    In my company I work with java developers who believe in some kind of "holly" database independence I don't understand and as a result my life as a database developer is hell on earth.. Yesterday we again started to discuss, this time where to log, they believe database is slow and prefer logging to filesystem, after some hours finally I could convince them for some operational and reporting needs to use the database and will do this in an asyncronous way whiich they won't get slow. After all I believe the reason for a database is data, this is the place where data lives, and with the correct desing and implementation logging to database would perform better.
    I love Oracle features, and know that we paid a lot for this software, so today I started investigating this promised solution. And quickly I found AQ and JMS topics in the documentation :)
    After this introduction here is my problem; my company use BEA Weblogic as application server and the java guys want AQ to automatically (but of course with some delay) take their JMS log requests into database tables. Does any one have similar application experience, or any kind of integration experience with Weblogic JMS and Oracle AQ?
    Any comments, references, documentation, sample code, url will be most welcomed :)
    Thank you very much!
    Tonguc
    [email protected]
    References I found upto now;
    Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14291/toc.htm
    (Packages; javax.jms & oracle.jms)
    Oracle® Streams Advanced Queuing User's Guide and Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14257/toc.htm
    Part IV
    Using Oracle JMS and Oracle Streams AQPart V describes how to use Oracle JMS and Oracle Streams Advanced Queuing (AQ).
    Chapter 11, "Introducing Oracle JMS"
    Chapter 12, "Oracle JMS Basic Operations"
    Chapter 13, "Oracle JMS Point-to-Point"
    Chapter 14, "Oracle JMS Publish/Subscribe"
    Chapter 15, "Oracle JMS Shared Interfaces"
    Chapter 16, "Oracle JMS Types Examples"
    A Sample Code from Otn
    http://www.oracle.com/technology/sample_code/tech/java/web_services/jmsws/NewsQueueEJB.java.html

    I wouldn't go as far to say Oracle AQ is out-dated today. However, it is indeed a proprietary technology that did not found much main-stream adoption in the earlier years after its introduction. The advent of JMS made it somewhat more useful (or should I say intriguing, because more people are trying to tie it together with other J2EE technologies), but the Oracle's JMS wrapper classes in aqapi.jar were not feature complete for a long while, so using it outside Oracle's application server was painful, if not impossible. I do agree that the info at the dev2dev's JMS newsgroup or in this forum is highly fragmented, as neither Oracle nor BEA provides an official solution to integrate AQ with WebLogic, so people like us have to learn the technology through experimentation and in a piecemeal fashion.
    3 years ago I was literally "playing around" - we had a polling mechanism set up to use triggers to write Oracle data changes into an event table, and had a Java-based daemon to scan that table and publish events as JMS messages to the WebLogic JMS server. This continues to work reliably till today, but I was looking for a solution that has few parts - I wanted to hook up my WebLogic MDB directly to AQ as a foreign JMS provider. Although I was able to get it to work (including XA), there were a few hoops I had to jump through, such as decompiling the Oracle AQjms classes to make them bind to the WebLogic JNDI tree.
    One year after that Diptanshu Parui took what I did a giant step further - he extended the Oracle AQjms classes to allow them to be bound to the WebLogic JNDI tree naturally, and he figured out how to use WebLogic JMS messging bridge to re-send single-threaded AQ JMS messages to clustered JMS queues, which allow concurrent message assumption by multiple instances of MDB's. My impression is that he is using that setup in a production environment.
    I am sure you are aware of it but I would like to make it clear - in order to use AQ as a foreign JMS provider to WebLogic-hosted MDB's, you don't need to update your database to Oracle 10g - Oracle 8i is good enough (although I recommend at least 9i Release 2). It is not the database engine, but rather the aqapi.jar JMS wrapper on top of AQ that matters. I do recommend that you use aqapi.jar from Oracle Application Server 10.0.3 or up for better XA support, among other things. Again, you don't have to replace WebLogic with Oracle AS - you only need a single jar file from it and put it in your WebLogic's classpath. However, I don't know what this means from a licensing point of view if you ever go to production - do you have to pay the full price of OracleAS or OC4J just to use the aqapi.jar?
    In the coming days I will test the latest aqapi.jar to see how much progress Oracle has made in terms of making their J2EE products more spec-compliant :-).
    Hope the above gives you a different perspective.
    Eric

  • How to migrate Sybase 12 TEXT column to Oracle XMLType column

    The Migration Workbench does not appear to support mapping a Sybase TEXT column to an Oracle XMLType column. What is the best way to workaround this limitation?
    - Ron

    CLOB?

  • Oracle XMLtype data type

    Latest Powerbuilder 12.5.2
    Oracle 11g
    How can I update a XMLType column?
    can select it, but errors on update.

    Sorry about that, I got the information from this link:
    XMLType Operations
    I guess we need to get the right syntax in sqlplus (or equivalent) then map that to PB.
    The other alternative is to create a procedure to do the update for you, pass in a clob and convert that. The 4k limit you are seeing is the limit on a varchar2. All the xml work I have done has involved endless conversions.
    CREATE OR REPLACE PROCEDURE xmlupdate (xmlin IN CLOB, xmlout OUT CLOB)
    IS
       txml           XMLTYPE;
    BEGIN
    -- Convert Clob Received into an XML document
       txml := xmltype (xmlin);
    END;

  • Point cloud and TIN data column types

    Hi,
    I am designing some tables using the new SQL Developer Data Modeler, and have added some columns which will store point clouds and TINs (both using the specialized Oracle data types). I have noticed in Data Modeler that the SDO_GEOMETRY data type is available to use as a column type, but the SDO_PC and SDO_TIN data types are not available for use. Or perhaps the column types for these data types are actually something else - perhaps integers (given that several tables may be used to store this specialized data)?
    Thanks,
    Matt

    Maybe try Forum: SQL Developer:
    SQL Developer

  • DirectToXMLTypeMapping "create-tables" not generating XMLTYPE column type

    Can someone tell me how to code an XMLTYPE field such that "create-tables" will generate the XMLTYPE column and such that the IntegrityChecker will not throw an error.
    I am forced to run these alters after "create-tables" is run.
    ALTER TABLE XML_SYS_MSG drop column message;
    ALTER TABLE XML_SYS_MSG add (message XMLType);
    Snippets:
    <persistence...
    <property name="eclipselink.ddl-generation" value="create-tables" />
    </persistence>
    public class XmlMessageCustomizer implements DescriptorCustomizer {
    @Override
    public void customize(final ClassDescriptor descriptor) throws Exception {
    final DirectToXMLTypeMapping mapping = new DirectToXMLTypeMapping();
    descriptor.removeMappingForAttributeName("message");
    // name of the attribute
    mapping.setAttributeName("message");
    // IntegrityChecker requires uppercase for oracle
    // name of the column
    mapping.setFieldName("MESSAGE");
    descriptor.addMapping(mapping);
    @Entity(name = "XmlMessage")
    @Table(name = "XML_MSG")
    @Customizer(XmlMessageCustomizer.class)
    public class XmlMessage {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private long id;
    // @Column(columnDefinition = "XMLTYPE")
    // private String message;
    // ALTER TABLE XML_SYS_MSG drop column message;
    // ALTER TABLE XML_SYS_MSG add (message XMLType);
    private Document message;
    public XmlMessage() {
    public long getId() {
    return id;
    public void setId(final long id) {
    this.id = id;
    public Document getMessage() {
    return message;
    public void setMessage(final Document message) {
    this.message = message;
    Secondly if I turn on the IntegrityChecker it will fail
    public class EnableIntegrityChecker implements SessionCustomizer {
    @Override
    public void customize(final Session session) throws Exception {
    session.getIntegrityChecker().checkDatabase();
    session.getIntegrityChecker().setShouldCatchExceptions(false);
    }

    Adding:
         mapping.getField().setColumnDefinition("XMLTYPE");to the customizer should solve the problem.
    --Shaun                                                                                                                                                                                                                                                                                       

  • Weblogic 7 and Oracle

    I was wondering, does Weblogic 7 work with Oracle 8.16?? Or do I need
    to upgrade to 8.17?
    Thanks,
    Stephen.

    I was looking up that kind of thing today for an official support case. In the
    WLS 6.1 migration guide, it says that 8.16 is not supported and you must use 8.17.
    This is the upgrade guide from 4.5 and 5.1 to 7.0.
    http://edocs.beasys.com/wls/docs70/upgrade/upgrade45_51to70.html#1102044
    the Upgrading Oracle section ->
    http://edocs.beasys.com/wls/docs70/upgrade/upgrade45_51to70.html#1080633
    it has pointers to other references you will want to explore.
    If you go to the 7.0 docs http://edocs.beasys.com/wls/docs70/index.html and
    look at the topics: "Upgrading" ; JDBC related parts ; just poke around and you
    will find what you are looking for.
    /wws
    Stephen wrote:
    I was wondering, does Weblogic 7 work with Oracle 8.16?? Or do I need
    to upgrade to 8.17?
    Thanks,
    Stephen.

  • Difference between an XMLType table and a table with an XMLType column?

    Hi all,
    Still trying to get my mind around all this XML stuff.
    Can someone concisely explain the difference between:
    create table this_is_xmltype_tab of xmltype;and
    create table this_is_tab_w_xmltpe_col(id number, document xmltype);What are the relative advantages and disadvantages of each approach? How do they really differ?
    Thanks,
    -Mark

    There is another pointer Mark, that I realized when I was thinking about the differences...
    If you would look up in the manual regarding "xdb:annotations" you would learn about a method using an XML Schema to generate out of the box your whole design in terms of physical layout and/or design principles. In my mind this should be the preferred solution if you are dealing with very complex XML Schema environments. Taking your XML Schema as your single point design layout, that during the actual implementation automatically generates and builds all your needed database objects and its physical requirements, has great advantages in points of design version management etc., but...
    ...it will create automatically an XMLType table (based on OR, Binary XML of "hybrid" storage principles, aka the ones that are XML Schema driven) and not AFAIK a XMLtype column structure: so as in "our" case a table with a id column and a xmltype column.
    In principle you could relationally relate to this as:
    +"I have created an EER diagram and a Physical diagram, I mix the content/info of those two into one diagram." "Then I _+execute+_ it in the database and the end result will be an database user/schema that has all the xxxx amount of physical objects I need, the way I want it to be...".+
    ...but it will be in the form of an XMLType table structure...
    xdb:annotations can be used to create things like:
    - enforce database/company naming conventions
    - DOM validation enabled or not
    - automatic IOT or BTree index creation (for instance in OR XMLType storage)
    - sort search order enforced or not
    - default tablenames and owners
    - extra column or table property settings like for partitioning XML data
    - database encoding/mapping used for SQL and binary storage
    - avoid automatic creation of Oracle objects (tables/types/etc), for instance, via xdb:defaultTable="" annotations
    - etc...
    See here for more info: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb05sto.htm#ADXDB4519
    and / or for more detailed info:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb05sto.htm#i1030452
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb05sto.htm#i1030995
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb05sto.htm#CHDCEBAG
    ...

  • Difference between Oracle Weblogic Administration and Ofm Soa Admin

    Hi,
    what is the difference between Oracle Weblogic Administration and Oracle Fusion Soa Weblogic server Administration?
    pls help me anyone, i want to learn weblogic Administration, but having some confusions..........
    thanks,

    The below is just for your reference. Actual content may vary....
    Weblogic Administration:
    Manage a WebLogic Server installation.
    To install weblogic server in one or multiple instances
    Installing on single or multiple physical machines
    How to handle administration console, utilities, APIs, hangling security, database connection, messaging and transaction.
    How to do runtime configuration for your applications.
    How to use the monitoring tools to check the health of the servers and ensure maximum availability and performance.
    Install and Configure WebCache 11g as Load Balancer
    and Much more..
    OFM SOA Administrator:
    Manage a WebLogic Server installation (Administration Server and Managed Server).
    To install weblogic server in one or multiple instances
    Installing on single or multiple physical machines
    How to handle administration console, utilities, APIs, hangling security, database connection, messaging and transaction.
    How to do runtime configuration for your applications.
    How to use the monitoring tools to check the health of the servers and ensure maximum availability and performance.
    and
    File System and Directory Structure in Fusion Middleware
    Installing Oracle Database, Configuring RCU, weblogic server and SOA Suite.
    Deploying SOA Applications.
    Deploying and Undeploying Java EE Applications
    Configuring Node Manager and starting Managed Servers using Node Manager
    Monitoring OFM Server, admin server, managed server and composites
    Configuring HA and Security (Creating users, assigning responsibilities)
    Monitoring performance of SOA composites
    Install and Configure WebCache 11g as Load Balancer
    and much more..
    Thanks,
    Vijay

  • Problem setting up APEX 4 with WebLogic and Oracle XE

    I'm am trying to install and test Application Express 4 (latest version) on a brand new installation of Oracle WebLogic Server and Oracle XE.
    I have followed the Installation Guide for APEX and have successfully installed all tables and scripts into my Oracle XE schema and am able to connect to the Application Express Workspace login page (http://localhost:8080/apex) but am not able to log in. All styles and images are missing.
    I have followed the steps in the Application Express Listener Guide to install the Listener to my WebLogic deployments and have my i.war and apex.war files deployed but these apparently are not working. When I go to my WebLogic server and view the /apex/ListenerConfigure page I can see the page but get an HTTP 404 "Page Not Found" error and appears to be looking for the WLS's apex/apex directory.
    Note: My Oracle XE / APEX setup is on a separate server than my WebLogic server.
    Also, I see the APEX Listener file (apex-confix.xml) from the install zip file but I don't believe it is being used anywhere, as the documentation never told me what to do with it.
    Any help would be awesome. Let me know what I can provide that I haven't. Thanks!

    Thank you, I was able to use what you said as well as this information here: Installing Apex 4 on Oracle XE:  Almost there, but no cigar yet!
    Thank you for the help :)

  • Issue with extractvalue from table with XMLTYPE column.

    I'm sure there is a simple answer but I am having problems
    retrieving data from an xmltype column type.
    I have two tables
    descr dab_xmlName
    TABLE of XMLTYPE
    descr dab_testName
    A NUMBER
    AB NUMBER
    DATA CLOB
    DATA2 VARCHAR2(1600)
    MYXML XMLTYPE
    I have inserted the Oracle example XML purchaseOrder.xml into both dab_xml
    and the myxml column in dab_test.
    When I run the following:
    SELECT extractvalue(OBJECT_VALUE, '/PurchaseOrder/Reference')
    FROM dab_xml;
    SBELL-2002100912333601PDT is returned
    When I run this:
    SELECT extractvalue(OBJECT_VALUE, '/PurchaseOrder/Reference')
    FROM (select myxml from dab_test);
    ERROR at line 1:
    ORA-00904: "OBJECT_VALUE": invalid identifier
    Why are the two different?
    Any help will be appreciated.
    Regards,
    David

    In short you want
    SELECT extractvalue(myxml, '/PurchaseOrder/Reference')
    FROM dab_test;This difference is that for dab_xml, there are no columns defined for the table, therefore you are [OBJECT_VALUE|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/pseudocolumns006.htm#sthref830] as an alias for a non existent column.
    With dab_test, you have a column that contains the XML so you need to use that column name instead of OBJECT_VALUE.

  • What is default size of XMLType column?

    I have a table with 1 raw type and 1 XMLType column. In the XMLType column I am inserting following XML,
    <ocaStatus xmlns="http://xmlbeans.apache.org/ocastatus">
    <status>
    <statusCode>990</statusCode>
    <statusDateclass="sql-date">2010-01-19</statusDate>
    <userId>OcaNimsAcf</userId>
    <comment>DocumentnotinNIMS</comment>
    </status>
    <status>
    <statusCode>990</statusCode>
    <statusDateclass="sql-date">2010-01-19</statusDate>
    <userId>OcaNimsAcf</userId>
    <comment>DocumentnotinNIMS</comment>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-09-16</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-09-16</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-09-16</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-29</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-29</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-28</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-28</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-27</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-26</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-25</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-20</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-20</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-20</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>306</statusCode>
    <statusDateclass="sql-date">2008-04-21</statusDate>
    <userId>u0075970</userId>
    </status>
    <status>
    <statusCode>301</statusCode>
    <statusDateclass="sql-date">2008-02-05</statusDate>
    <userId>DMS_WORKFLOW</userId>
    <comment></comment>
    </status>
    <status>
    <statusCode>990</statusCode>
    <statusDateclass="sql-date">2010-01-17</statusDate>
    <userId>OcaNimsAcf</userId>
    <comment>Comparedfornimsacf</comment>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-09-16</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-09-16</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-09-16</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-29</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-29</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-28</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-28</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-27</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-26</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-25</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-22</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-21</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-20</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-20</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>501</statusCode>
    <statusDateclass="sql-date">2008-08-20</statusDate>
    <userId>oca_scheduled_job</userId>
    </status>
    <status>
    <statusCode>306</statusCode>
    <statusDateclass="sql-date">2008-04-21</statusDate>
    <userId>u0075970</userId>
    </status>
    <status>
    <statusCode>301</statusCode>
    <statusDateclass="sql-date">2008-02-05</statusDate>
    <userId>DMS_WORKFLOW</userId>
    <comment></comment>
    </status>
    </ocaStatus>
    The xml is very long. For inserting into the table I am using xmlparse() function to get XMLType.
    While doing this I am getting ORA-01704: string literal too long error. It says can accommodate at the most 4000 characters.
    I guess XMLType is stored as a CLOB by default.So it should allow more than 4000 characters.
    How can I store xml with more than 4000 characters.
    Thanks.

    XMLParse is a SQL function, so you can't use a string literal longer than 4000 chars.
    Instead, you may declare a PL/SQL VARCHAR2 variable, which can hold up to 32k characters, and then use the XMLType constructor :
    DECLARE
    xmlstr VARCHAR2(32767) := '<xml string here>';
    xmldoc xmltype;
    BEGIN
    xmldoc := xmltype(xmlstr);
    INSERT INTO your_table(xml_data) VALUES(xmldoc);
    END;For strings longer than 32k, you'll probably have to load it from a file.

  • Problems sorting larger sets of XMLType columns/tables

    Hi,
    Here's something I tried to wrap my head around:
    I'm using Oracle 11g r1 for Windows Server 2003.
    I've imported a fairly large set of XML files into a temporary XMLType table. Now
    I want to sort the contents of the table and put them into another table which
    uses a sequence to get primary keys (would be a longer story to explain, basically
    sorting by this non-XML primary key is super-fast as opposed to everything else
    I've tried, plus I need something unique):
    INSERT INTO realtable SELECT 0, object_value
    FROM tmptable ORDER BY extractValue(object_value, '/some/*/field');It works fine for a very small number of rows but when I tried with about 30000 rows,
    still not too much, two kinds of things can happen. Either, Oracle gobbles up a huge amount
    of memory (>1,5GB) until the statement breaks:
    ORA-04030: Zu wenig Prozessspeicher fⁿr Versuch 33292 Bytes zuzuweisen
    (callheap,kllcqgf:kllsltba)Or I get something like this:
    ORA-00600: Interner Fehlercode, Argumente: [kqludp2], [0x1F31EC94], [0], [], [], [], [], []I haven't wasted too much time looking into this. I tried storage options clob and binary xml
    for tmptable. Clob seems to induce the latter problem and binary xml the former but I haven't
    made further experiments.
    I can create a workaround from outside Oracle I think, so it's not serious however I'd would
    be interesting to know what happened or if there is a better way to do this.
    Thanks!

    Unfortunately, the problems are not reproducible in a meaningful way. All I can say is that once a statement will result in a kqludp2, it will always fail with the exactly same error message until I reinstall the database from scratch. On the other
    side, when I found a configuration that works, I could delete and rebuild/refill a table multiple times without the thing ever breaking.
    As the most recent example, after the latest trouble I deleted the database and changed my DDL scripts to the last configuration I wanted to try and broke the last time (several tables with two normal columns and an XMLType column each), everything worked like a breeze.
    I can file a TAR when I get a support ID from my employer, however I installed the database on a virtual machine (I should have mentioned that earlier) and Oracle doesn't officially support that configuration from what I know so I'll doubt they'll do anything about it. I've procured a physical computer now and try to reproduce any of the problems when I get to it.

  • Query slow in table having XMLTYPE column

    Hi,
    I've a table and a XMLTYPE column in it.
    table:
    a number
    b xmltype
    now when 1000 records are present and I do a select * form table it runs for 5-8 mins..
    if i put an index on a and do teh query using the index still it takes 5-6 secs to retrieve a single query.
    Is it normal ? I mean to say is it because of the clob it's taking time or I can tune it ?
    Thanks,
    Arun

    What sort of query are you running on it?
    As a rule, XMLTYPE and CLOB columns tend to be big. On the other hand they would normally be stored out of line, so I don't see why they should affect a full table scan.
    As is the usual case with performance questions, you must provide sufficient information for us to answer your question. Please read Rob Van Wijk's helpful guide on the sort of things we need to know (and incidentally how you can start to solve your problem yourself): [When your query takes too long|http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]. Randolf Geist has knocked up a [HOW TO: Post a SQL statement tuning request  |http://forums.oracle.com/forums/thread.jspa?threadID=863295] which is a template of the helpful way to layout a tuning question. Also, read [his blog on the topic|http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html]
    You might also benefit from reading [Tom Kyte&#146;s advice on how to ask questions|http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html].
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

Maybe you are looking for