Oracle xquery

Hello everybody
I'm a new user to oracle xquery, I really need your help
First, from where should I download it?
Second, is it different than any other xquery compilers, can we use W3 instructions?
I really would appreciate your help as I need a place to start
Thanks alot

Oracle XQuery is compliant with the W3C XQuery recommendation. It is a database-native implementation that has been available since Oracle Database 10g Release 2. You can download the database from http://www.oracle.com/technology/software/products/database/oracle10g/index.html. Once you have the software installed, a good starting point is an Oracle By Example tutorial on XQuery (http://www.oracle.com/technology/obe/10gr2_db_vmware/datamgmt/xquery/xquery.htm).
For client or mid-tier access of XQuery, you can use JDBC, ODP.NET, web service, or other APIs along with SQL/XML standard functions (i.e., XMLQuery() and XMLTable()).
Regards,
Geoff

Similar Messages

  • ORA-29540: class oracle/xquery/OXQServer does not exist

    I'm running 10g and initially had a problem when running XMTABLE that the error :-
    "identifier 'SYS.DBMS_XQUERYINT' must be declared"
    came up when I tried to execute anything relating to XQUERY
    One of our DBAs very kindly looked into this and found the script :-
    "$ORACLE_HOME/rdbms/admin/initxqry.sql"
    This was executed, but now I get the error :-
    ORA-29540: class oracle/xquery/OXQServer does not exist
    Does anyone know what I am still missing out?
    Thanks in anticipation of any advice anyone can offer

    Thanks mdrake, we seem to gradually be getting there.
    One thing I've now come across is :-
    oracle.jdbc.driver.OracleSQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBMS_LOB' must be declared
    O
    This is a "demo" trigger that caused this problem :-
    CREATE OR REPLACE TRIGGER xml_inbox_trigger AFTER INSERT ON xmlinbox
    FOR EACH ROW
    DECLARE
    XMLRECORD XMLType;
    BEGIN
    XMLRECORD := :new.XMLDATA;
    INSERT INTO all_children
    (childname) VALUES
    (extractvalue (XMLRECORD, '*/child/name'));
    IF :new.xmlfilename like 'boys%' THEN
    INSERT INTO boys
    (childname) VALUES
    (extractvalue (XMLRECORD, '*/child/name'));
    END IF;
    IF :new.xmlfilename like 'boys%' THEN
    INSERT INTO boys_wishlist SELECT
    childname , artno , description ,price FROM
    XMLTABLE (
    '*/child' passing XMLRECORD
    columns
    childname varchar2(25) path '/name'
    , artno number path '/wishlist/artno'
    , description varchar2(25) path '/wishlist/description'
    , price varchar2(10) path '/wishlist/price'
    END IF;
    IF :new.xmlfilename like 'girls%' THEN
    INSERT INTO girls
    (childname) VALUES
    (extractvalue (XMLRECORD, '*/child/name'));
    END IF;
    END;
    Do you think the above error is caused by something wrong with the above code, or something else wrong with our installation??
    Thank you so much for your continued assistance

  • ANNOUNCEMENT: Oracle XQuery Is Now in Beta

    As we are getting ready to roll out Oracle XQuery in the next production release of Oracle Database 10g, we have removed the outdated preview download from the OTN website. In the meantime, if you are interested in beta testing Oracle XQuery, please contact Geoff Lee at Oracle. To get Geoff's email address, add a period '.' between his first name and last name followed by an '@' sign before completing it with 'oracle.com'.
    For latest information on Oracle XQuery, please visit the Oracle XQuery page at http://www.oracle.com/technology/tech/xml/xquery/index.html.
    Best regards,
    Geoff

    I already owned 10 copies of MathScript as part of the NI Developer Suite.  All ten Serial Numbers were, and are now, currently on SSP.
    MathScript was taken away from me as part of the LabVIEW 2009 Upgrade.
    Everybody that owns Developer Suite and MathScript and has a current SSP has had their MathScript taken away from them as part of LavVIEW 2009 upgrade.
    They will need to repurchase MathScript again.
    Shame on you NI.  This is appalling and horrific. 

  • Using Oracle XQuery from Java Only

    Hi,
    I am interested to use the Oracle XQuery implementation to run on XML files only - no databases! Is it possible to do? Which jar file I need in JDeveloper to do that?
    Does it support the latest XQuery version?

    Our usecase is this :
    1. There would be some BPEL template files in XML with some placeholders for runtime parameters and XQuery FLWR expressions.
    2. At runtime, from Java, we would like to substitute those placeholders by runtime parameter values - would like to use the XQuery Java APIs to do that - see something similar available in Saxon XQuery parser.
    Is it possible from Java using Oracle technology?
    Thanks

  • Announcement: OTN page for Oracle XQuery Technology Preview

    There is a new OTN page for Oracle XQuery Technology preview at http://otn.oracle.com/tech/xml/xquery/index.html. Check out the page frequently for late breaking news on Oracle XQuery Technology, software downloads, tutorials, articles, white papers, and related technologies/products.
    Please also feel free to post your questions/issues/comments about Oracle XQuery Technology to this discussion forum.
    Best regards,
    Geoff

    Check your .\lib\XSQLConfig.xml file.
    This error just means that your
    <connection name="demo">
    information does not match up to
    the valid settings to connect to
    any database in your environment.

  • Oracle XQuery performance issue in XMLType column

    Dear All,
    As for oracle I'm using oracle 11g to measure the performance.
    I'm using data from XMark project which is a >100MB data of XML for bencmarking purposes.
    I make a table that contains an XMLType column and upload the data into that column, after doing that I try to do a query like this:
    select xmlquery(
    'for $i in /site/people/person
    where $i/id = "person0"
    return $i/name'
    passing BookXMLContent Returning Content)
    from Book;
    The purpose of this query is to retrieve the name of a person that have id = 'person0'
    My questions are:
    1. Did I do something wrong with my query?
    2. Is there any setting on the database that I should done prior to doing the query to done significantly better result?
    3. Is there any other approach that are much better than I currently used?
    Regards,
    Anthony Steven
    Edited by: mdrake on Nov 4, 2009 6:01 AM

    Anthony
    First, please read the licencing terms for Oracle ( And I suspect DB2, MSFT) . You are not allowed to publish externally (in any form, including forum posts :) ) the results of any benchmarking activities. I have edited your post accordingly. I hope this research is not part of a thesis or similar work that would intend making public as you and your institution would be in violation of your licence agreeement were you to do so.
    Now back to your question, how can you improve performance for XMark
    #1. Can you show us the create table statement you used, so we can see how you created your XMLType column BOOKXMLCONTENT.
    #2. Did you create any indexes
    #3. Did you look at the explain plan output.
    -Mark
    Edited by: mdrake on Nov 4, 2009 6:06 AM

  • Query Oracle 9i xmltype tables

    Hi,
    I have created a table of xmltype and loaded a large xml document of size ~47 MB.
    I wish to execute the following query on the table(OracleBench_No_Schema) using Oracle thin driver.
    select extract(value(X), '//eNest[@aSixtyFour=2]')
    from OracleBench_No_Schema X;
    can you provide me with a skeleton code for running such queries using a java program?
    thanks in advance.
    Dayal

    Hi ,
    java version 1.4.2
    I am using oracle jdbc drivers for java 1.4
    I am using the thin driver.
    This is the code that I am currently using...
    import java.util.Iterator;
    import org.w3c.dom.Node;
    import java.sql.*;
    import java.io.*;
    import oracle.xquery.*;
    import oracle.xquery.exec.*;
    import oracle.xml.parser.v2.*;
    import oracle.xdb.XMLType;
    import oracle.sql.OPAQUE;
    import oracle.xdb.XMLType;
    import oracle.jdbc.pool.OracleDataSource;
    import oracle.jdbc.OraclePreparedStatement;
    import oracle.jdbc.OracleResultSet;
    public class OracleXMLTypeQuery
    public static void main(String[]args)
    String query = "select extract(value(X), '//eNest[@aSixtyFour=2]').getClobVal() \n" +
    "from OracleBench_No_Schema X";
    try
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@138.87.169.78:1521:itkora2","dmuruku","dmuruku");
    OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement(query);
    System.out.println("Executing Query...");
    OracleResultSet orset = (OracleResultSet)stmt.executeQuery();
              System.out.println("Query Executed....");
    while(orset.next())
    oracle.sql.CLOB clob = orset.getCLOB(1);               
         Reader reader = clob.getCharacterStream();
    //----------------These set of lines when included in the program are causing protocol violation---------
    StringBuffer clobBuffer = new StringBuffer();
                   char[] buffer = new char[1024];
                   int readCount;
                        while ( (readCount = reader.read(buffer)) != -1)
                             {        clobBuffer.append(buffer, 0, readCount);    }
                   //This included...protocol violation          
    conn.close();
    catch(Exception ex)
    System.out.println(ex.toString());
    As I mentioned the lines of code between the two commenting lines when Included in the program are causing a protocol violation.
    (java.io.IOException: Protocol Violation).
    Is there any other way to read data from a Reader Object into a file or to display it on the console output?
    please advise
    Thanks
    DL

  • XQuery with recuesive function and instance of operation gives problem

    Hi,
    << Using Oracle 11g .06. release >>
    I have an Xquery that has recursive functions and "instance of" operation.
    I facing the following problem
    "error raised during evaluation: oracle.xquery.XQException: XPTY0004: It is a type error if, during the static analysis phase, an expression is found to have a static type that is not appropriate for the context in which the expression occurs, or during the dynamic evaluation phase, the dynamic type of a value does not match a required type as specified by the matching rules in 2.5.4 SequenceType Matching.
    Detail: empty sequence encountered where a sequence of length one is expected
    The same xQuery works on Berkely DB, Altova XML and Oxygen. I could able to figure out the problem in oracle, where i need an help from you people.
    The below is the XQuery Function
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    SELECT XMLQuery('xquery version "1.0";
    declare default element namespace "WiMax_CAPC_XML";(: :)
    declare namespace HHP="HHP";(: :)
    declare namespace AtomicXQuery="AtomicXQuery";(: :)
    declare function AtomicXQuery:filter-modifier($element as element(), $attribute-name as xs:string*) {
    element {node-name($element)}
    for $child in $element/node()
    return if ($child instance of element())
    then (("deepa instance"),$child,"45",name($child),$attribute-name,
    if($child/node() instance of element())
    then ("it is an instance of element")
    else($child),
    AtomicXQuery:filter-modifier($child, $attribute-name))
    else $child
    let $i:= ora:view("NECB")/node()/child::*[2]/HHP:HHP/HHP:hapNe/HHP:maxCageCount
    let $m:=element HHP:deepa {element HHP:deepa1 {"deepa1"}} return AtomicXQuery:filter-modifier($m,"modifier")'
    RETURNING CONTENT) AS RESULT
    FROM DUAL;
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    The XML data is available in XMLType table NECB.
    The XMLData is as follows
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" encoding="UTF-8"?>
    <ConfigDataFile xmlns="WiMax_CAPC_XML" xmlns:HHP="HHP" xmlns:SWM="SWM" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <fileHeader cfgMinorVersion="0" cfgSavedMinorVersion="0" cfgVersion="0" fileFormatVersion="CAPC_I1" fileName="NECB.xml" fileType="necb" senderName="CNEOMI" swVersion="D00.00.01.05" vendorName="Motorola"/>
    <configData dnPrefix="String">
    <HHP:HHP>
    <HHP:hapNe>
    <HHP:maxCageCount>3</HHP:maxCageCount>
    <HHP:minLogLevel>1</HHP:minLogLevel>
    </HHP:hapNe>
    <HHP:hapCageTable>
    <HHP:hapCageEntry cageId="1">
    <HHP:numOfModems>1</HHP:numOfModems>
    <HHP:numOfBackupModems>1</HHP:numOfBackupModems>
    <HHP:hapCagemaxModemCount>1</HHP:hapCagemaxModemCount>
    <HHP:minModemLogLevel>1</HHP:minModemLogLevel>
    <HHP:hapModemTable>
    <HHP:hapModemEntry cageId="1" modemId="1">
    <HHP:maxServiceTypeCount>1</HHP:maxServiceTypeCount>
    <HHP:hapModemLogLevel>1</HHP:hapModemLogLevel>
    <HHP:maxBlackboxCount>1</HHP:maxBlackboxCount>
    <HHP:minBlackboxLogLevel>1</HHP:minBlackboxLogLevel>
    <HHP:hapBlackboxTable>
    <HHP:hapBlackboxEntry cageId="1" modemId="1" blackboxId="1">
    <HHP:hapBlackboxLogLevel>1</HHP:hapBlackboxLogLevel>
    </HHP:hapBlackboxEntry>
    </HHP:hapBlackboxTable>
    </HHP:hapModemEntry>
    </HHP:hapModemTable>
    </HHP:hapCageEntry>
    </HHP:hapCageTable>
    <HHP:serviceTypeTable>
    <HHP:serviceTypeEntry serviceTypeId="1">
    <HHP:priority>1</HHP:priority>
    <HHP:serviceTypemaxModemCount>1</HHP:serviceTypemaxModemCount>
    </HHP:serviceTypeEntry>
    </HHP:serviceTypeTable>
    <HHP:serviceMappingTable>
    <HHP:serviceMappingEntry cageId="1" modemId="1" serviceTypeId="1">
    </HHP:serviceMappingEntry>
    </HHP:serviceMappingTable>
    </HHP:HHP>
         <SWM:SWM>
    <SWM:wmanIfBsPagingGroupTable>
    <SWM:wmanIfBsPagingGroupEntry ifIndex="1" wmanIfBsPagingGroupIndex="1">
    <SWM:wmanIfBsPagingGroupId>1</SWM:wmanIfBsPagingGroupId>
    <SWM:wmanIfBsPagingControllerId>9</SWM:wmanIfBsPagingControllerId>
    <SWM:wmanIfBsPagingCycle>100</SWM:wmanIfBsPagingCycle>
    <SWM:wmanIfBsPagingOffset>1</SWM:wmanIfBsPagingOffset>
    <SWM:wmanIfBsPagingRetryCount>3</SWM:wmanIfBsPagingRetryCount>
    <SWM:wmanIfBsPagingBcastRetryCount>3</SWM:wmanIfBsPagingBcastRetryCount>
    <SWM:wmanIfBsPagingControllerAddress>aabbccddeeffaabbccddeeffaabbccddeeffaabbccddeeffaabbccddeeffaabb</SWM:wmanIfBsPagingControllerAddress>
    <SWM:wmanIfBsPagingControllerAddressType>1</SWM:wmanIfBsPagingControllerAddressType>
    <SWM:wmanIfBsPagingControllerAsnMmId>aabbccddeeff</SWM:wmanIfBsPagingControllerAsnMmId>
    </SWM:wmanIfBsPagingGroupEntry>
    </SWM:wmanIfBsPagingGroupTable>
    <SWM:wmanIfAsnMmTable>
    <SWM:wmanIfAsnMmEntry ifIndex="1">
    <SWM:wmanIfAsnMmId>AAffFFAAAAFF</SWM:wmanIfAsnMmId>
    <SWM:wmanIfAsnMmId/>
    </SWM:wmanIfAsnMmEntry>
    </SWM:wmanIfAsnMmTable>
    <SWM:wmanIfNeighborAsnMmTable>
    <SWM:wmanIfNeighborAsnMmEntry ifIndex="1" wmanIfNbrAsnMmId="AAffFFAAAAFFFFFF">
    <SWM:wmanIfNbrAsnMmAddress>AAffFFAAAAFFFFFF</SWM:wmanIfNbrAsnMmAddress>
    <SWM:wmanIfNbrAsnMmAddressType>1</SWM:wmanIfNbrAsnMmAddressType>
    <SWM:wmanIfNbrAsnMmControlSecurityProtocol>1</SWM:wmanIfNbrAsnMmControlSecurityProtocol>
    </SWM:wmanIfNeighborAsnMmEntry>
    </SWM:wmanIfNeighborAsnMmTable>
    </SWM:SWM>
    </configData>
    <fileFooter dateTime="2007-11-07T09:30:47.0Z" update="2007-11-07T09:30:47.0Z"/>
    </ConfigDataFile>
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    The expected output XML is as follows
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <HHP:deepa xmlns="WiMax_CAPC_XML" xmlns:HHP="HHP">deepa instance<HHP:deepa1>deepa1</HHP:deepa1>45 HHP:deepa1 modifier<HHP:deepa1>deepa1</HHP:deepa1>
         <HHP:deepa1>deepa1</HHP:deepa1>
    </HHP:deepa>
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Thanks in advance!

    Ashwin,
    Please try it with 11.1.0.7 instead and let us know if it works.
    Regards,
    Geoff

  • How to transform with xquery from CDATA to XML

    Hi everyone
    I want to transform from CDATA to XML and I don´t know how to do.
    anyone can help me please?
    I'm using OSB OEPE PS3, I have artifacts: person.PROXY, person.BIZ, BIZ-Person.WSDL, PROXY-Person.WSDL, Person-response.xq and Person.xsd.
    I Use Message Flow Within Route, Routing (Request and Response Actions)
    To Request Xquery transformation is ok, for Response Action I need help. I receive a String and inside with CDATA:
    +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">+
    +<soapenv:Body>+
    +<executeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">+
    +<executeReturn xsi:type="xsd:string">+
    +*<![CDATA[<example-data rows="1"><person><id>123</id><name>JHON</name><surname>MAGNESS</surname>+*
    *+<code>123456789V</code></person></example-data>]]>+*
    +</executeReturn>+
    +</executeResponse>+
    +</soapenv:Body>+
    +</soapenv:Envelope>+
    I want to map from CDATA to XML like this (Person.xsd):
    <xs:schema xmlns="http://www.domain.com/XSD/Persons" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.domain.com/XSD/ABCD" targetNamespace="http://www.domain.com/XSD/Persons" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:import namespace="http://www.domain.com/XSD/ABCD"
    <xs:complexType name="Persons">
              <xs:sequence>++
                   <xs:element name="id" type="xs:string"/>
                   <xs:element name="surname1" type="xs:string" minOccurs="0"/>
                   <xs:element name="surname2" type="xs:string" minOccurs="0"/>
                   <xs:element name="name" type="xs:string" minOccurs="0"/>
                   <xs:element name="code" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
    Edited by: user10070593 on Aug 29, 2012 10:58 PM
    Edited by: user10070593 on Aug 29, 2012 10:58 PM
    Edited by: user10070593 on Aug 29, 2012 11:00 PM

    Hey Patrick / Vlad thank you very much for your help :)
    I have solved it like this:
    Within my proxy in Message Flow (*using Routing -- Route -- Response Action*)
    I'm using the elements Assing and Replace
    In Assing element (expression: Person-response.xq, variable: varBStoPS)
    In Replace element (xpath : executeResponse/executeReturn/text() , in Variable: body, expression:
    *$varBStoPS*)
    Now, within Person-Response.xq , I am using the parameter: *$anyType1*, but this is a string, I don´t know to use a FOR loop in Xquery, as I can apply it to the XML mapping (Person.xsd)?, Knowing I get the list:
    *+<example-data rows="1"><person><id>123</id><name>JHON</name><surname>MAGNESS</surname>+*
    *+<code>123456789V</code></person></example-data>+*
    Person.xsd:
    <xs:element name="processResponse">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="ns1:HeaderMsgABCD"/>
                        <xs:element name="bodyResponse">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="PersonsCollection">
                                            <xs:complexType>
                                                 <xs:sequence>
              <xs:element name="Persons" type="Persons" minOccurs="0" maxOccurs="unbounded"/>
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element ref="ns1:ErrorMsgABCD"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    Person-response.xq:
    xquery version "1.0" encoding "Cp1252";
    (:: pragma parameter="$anyType1" type="xs:anyType" ::)
    (:: pragma bea:global-element-return element="ns0:processResponse" location="../XSD/ Person-response.xq" ::)
    declare namespace xf = "http://tempuri.org/oracle/xquery/Person-response/";
    declare namespace ns1 = "http://www.domain.com/XSD/ABCD";
    declare namespace ns0 = " http://www.domain.com/XSD/Persons";
    declare function xf:XQ_SEARCH_PERSONS_RESPONSE($anyType1 as element(*))
    as element(ns0:processResponse) {
    <ns0:processResponse>
    <ns0:bodyResponse>
         <ns0:PersonsCollection>
    <ns0:Persons>
    <ns0:id>{ data(0) }</ns0:id>
    <ns0:surname1>{ data(0) }</ns0:surname1>
    <ns0:surname2>{ data(0) }</ns0:surname2>
    <ns0:name>{ data(0) }</ns0:name>
    <ns0:code>{ data(0) }</ns0:code>
              </ns0:Persons>
         </ns0:PersonsCollection>
    </ns0:bodyResponse>
    </ns0:processResponse>
    declare variable $anyType1 as element(*) external;
    xf:XQ_SEARCH_PERSONS_RESPONSE ($anyType1)
    Edited by: chromosoma on Aug 30, 2012 12:47 PM
    Edited by: chromosoma on Aug 30, 2012 12:50 PM
    Edited by: chromosoma on Aug 30, 2012 1:00 PM

  • How to start with XQuery

    Hello,
    I am interested in implementing Xquery. I need to have XDK to make use of Oracle XQuery prototype.
    I have windows XP at home. Is there anyway I can work on XQuery(since XDK needs windows NT). Is there any other XQuery system that works on windows XP.
    Thanks
    Mary

    Refer to
    http://www.xml.com/pub/a/2003/10/01/xquery.html

  • Java from Xquery

    I am try to call java method from Oracle XQUERY using OJXQI on middle tier
    XQueryContext ctx = new XQueryContext();
    try
    String str = "declare namespace m=\"java:java.lang.Math\"; \n"
    " let $r:=m:random() \n"
    " return $r";
    // prepare the query
    PreparedXQuery xq = ctx.prepareXQuery(strm);
    // get a resultset
    XQueryResultSet rset = xq.executeQuery();
    But I get errors that method with parameters not found.
    Is this the correct way to call java from oracle Xquery?
    Any help on that is appreciated ?

    The OJXQI API is an outdated early prototype before we released a much more scalable database-native XQuery implementation in Oralce Database 10g Release 2 last year. If your use case allows, you can use JDBC to access database-native Oracle XQuery.
    Regards,
    Geoff

  • Wrong XQuery Launch Configuration in Jdeveloper Java Edition?

    Hi,
    i want to use xquery from JDeveloper Java Edition.
    I have a simple application with one project. I added the XML, XML schema and xquery feature my simple customer.xml and customer.xq
    Then i try to run customer.xq and get " java.lang.NoClassDefFoundError: oracle/xquery/XQException"
    In the log is a classpath that points to nowhere e.g. the classpath in the log shows C:\source\oracle_common\modules\oracle.xdk_11.1.0\xquery.jar but the real file is under c:\source\jdeveloper\modules\oracle.xdk_11.1.0
    where can i set the "oracle_common" path?
    I just unzipped the downloaded zipfile jdevjava11120.zip
    thanks
    steffen
    Edited by: Steffen on 30.08.2011 11:58

    Any suggestions?
    Maybe this is a Bug in the JDeveloper Release?
    It is the Generic Release Java Edition: 11.1.2.0.0 for Windows.
    Just unzipped it and set the MW_HOME var to my directory (no spaces in path).
    I need the xquery feature and dont want to install the big studio edition.

  • Automated Testcase for XQuery

    Hi,
    I am using Oracle JDeveloper 11g Release 1.
    Can you please tell me how to write automated test cases for XQuery.
    I found one tutorial on net (http://oracamp.com/automatic-xquery-unit-tests-osb-projects-0), tried executing the same steps as mentioned with the same examples.
    But getting exceptions while trying to do so.
    I am not sure whether it is a problem with jar or something else.
    Please let me know how to proceed further.
    I am getting the following exception -
    oracle.xquery.XQException: XPTY0004: It is a type error if, during the static analysis phase, an expression is found to have a static type that is not appropriate for the context in which the expression occurs, or during the dynamic evaluation phase, the dynamic type of a value does not match a required type as specified by the matching rules in 2.5.4 SequenceType Matching.
    Detail: Encounter a type error during the static type checking phase
    oracle.xquery.exec.StaticTypingVisitor.raiseStaticTypeError(StaticTypingVisitor.java:1888)
    oracle.xquery.exec.StaticTypingVisitor.handleError(StaticTypingVisitor.java:1903)
    oracle.xquery.exec.StaticTypingVisitor.handleError(StaticTypingVisitor.java:1897)
    oracle.xquery.exec.StaticTypingVisitor.normalizeParameter(StaticTypingVisitor.java:348)
    oracle.xquery.exec.StaticTypingVisitor.visitFunctionDefn(StaticTypingVisitor.java:2615)
    oracle.xquery.func.FunctionDefn.staticTypeChecking(FunctionDefn.java:154)
    oracle.xquery.exec.QueryState.staticTypingFnDecls(QueryState.java:1022)
    oracle.xquery.PreparedXQuery.staticTyping(PreparedXQuery.java:511)
    oracle.xquery.PreparedXQuery.prepare(PreparedXQuery.java:434)
    oracle.xquery.PreparedXQuery.executeQuery(PreparedXQuery.java:544)
    oracle.xquery.PreparedXQuery.executeQuery(PreparedXQuery.java:562)
    unittest.XQUnit.runQuery(XQUnit.java:123)
    unittest.XQUnit.testXQuery(XQUnit.java:83)
    unittest.AchternaamTest.testTransformation1(AchternaamTest.java:11)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    junit.framework.TestCase.runTest(TestCase.java:168)
    junit.framework.TestCase.runBare(TestCase.java:134)
    junit.framework.TestResult$1.protect(TestResult.java:110)
    junit.framework.TestResult.runProtected(TestResult.java:128)
    junit.framework.TestResult.run(TestResult.java:113)
    junit.framework.TestCase.run(TestCase.java:124)
    junit.framework.TestSuite.runTest(TestSuite.java:243)
    junit.framework.TestSuite.run(TestSuite.java:238)
    Thanks,
    Deepthi

    Hello,
    I am still looking into this, but upon closer examination here is the situation, basically as reported.
    The test calls set_thread_count which sizes the memory. In __env_attach(), (dbenv->thr_max is used to size the region. So you are correct, the higher the value used in set_thread_count, the larger the size of the region will be. Eventually that memory will be depleted, and __env_alloc_size() returns ENOMEM, after multiple calls to system(db_stat). __env_alloc_free() is not called. This is the part I am still investigating.
    The test uses system to fork a separate processes for db_stat and the failing stack is:
    lt-db_stat: assert failure: ../dist/../env/env_failchk.c/426: "ret == 0"
    lt-db_stat: __os_stack+0x2b
    lt-db_stat: __os_abort+0x1d
    lt-db_stat: __db_assert+0x47
    lt-db_stat: __env_set_state+0x53c
    lt-db_stat: __env_attach_regions+0x38b
    lt-db_stat: __env_open+0x154
    lt-db_stat: __env_open_pp+0x334
    lt-db_stat: lt-db_stat
    So db_stat is opening an environment, attaching to its region, and then __env_set_state() calls __env_alloc(). It is __env_alloc() which fails with ENOMEM after some point when there is no more space to be allocated from the shared region. And I'm still looking into that space would be returned to the shared region.
    Thanks,
    Sandra

  • Problem running Web Service that uses OracleXMLSave on Oracle AS 10.1.3

    I am trying to deploy a Web Service that uses OracleXMLSave. The service was built in Jdeveloper 10.1.3 and is deployed to 10gR3 AS. I have all the utitlites available from the 10g Production XML Developers Kit installed . The code compiles and generates correctly . I then deploy to an EAR file that inlcudes the applicaiton code and also all the XDK libraries . No problems so far. But when I run the app, I get an exception like the one below. It says it can't find XMLType . The funny thing is that this library (xdb.jar) and all other related libraries are there in the EAR file . In fact the class loader seems to see it because the exception says that it is there (see text below).
    I have added all the libraries from XML Developer kit like xdb.jar , xsu12.jar , etc. I have also verfieid that the files are selected in the WebServices.deploy file and also present in the EAR file . (See full list below the eror message below. ).
    It looks like for some reason the class loader can't load the class even though it seems to know that the class exists in the path.
    Been sweating on this for a while (probably staring it at too long :) and would really appreciate some help.
    This is the exception thrown when the OracleXMLSave Class is called for the first time.
    Missing class: oracle.xdb.XMLType
    Dependent class: myXML.DbXMLSave
    Loader: TEAMWEBSERV.web.WebServices:0.0.0
    Code-Source: /D:/OracleAS10gR3/j2ee/TEAMWEBSERV/applications/TEAMWEBSERV/WebServices/WEB-INF/classes/
    Configuration: WEB-INF/classes/ in D:\OracleAS10gR3\j2ee\TEAMWEBSERV\applications\TEAMWEBSERV\WebServices\WEB-INF\classes
    The missing class is available from the following locations:
    1. Code-Source: /D:/OracleAS10gR3/j2ee/TEAMWEBSERV/applications/TEAMWEBSERV/WebServices/WEB-INF/lib/xdb.jar (from WEB-INF/lib/ directory in D:\OracleAS10gR3\j2ee\TEAMWEBSERV\applications\TEAMWEBSERV\WebServices\WEB-INF\lib)
    This code-source is available in loader TEAMWEBSERV.web.WebServices:0.0.0.
    2. Code-Source: /D:/OracleAS10gR3/j2ee/TEAMWEBSERV/applications/TEAMWEBSERV/WebServices/WEB-INF/classes/ (from WEB-INF/classes/ in D:\OracleAS10gR3\j2ee\TEAMWEBSERV\applications\TEAMWEBSERV\WebServices\WEB-INF\classes)
    This code-source is available in loader TEAMWEBSERV.web.WebServices:0.0.0.
    [oracle.classloader.util.AnnotatedNoClassDefFoundError]
    List of libraries :
    <list n="exportedReferences">
    <hash>
    <value n="id" v="Dms.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Log4j-1.2.9.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Mail.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="NetComponents.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oc4j.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ocrs12.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdbc14dms.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdl.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oraclexsql.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Orai18n.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="ADF Model Runtime"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="ADF Model Generic Runtime"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle XQuery"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle XML Parser v2"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle JDBC"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle SOAP"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Dms.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Log4j-1.2.9.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Mail.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="NetComponents.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oc4j.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ocrs12.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdbc14dms.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdl.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oraclexsql.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Orai18n.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xdb.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xml.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlmesg.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlparserv2.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xschema.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xsu12.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Classgen.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Jdev-rt.zip"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oraclexsql.jar2"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Transx.zip"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xdb.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xml.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlcomp.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlcomp2.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmldemo.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlmesg.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlparserv2.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xschema.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xsqlserializers.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xsu12.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Orai18n.jar2"/>
    <value n="isJDK" v="false"/>
    </hash>
    </list>

    Well I got the EJB lookup working but only when I changed the Provider Url to the pre-10.1.3 format e.g. ormi://someserver:12421/someapp and used jazn.com/oc4jadmin as the username. After reading the online documentation, I didn't think this should work!
    Another issue I am having is casting a datasource returned from a JNDI lookup for a datasource. We used to do the lookup in the code and cast to an OracleDataSource. Now it is throwing a class cast exception to ManagedDataSource. Is there a quick and easy solution to this? I really don't want to have to go into the code and change this cast so it'd be great if we can get this working without changing code. This code has been working in a prod environment for two years now on 9.0.3 -> 9.0.4...

  • Xquery API for JAVA

    Hi,
    I am trying to execute this examples: http://www.oracle.com/technology/sample_code/tech/xml/xmldb/jxqi.html , but when i dont have any jar files imported in my classpath.
    I have the following error in imports:
    import oracle.xml.parser.v2.*;
    import oracle.xquery.*;
    import oracle.xquery.exec.*;
    Where can i download the necessary jar files?
    Best regards,
    Bruno oliveira

    The Oracle databases, since 9 (and certainly 10) have an embedded Java VM in them.
    That VM supports functionality that is not available elsewhere. Certainly not available in the standard Java VM (the one created by Sun and the one that the vast majority of posts in the java forums refer to.)
    The root of your post appears at the following and looking through all of it may help.
    http://www.oracle.com/technology/sample_code/tech/xml/index.html

Maybe you are looking for

  • TS1930 How can I copy photos from my iPod to computer without using iPhoto or Image Capture? I have Windows 7..

    I was wondering, how can I transfer my photos from my iPod to my computer (not a Mac) ? I know you can do it with music because I have done before, so can you do the same with photos? In affect using the iPod as an external hard drive.. Thanks for al

  • Replacement glass

    replacement glass

  • Import template to dreamweaver

    Hey everyone, My company is looking into purchasing dreamweaver but only if it gives us the capabilities we're looking for. As of now our website is pretty uninteractive and we want to change it but keep the same template. Is it possible to import th

  • CSSImport Utility - Remove Users from Groups

    We have a security group that has a few hundred users assigned to the group. When there is a need to remove a user from the group it is difficult to find the user as I have comb through the list to find the user i am trying to remove. Two questions:

  • Error while having a accordion inside tabs

    Hi, I'm using a menu composed of tabs. In one of the tabs there is a accordion. When I go through the accordion, It wont "update" the height of the tab. I believe I should "refresh" the tab just after a action has been made in the accordion. Could so