XML Schema registration error

We installed XMLDB on Oracle Server Enterprise Edition 9.2.0.3 (AIX 4.3 version).
The status from DBA_REGISTRY for Oracle XML DB is VALID.
When trying to register schema, we get following error:
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 12
ORA-06512: at line 35
Here are the steps:
1. Connect as SYS
2. grant xdbadmin to wb_interface;
3. connect as wb_interface;
4. Try to register schema as follows
declare
doc varchar2(1000) := '<schema
targetNamespace="http://www.oracle.com/PO.xsd"
xmlns:po="http://www.oracle.com/PO.xsd"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PurchaseOrderType">
<sequence>
<element name="PONum" type="decimal"/>
<element name="Company">
<simpleType>
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
</element>
<element name="Item" maxOccurs="1000">
<complexType>
<sequence>
<element name="Part">
<simpleType>
<restriction base="string">
<maxLength value="1000"/>
</restriction>
</simpleType>
</element>
<element name="Price" type="float"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="PurchaseOrder" type="po:PurchaseOrderType"/>
</schema>';
begin
dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', doc);
end;
Please Help!!!

check if the user already has the following privileges.
CREATE SESSION
CREATE TABLE
CREATE TRIGGER
CREATE TYPE
ALTER SESSION
Else grant them.
The problem only comes when use do this in pl/sql.
here is a work around example.
create or replace function get_xml_data return varchar2 is
doc varchar2(1000) := '<schema
targetNamespace="http://www.oracle.com/PO.xsd"
xmlns:po="http://www.oracle.com/PO.xsd"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PurchaseOrderType">
<sequence>
<element name="PONum" type="decimal"/>
<element name="Company">
<simpleType>
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
</element>
<element name="Item" maxOccurs="1000">
<complexType>
<sequence>
<element name="Part">
<simpleType>
<restriction base="string">
<maxLength value="1000"/>
</restriction>
</simpleType>
</element>
<element name="Price" type="float"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="PurchaseOrder" type="po:PurchaseOrderType"/>
</schema>';
begin
return doc;
end;
exec dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', get_xml_data);
good luck.

Similar Messages

  • XML Schema validation error in network configuration. Missing DnsRef

    When ever we try to make changes to a Virtual network we receive
    XML Schema validation
    error in network configuration. Missing DnsRef
    We can't make any changes to the Virtual network.
    The DNS ref exists as well.
    Considering exporting network config and re-importing however we have a lot of networks configured and want to be sure this is the correct way to proceed.
    Any feedback much appreciated.
    Thanks

    Hi,
    We are having the same problem, so you are not alone.
    I had an extensive call with Azure premium support and we where able to determine that:
    - Nothing is missing or in the wrong place in my exported .xml file.
    - Any changes to the VNET's using the web gui interface of https://manage.windowsazure.com is not possible when you have dns servers and use an gateway
    - You can download the .xml configuration file of the network and make manual changes to it, then import it again , to add/remove dns servers and or subnet's. 
    I am currently waiting for an solution,  i have let them lower the urgency from A to B (because i can make changes trough xml) and responded to the next support contact (saying he will continue with the issue) that the problems seems to be with azure and
    he should speak with the previous person helping me.  I have not heard from Azure support since.
    SR Number:115021812414226
    Open on:02/18/2015 09:28
    > There are networks with and without gateways created and the issue is happening on all the networks.
    > We are unable to add or remove the DNS servers. (by web gui)
    > Also not able to add or remove any subnets. (by web gui)
    > Every time the error message is same but the DNS server name is different. (from another subnet then the one we are changing)
    > Created CRI- 3405931, but they said it will need WATS team.
    > Confirmed with WATS engineer as well and moving case to WATS.
    > Cx agreed to lower the severity of the case as they are able to make changes through the network configuration file.
    > But they still want to get this resolved soon.
    > Agreed and dropped off, reducing severity to B 24/7.
    I hope microsoft is going to resolve this soon, as i do not want to edit my xml for little things like adding a subnet all the time. I have requested an status update in the issue.
    Should anyone have more information on this, please share it here.

  • Adapter Engine XML Schema Validation Error Surpression

    We recently developed a number of web services that are called by 3rd parties outside our network. The web service request once made is picked up by a Web Dispatcher which then forwards the request to the de-central adapter. Both of these components reside within within a DMZ.
    We have, as an additional security measure made use of the new Adapter Engine XML Schema validation available with PI 7.1, to ensure that the payload of incomming messages is checked to ensure that it is a known structure.
    Now here is my problem, we recently had these services penetration tested by a 3rd party to ensure that they were secure and whilst the report was very good showing no major weaknesses they did pickup on a couple of items including that the fact that if the XSD to be used during payload message validation cannot be found an 'ADAPTER.JAVA_EXCEPTION' is returned to the web service consumer that highlights the path details of where the XSD should be (but could not be found).
    This was viewed as useful to an attacker for a number of reasons:
    1. Feedback in SQL injection attempts via verbatim DB error messages greatly improves attacker efficiency
    2. Path information is useful to the attacker for OS fingerprinting, directory traversal attempts
    3. Other miscellaneous stack trace information is useful to an attacker to understand how the application works
    Is there anyway this can be surpressed so that the adapter does not show this information in the returned error message - see example message below ?
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: Schema MaintenanceOrderByIDQuery_sync.xsd not found in E:\usr\sap\DPI\DVEBMGS40\j2ee\cluster\server0\validation\schema\f7cd3b50a87411e08830ed9d0af006a5\urnstw.contractor.wfm.workorderretrieval\MaintenanceOrderByIDQueryRequest_Out\httpsap.comxiSAPGlobal20~Global\MaintenanceOrderByIDQuery_sync.xsd  (validation\schema)
         at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1041)
         at sun.reflect.GeneratedMethodAccessor497.invoke(Unknown Source)
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: Schema Schema1.xsd not found in E:\usr\sap\DPI\DVEBMGS40\j2ee\cluster\server0\validation\schema\f7cd3b50a87411e08830ed9d0af006a5\urnstw.contractor.wfm.workorderretrieval\MaintenanceOrderByIDQueryRequest_Out\httpsap.comxiEA-APPLSEGlobal\Schema1.xsd  (validation\schema)
         at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1041)

    Hi,
    We are having the same problem, so you are not alone.
    I had an extensive call with Azure premium support and we where able to determine that:
    - Nothing is missing or in the wrong place in my exported .xml file.
    - Any changes to the VNET's using the web gui interface of https://manage.windowsazure.com is not possible when you have dns servers and use an gateway
    - You can download the .xml configuration file of the network and make manual changes to it, then import it again , to add/remove dns servers and or subnet's. 
    I am currently waiting for an solution,  i have let them lower the urgency from A to B (because i can make changes trough xml) and responded to the next support contact (saying he will continue with the issue) that the problems seems to be with azure and
    he should speak with the previous person helping me.  I have not heard from Azure support since.
    SR Number:115021812414226
    Open on:02/18/2015 09:28
    > There are networks with and without gateways created and the issue is happening on all the networks.
    > We are unable to add or remove the DNS servers. (by web gui)
    > Also not able to add or remove any subnets. (by web gui)
    > Every time the error message is same but the DNS server name is different. (from another subnet then the one we are changing)
    > Created CRI- 3405931, but they said it will need WATS team.
    > Confirmed with WATS engineer as well and moving case to WATS.
    > Cx agreed to lower the severity of the case as they are able to make changes through the network configuration file.
    > But they still want to get this resolved soon.
    > Agreed and dropped off, reducing severity to B 24/7.
    I hope microsoft is going to resolve this soon, as i do not want to edit my xml for little things like adding a subnet all the time. I have requested an status update in the issue.
    Should anyone have more information on this, please share it here.

  • XML Schema validation Error

    Hi,
    Have a scenerio in which consecutive mapping needs to be done.The first mapping is a Java Mapping in which XML schema validation needs to be done.
    If XML Schema validation is sucessful(Mapping 1),then graphical message mapping(MM_Entry) needs to be performed.
    I have uploded a jar file in imported Archives which contains
    1)Schema file(inputSchema.xsd): This is an XSD file which is generated in XI....XSD fomat of Source message type
    2) The java Class file
    Following are few lines of code for better idea:
    public class SAXParser implements StreamTransformation {
    public void execute(InputStream input, OutputStream output) throws StreamTransformationException {
    SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
    InputStream mySchema = this.getClass().getClassLoader().getResourceAsStream("inputSchema.xsd");
    SAXParser saxParser = saxParserFactory.newSAXParser();
    saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
    saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",mySchema);
    saxParser.parse(input, new HandlerBase());
    After above step(parsing),input is copied to output and streams are closed as follows:
    byte[] buf = new byte[4096];
    for(int len=-1;(len=input.read(buf))!=-1;)
    output.write(buf,0,len);
    input.close();
    output.close();
    After sending correct source message from input ,i am getting following error:
    Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_Entry_: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Parsing an empty source. Root element expected!

    Daniel,
    As I've said, I've used it successfully in PI 7.0 SP10.
    You're right about documentation, it says that by default, Java 1.4.2 mark() and reset() methods of InputStream class are not fully implemented (mark() would do nothing and reset() would always throw an IOException). And that would be the expected behavior...
    ...unless the SAP developers have extended the InputStream class to include actual implementatios to the mark() and reset() methods.
    I'm not saying that they have, but it would be possible, wouldn't it?
    It does work, after all...
    Regards,
    Henrique.

  • XML Schema mapping error when generating web service

    I have created a method in java that returns an array of an object type (a user defined class). When tried to generate a web service JDeveloper did not allow me to select the method, giving the following "Why not.." explanation: "One or more parameters did not have an XML Schema mapping and/or serializer specified".
    Can anyone help me in this?
    Thanks
    Alina

    Thanks Mike for your advice it did work when I changed the setters and getters names, and managed to create a web service with Apache Soap profile. I created the client stub and client application to run the web service but it keep coming with soap-env error messages.
    Error message I get when running the client side:
    F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatClient\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatclientpackage.OrbatListArrayClient
    [SOAPException: faultCode=SOAP-ENV:Server.BadTargetObjectURI; msg=Unable to resolve target object(orbatlistarraypackage.OrbatListArray): orbatlistarraypackage.OrbatListArray [java.lang.ClassNotFoundException]]     orbatlistarraypackage.OrbatType[] orbatclientpackage.OrbatListArrayStub.getOrbatListArray()          OrbatListArrayStub.java:63     void orbatclientpackage.OrbatListArrayClient.main(java.lang.String[])          OrbatListArrayClient.java:19Exception in thread main
    Process exited with exit code 1.
    My wsdl file is:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
    <!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
    <definitions
    name="OrbatListArray"
    targetNamespace="http://orbatlistarraypackage/OrbatListArray.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://orbatlistarraypackage/OrbatListArray.wsdl"
    xmlns:ns1="http://orbatlistarraypackage/IOrbatListArray.xsd">
    <types>
    <schema
    targetNamespace="http://orbatlistarraypackage/IOrbatListArray.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <complexType name="ArrayOfOrbatType" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <complexContent>
    <restriction base="SOAP-ENC:Array">
    <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:orbatlistarraypackage_OrbatType[]"/>
    </restriction>
    </complexContent>
    </complexType>
    <complexType name="orbatlistarraypackage_OrbatType" jdev:packageName="orbatlistarraypackage" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    <all>
    <element name="OrbatName" type="string"/>
    <element name="OrbatID" type="int"/>
    </all>
    </complexType>
    </schema>
    </types>
    <message name="getOrbatListArray0Request"/>
    <message name="getOrbatListArray0Response">
    <part name="return" type="ns1:ArrayOfOrbatType"/>
    </message>
    <portType name="OrbatListArrayPortType">
    <operation name="getOrbatListArray">
    <input name="getOrbatListArray0Request" message="tns:getOrbatListArray0Request"/>
    <output name="getOrbatListArray0Response" message="tns:getOrbatListArray0Response"/>
    </operation>
    </portType>
    <binding name="OrbatListArrayBinding" type="tns:OrbatListArrayPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="getOrbatListArray">
    <soap:operation soapAction="" style="rpc"/>
    <input name="getOrbatListArray0Request">
    <soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output name="getOrbatListArray0Response">
    <soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    </operation>
    </binding>
    <service name="OrbatListArray">
    <port name="OrbatListArrayPort" binding="tns:OrbatListArrayBinding">
    <soap:address location="http://192.9.200.200:8888/soap/servlet/soaprouter"/>
    </port>
    </service>
    </definitions>
    My OrbatListArrayDescriptor.dd file:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services Deployment Descriptor Generator-->
    <!--This Deployment Descriptor file is for use with the Oracle9iAS Release 2 / Apache 2.2 SOAP Server SOAP Server-->
    <!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
    <isd:service
    id="orbatlistarraypackage.OrbatListArray"
    xmlns:isd="http://xml.apache.org/xml-soap/deployment">
    <isd:provider
    type="java"
    methods="getOrbatListArray"
    scope="Request">
    <isd:java class="orbatlistarraypackage.OrbatListArray" static="false"/>
    </isd:provider>
    <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
    </isd:service>
    My Client Web Service Stub class file:
    package orbatclientpackage;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.util.xml.QName;
    import java.net.URL;
    import org.apache.soap.Constants;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.Response;
    import java.util.Vector;
    import orbatlistarraypackage.OrbatType;
    import java.util.Properties;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Wed Oct 23 11:19:42 BST 2002
    * WSDL URL: file:/F:/JDev9i-0-3/jdev/mywork/OrbatListArray/OrbatListArrayProject/src/orbatlistarraypackage/OrbatListArray.wsdl
    public class OrbatListArrayStub
    public OrbatListArrayStub()
    m_httpConnection = new OracleSOAPHTTPConnection();
    m_smr = new SOAPMappingRegistry();
    BeanSerializer beanSer = new BeanSerializer();
    m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://orbatlistarraypackage/IOrbatListArray.xsd", "orbatlistarraypackage_OrbatType"), orbatlistarraypackage.OrbatType.class, beanSer, beanSer);
    public String endpoint = "http://192.9.200.200:8888/soap/servlet/soaprouter";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_smr = null;
    public OrbatType[] getOrbatListArray() throws Exception
    OrbatType[] returnVal = null;
    URL endpointURL = new URL(endpoint);
    Call call = new Call();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("orbatlistarraypackage.OrbatListArray");
    call.setMethodName("getOrbatListArray");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    Vector params = new Vector();
    call.setParams(params);
    call.setSOAPMappingRegistry(m_smr);
    Response response = call.invoke(endpointURL, "");
    if (!response.generatedFault())
    Parameter result = response.getReturnValue();
    returnVal = (OrbatType[])result.getValue();
    else
    Fault fault = response.getFault();
    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    return returnVal;
    public void setMaintainSession(boolean maintainSession)
    m_httpConnection.setMaintainSession(maintainSession);
    public boolean getMaintainSession()
    return m_httpConnection.getMaintainSession();
    public void setTransportProperties(Properties props)
    m_httpConnection.setProperties(props);
    public Properties getTransportProperties()
    return m_httpConnection.getProperties();
    My Client application main file:
    package orbatclientpackage;
    import java.io.*;
    public class OrbatListArrayClient
    public OrbatListArrayClient()
    public static void main(String[] args) throws Exception
    OrbatListArrayStub s = new OrbatListArrayStub();
    // File xmlFile;
    // BufferedWriter in;
    // xmlFile = new File("f:\\OrbatSoap", "OrbatXMLList.xml");
    // PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(xmlFile)));
    // out.println(s.getOrbatListArray());
    // out.flush();
    System.out.println(s.getOrbatListArray());
    When I deployed it to jar I copied the jar file in the following directory:
    <jdevloper home>\soap\webapps\soap\soap\Web-inf\lib\
    I then tried and created a client stub in the same package using JDeveloper 9.0.3 wizard for creating sample java client and added a line to call my getOrbatListArray method and print it to the screen. I get another soap error message, saying:
    F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatListArrayProject\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdbc\lib\classes12.jar;F:\JDev9i-0-3\jdbc\lib\nls_charset12.jar;F:\JDev9i-0-3\rdbms\jlib\xsu12.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\lib\xmlcomp.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatlistarraypackage.EmbeddedOrbatListArrayStub
    [SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused: connect; targetException=java.net.ConnectException: Connection refused: connect]     void org.apache.soap.SOAPException.<init>(java.lang.String, java.lang.String, java.lang.Throwable)          SOAPException.java:77     void oracle.soap.transport.http.OracleSOAPHTTPConnection.send(java.net.URL, java.lang.String, java.util.Hashtable, org.apache.soap.Envelope, org.apache.soap.encoding.SOAPMappingRegistry, org.apache.soap.rpc.SOAPContext)          OracleSOAPHTTPConnection.java:765     org.apache.soap.rpc.Response org.apache.soap.rpc.Call.invoke(java.net.URL, java.lang.String)          Call.java:253     orbatlistarraypackage.OrbatType1[] orbatlistarraypackage.EmbeddedOrbatListArrayStub.getOrbatListArray()          EmbeddedOrbatListArrayStub.java:70     void orbatlistarraypackage.EmbeddedOrbatListArrayStub.main(java.lang.String[])          EmbeddedOrbatListArrayStub.java:38Process exited with exit code 0.
    Sorry for the length of this message, but I am getting desparate.
    Thanks again for all you help
    Alina

  • "Source file does not conform to XML Schema!" error at Import Server

    Dear SDN,
    When I run Import Server the import job stopped with the error "Source file does not conform to XML Schema!" in Log file. I used MDM SP05 Patch01 and HF1.
    Both of 2 Import Server have same problems. Of course it works in Import Manager.
    What do I have to check?
    Regards,
    Eric

    Hi Eric
    Just confirm this...
    One needs to load XML schema file in MDM and can be done by specifying this file in Port .
    Refer this link.
    http://help.sap.com/saphelp_mdm550/helpdata/en/fa/69b20ae0ae4b158a3f6d025b3d3847/content.htm
    Just make sure that corresponding XSD file is specified in the port
    Regards

  • Very Urgent .Xml Schema throwing error

    XML Schema
    Following function is throwing Message : [ORACLE ERROR : [ORA-31085: schema "XDh1jUheYAR5PgNAgAILJCxg==" already registered error
    ROCEDURE validateXmlSchema(inp_xmlMsg IN VARCHAR2,
    out_isValidDoc IN OUT NUMBER,
    inp_xmlSchema IN OUT VARCHAR2,
    inp_xmlUrl IN OUT VARCHAR2)IS
    xmldoc XMLType;
    res number;
    -- result boolean;
    BEGIN
    dbms_xmlSchema.deleteSchema(inp_xmlSchema,4);
    xmldoc := XMLtype(inp_xmlMsg);
    res := xmldoc.isSchemaValid(inp_xmlSchema);
    IF (xmldoc.isSchemaValid = 1) THEN
    out_isValidDoc := 1;
    ELSE
    out_isValidDoc := 0;
    END IF;
    END validateXmlSchema;
    Why is the delete schema throwing that error?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    My dear friend stop using this word - Urgent.Isn't it txt spk for You are a gentleman?

  • XML SCHEMA registration for XML TYPE (storing XML files in Oracle 10g)

    I have created the XML Schema for the XML file stored in Oracle 10g and also added this Schema into the database. I have related that schema with the column in the table which contains the XML file. When i execute the query to fetch the data from the stored file i am getting a blank resultset. Is registering the XML Schema is necessary, if yes then please let me know the process of doing it. I have tried following steps to register Schema, but it is not working
    Step1:
    DECLARE
    v_return BOOLEAN;
    BEGIN
    v_return := dbms_xdb.createFolder('/home/');
    v_return := dbms_xdb.createFolder('/home/DEV/');
    v_return := dbms_xdb.createFolder('/home/DEV/xsd/');
    v_return := dbms_xdb.createFolder('/home/DEV/messages/');
    v_return := dbms_xdb.createFolder('/home/DEV/employees/');
    COMMIT;
    END;
    STEP 2:
    Connecting To XML DB
    Step3:
    Register XML schema
    I am failing to execute step number 2 and hence not able to register the schema also.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by sudeepk:
    If a java exception is thrown probably during ur install u might have forgotten
    grant javauserpriv to scott;
    grant javasyspriv to scott;
    Thanks
    [email protected]
    <HR></BLOCKQUOTE>
    Thank you!!!

  • XML schema Registration ??

    Hello,
    Our environment is
    SQL*Plus: Release 9.2.0.4.0
    Oracle9i Enterprise Edition Release 9.2.0.4.0
    OS Windows 2000
    We registered XML schema in XML DB.
    oraxdb:schemaURL="PORR_MT030001Fatalities"
    <xsd:element name="BiologicsSafetyCase" type="PORR_MT030001.BiologicsSafetyCase" oraxdb:propNumber="271050" oraxdb:global="true" oraxdb:SQLName="BiologicsSafetyCase" oraxdb:SQLType="PORR_MT030001.Biologics1829_T" oraxdb:SQLSchema="HL7_KSMITH" oraxdb:memType="258" oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" oraxdb:defaultTableSchema="HL7_KSMITH"/>
    When we query user_xml_tables. It shows following.
    SELECT "SYS"."USER_XML_TABLES"."TABLE_NAME" as "TABLE_NAME",
    "SYS"."USER_XML_TABLES"."XMLSCHEMA" as "XMLSCHEMA",
    "SYS"."USER_XML_TABLES"."ELEMENT_NAME" as "ELEMENT_NAME"
    FROM "SYS"."USER_XML_TABLES"
    WHERE ( "XMLSCHEMA" LIKE '%Fata%')
    TABLE_NAME XMLSCHEMA ELEMENT_NAME
    support1807_TAB PORR_MT030001Fatalities support
    BiologicsSafetyCase1840_TAB PORR_MT030001Fatalities BiologicsSafetyCase
    XXIfTRALI681800_TAB PORR_MT030001Fatalities XXIfTRALI68
    location1587_TAB PORR_MT030001Fatalities location
    XXEventDescription81799_TAB PORR_MT030001Fatalities XXEventDescription8
    manufacturingProcess1793_TAB PORR_MT030001Fatalities manufacturingProcess
    partOrganization1611_TAB PORR_MT030001Fatalities partOrganization
    organization1616_TAB PORR_MT030001Fatalities organization
    locatedPlace1583_TAB PORR_MT030001Fatalities locatedPlace
    causedRecipientReacti1798_TAB PORR_MT030001Fatalities causedRecipientReaction
    It shows additional O-R tables against different elements.
    Is it normal?
    How does these tables links with main table oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" shows in registered schema header?
    Do we able to segment this schema ?
    Let me know your thought.
    Thanks in advance.
    Ram

    Hello,
    Our environment is
    SQL*Plus: Release 9.2.0.4.0
    Oracle9i Enterprise Edition Release 9.2.0.4.0
    OS Windows 2000
    We registered XML schema in XML DB.
    oraxdb:schemaURL="PORR_MT030001Fatalities"
    <xsd:element name="BiologicsSafetyCase" type="PORR_MT030001.BiologicsSafetyCase" oraxdb:propNumber="271050" oraxdb:global="true" oraxdb:SQLName="BiologicsSafetyCase" oraxdb:SQLType="PORR_MT030001.Biologics1829_T" oraxdb:SQLSchema="HL7_KSMITH" oraxdb:memType="258" oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" oraxdb:defaultTableSchema="HL7_KSMITH"/>
    When we query user_xml_tables. It shows following.
    SELECT "SYS"."USER_XML_TABLES"."TABLE_NAME" as "TABLE_NAME",
    "SYS"."USER_XML_TABLES"."XMLSCHEMA" as "XMLSCHEMA",
    "SYS"."USER_XML_TABLES"."ELEMENT_NAME" as "ELEMENT_NAME"
    FROM "SYS"."USER_XML_TABLES"
    WHERE ( "XMLSCHEMA" LIKE '%Fata%')
    TABLE_NAME XMLSCHEMA ELEMENT_NAME
    support1807_TAB PORR_MT030001Fatalities support
    BiologicsSafetyCase1840_TAB PORR_MT030001Fatalities BiologicsSafetyCase
    XXIfTRALI681800_TAB PORR_MT030001Fatalities XXIfTRALI68
    location1587_TAB PORR_MT030001Fatalities location
    XXEventDescription81799_TAB PORR_MT030001Fatalities XXEventDescription8
    manufacturingProcess1793_TAB PORR_MT030001Fatalities manufacturingProcess
    partOrganization1611_TAB PORR_MT030001Fatalities partOrganization
    organization1616_TAB PORR_MT030001Fatalities organization
    locatedPlace1583_TAB PORR_MT030001Fatalities locatedPlace
    causedRecipientReacti1798_TAB PORR_MT030001Fatalities causedRecipientReaction
    It shows additional O-R tables against different elements.
    Is it normal?
    How does these tables links with main table oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" shows in registered schema header?
    Do we able to segment this schema ?
    Let me know your thought.
    Thanks in advance.
    Ram

  • Oracle Xml Schema Registration problem.

    Hi Gurus,
    I tried to register a schema using an xsd named 'EntityBase.xsd', using the following block. It got registered successfully.
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://xmlns.oracle.com/xdb/EntityBase.xsd',
    SCHEMADOC => bfilename('XMLDIR','EntityBase.xsd'),
    LOCAL => FALSE,
    CSID => nls_charset_id('AL32UTF8'));
    END;
    select local,schema_url,int_objname,qual_schema_url from dba_xml_schemas where schema_url like
    '%http://xmlns.oracle.com/xdb/EntityBase.xsd%';
    This gives me a record.
    Now I have another xsd, VersionedEntity.xsd with which I would like to register another schema. In the xsd definition for VersionedEntity.xsd, it has Entity.xsd being used and which is already registered and the .xsd exists in the same directory 'XMLDIR'. But when I register using the following block,
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://xmlns.oracle.com/xdb/VersionedEntity.xsd',
    SCHEMADOC => bfilename('XMLDIR','VersionedEntity.xsd'),
    CSID => nls_charset_id('AL32UTF8'));
    END;
    I get
    ORA-31000: Resource 'EntityBase.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 2
    Please help me with your expert advice. Am I doing something wrong?
    Thanks and Regards,

    There is a forum dedicated to XML...
    XML DB

  • Not simple xml schema registration

    How can i register schema from xsd file that contain includes of other xsd files, like "<xs:include schemaLocation="common/dataTypes.xsd"/>".

    How can i register schema from xsd file that contain includes of other xsd files, like "<xs:include schemaLocation="common/dataTypes.xsd"/>".

  • Exp XML Schema (.xsd) to another schema on same instance

    Hello,
    I hope someone on this forum can help me or point me in the correct direction. I want to export a schema which contains a table (EQUIPMENT) which has a XMLType column defined against a registered .xsd. I would then like to restored this schema to another schema on the same instance (development instance) and also onto another db instance.
    I have been trying to do this with the help of "Chapter 30 Importing and Exporting XMLType Tables" from the Oracle® XML DB Developer's Guide
    10g Release 2 (10.2). Unfortunately without success. At the end of this message I have encluded sample error messages that I am receiving for creation of TYPES which is causing my import to fail.
    I cannot find any examples on the web on how to achieve an exp from one schema and imp in another either on the same instance or another one.
    DDL for my table is :
    create table EQUIPMENT
    ID number(7) not null,
    STATUSID number(7) not null,
    ATTRIBUTEDATA xmltype
    xmltype column ATTRIBUTEDATA xmlschema "EQUIPMENT.xsd" element EQUIPMENT_XML
    tablespace TBS_DATA1;
    Three test runs as follows:
    1. Using an empty u2 schema and I register the .xsd file. Then I try to import (FROMUSER - TOUSER imp mode) my dump file which leads to the following error:
    IMP-00017: following statement failed with ORACLE error 2304:
    "CREATE TYPE "MTA1440_T" TIMESTAMP '2007-11-14:14:42:16' OID '3EE57B10307317"
    "74E044080020C94102' AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T",""
    "ATTRIBUTE_01" NUMBER(38),"ATTRIBUTE_02" VARCHAR2(4000 CHAR),"ATTRIBUTE_03" "
    "VARCHAR2(4000 CHAR),"ATTRIBUTE_04" NUMBER(38),"ATTRIBUTE_05" VARCHAR2(4000 "
    "CHAR))FINAL INSTANTIABLE "
    IMP-00003: ORACLE error 2304 encountered
    NOTE: Even though import failed, I now see a new TYPE created called "MTA1526_T".
    2. If I try to create the TYPE as is from the error above I get the following error:
    SQL> CREATE TYPE MTA1440_T
    2 OID '3EE57B1030731774E044080020C94102'
    3 AS OBJECT (SYS_XDBPD$ XDB.XDB$RAW_LIST_T,
    4 ATTRIBUTE_01 NUMBER(38),
    5 ATTRIBUTE_02 VARCHAR2(4000 CHAR),
    6 ATTRIBUTE_03 VARCHAR2(4000 CHAR),
    7 ATTRIBUTE_04 NUMBER(38),
    8 ATTRIBUTE_05 VARCHAR2(4000 CHAR)) FINAL INSTANTIABLE;
    9 /
    CREATE TYPE MTA1440_T
    ERROR at line 1:
    ORA-02304: invalid object identifier literal
    3. So now I create the "MTA1440_T" type without the OID value and retry the import.
    IMP-00061: Warning: Object type "U2"."MTA1440_T" already exists with a different identifier
    "CREATE TYPE "MTA1440_T" TIMESTAMP '2007-11-14:14:42:16' OID '3EE57B10307317"
    "74E044080020C94102' AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T",""
    "ATTRIBUTE_01" NUMBER(38),"ATTRIBUTE_02" VARCHAR2(4000 CHAR),"ATTRIBUTE_03" "
    "VARCHAR2(4000 CHAR),"ATTRIBUTE_04" NUMBER(38),"ATTRIBUTE_05" VARCHAR2(4000 "
    "CHAR))FINAL INSTANTIABLE "
    Questions from me:
    A. Can I export TYPES only as suggested by the online documentation ?
    B. If importing onto same instance in another schema surely the OID for the TYPE will always fail - so then why can the import not create the required TYPE name itself during the import ?
    C. Should I use global TYPES and Register the .XSD globally for all schema's in an instance to validate against .. would this prevent me from having errors on an import ?
    I would appreciate any insight any one could provide me. Many thanks in advance.
    Dom

    Hi Guys,
    Thank you all for the replies. I am dissappointed to hear that in 10g does not support exp/imp of schema's structured XML. However I am a little confused or should I say mislead by the "" documentation I
    Here is an extract from chapter "30 - Importing and Exporting XMLType Tables" from the Oracle XML DB 10g Developers Guide documentation:
    "..... Oracle Database supports the import and export of XML schema-based XMLType tables. An XMLType table depends on the XML schema used to define it. Similarly the XML schema has dependencies on the SQL object types created or specified for it. Thus, exporting a user with XML schema-based XMLType tables, consists of the following steps:
    1. Exporting SQL Types During XML Schema Registration. As a part of the XML
    schema registration process .....
    2. Exporting XML Schemas. After all the types are exported, XML schemas are
    exported as XML text .....
    3. Exporting XML Tables. The next step is to export the tables. Export of each table consists of two steps:
    A. The table definition is exported as a part of the CREATE TABLE statement....
    B. The data in the table is exported as XML text. Note that data for out-of-line
    tables is.....
    From this documentation I was under the impression that the exp/imp of XML Schema-Based XMLType Tables was supported.
    Regarding the backup mechanism/strategy for database schema's containing tables with Schema-Based XMLTypes what would you recommend the best online backup method to use - tablespace backups ?
    What I need to be able to do in day-to-day work is to have the ability to be able to take a copy of a customers UAT or production database schema and apply it to a dev or test db instance here for bug testing etc. Do you have any advice on best to achieve this without the use of an exp/imp when the schema will contain Schema-Based XMLType tables.
    Thank you all for your assistance so far.

  • Invalid or no XML schema in XML Forms Builder

    Hi all
    Could anyone help me with this?
    When I try to preview an Forms example in XML Forms builder I've got the following error:
    "Messages or errors reported while building the project Invalid or no XML schema information Error was: Invalid or no XML schema information "
    Running EP6 SP2, JRE 1.4.2_05, IE 6.0
    Thanks in advance
    Mikael Lofberg

    Hi Mikael,
    If you have not already try saving and rebuilding the project? When you rebuild do you get errors in the project check tab?
    If so this should point to the cause of the problem.
    Regards
    Daniel

  • Xml schema egistration

    i am new to xml . i using oracle 11g.while reading xml i came to know that xml schema registration.
    is it compulsary to work with xml data.what is the advantages of xml schema registration. with out registration also i am able to create xmltype tables and i am able to fetch data from tables. then what is the purpose of schema registration
    schema registration means what happening exactly.

    Schema Registration typically leads to better performance. With Binary XML / XML Index the differences are not critical for most applications. It also allows for better datatyping and compression, since if we tags and datatypes in advance we do do a more efficient encoding. For certain classes of applicaiton, where the object relational storage model is appropraite schema registration can lead to significantly better performance. See the XML DB basic demo for more info and the Hands on Lab for info related to Binary XML and XML Index

  • Error while registring xml schema

    Hi,
    I am trying to register following xml schema,
    BEGIN
    dbms_xmlschema.registerSchema(
    'ocastatus.xsd',
    '<?xml version="1.0"?>
    <xsd:schema
    targetNamespace="http://xmlbeans.apache.org/ocastatus"
    xmlns="http://xmlbeans.apache.org/ocastatus"
    elementFormDefault="qualified"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb">
    <xsd:element name="ocaStatus" type="OCASTATUS_TYPEType"/>
    <xsd:complexType name="OCASTATUS_TYPEType" xdb:SQLType="OCASTATUS_TYPE">
    <xsd:sequence>
    <xsd:element name="status" type="STATUS_TYPEType" xdb:SQLName="status" maxOccurs="unbounded" xdb:SQLCollType="STATUS_V"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="STATUS_TYPEType" xdb:SQLType="STATUS_TYPE">
    <xsd:sequence>
    <xsd:element name="statusCode" type="xsd:double" xdb:SQLName="statusCode" xdb:SQLType="NUMBER"/>
    <xsd:element name="statusDate" xdb:SQLName="statusDate" xdb:SQLType="VARCHAR2">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="50"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="userId" xdb:SQLName="userId" xdb:SQLType="VARCHAR2">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="50"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="comment" xdb:SQLName="comment" xdb:SQLType="VARCHAR2">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="100"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>',
    true,
    true,
    false);
    END;
    While doing so, I am getting following error,
    ORA-20001: enable_hierarchy_internal
    ORA-06512: at "XDB.DBMS_XDBZ", line 28
    ORA-06512: at line 1
    ORA-06512: at "XDB.DBMA_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMA_XMLSCHEMA", line 14
    ORA-06512: at line 2
    Vendor code 20001 Error at line: 1
    I have no clue about this errors. I don't know if it is linked to user privileges.
    The user I am using has following privileges,
    CREATE SESSION
    CREATE TABLE
    CREATE CLUSTER
    CREATE SEQUENCE
    CREATE PROCEDURE
    CREATE TRIGGER
    CREATE TYPE
    CREATE OPERATOR
    CREATE INDEXTYPE
    Please help.
    Thanks in advance.

    I would need the full database version (all digits) to be able to answer it, so could you please provide this.
    The other, strange thing, in this example that you gave is the ORA-20001 error... This is not (afaik) an Oracle thrown error but a user defined error as shown, for example, in this post http://www.dbmotive.com/oracle_error_codes.php?errcode=20001.
    As it is, IMHO, correctly stated in that post:
    Error messages starting from -20000 until -20999 are user specified error messages.
    Oracle provides these range of codes so applications can raise an application specific error, which will be displayed after the chosen code.
    This is done using the raise_application_error pl/sql function.
    You'll have to contact the application provider should you want to have more detail about the error message.
    Unless the error message is of an Oracle application or functionality, it is useless to contact Oracle for these errors.

Maybe you are looking for

  • HT1918 Can I have multiple payment methods on one account

    Currently, both of my teenage sons and I are sharing an Apple account with one payment method. I would like to have a payment method for each of us.

  • Iphone remote doesn't work with itunes anymore.

    I've replaced my wireless router in the last week, but I think remote still worked after that. I don't know what is going on.  Firewall is turned off, bonjour is running (I can see the homesharing from another computer)  But iphone remote doesn't fin

  • Spry Error After 2013 Update

    This message is popping up on our company website after I updated the software. MuseJSAssert:  Error calling selector function: reference Error:  Spry is not defined.  When I check the validator.w3.org it is saying that the errors are being cause fro

  • Calling oracle function from Access passthrough query does not return list

    Thanks to the help I received in an earlier post I've created an oracle 10g function that returns a list after executing the sql it contains. It works in oracle, using sql developer. I need to have the list that it returns show up in MS Access via a

  • Getting exception in reading .xlsm and .xlsx using POI

    I m trying to read .xls,.xlsm and .xlsx sheet. Code works properly if tried to read .xls sheet but shows exception if tried to read .xlsm and .xlsx sheet. I have configured necessary jars file in my classpath- poi-3.8-20120326.jar, poi-examples-3.8-2