Element is not declared error both in BizTalk 2013 and AX 2012 R2

Hi:
We continue getting “element is not declared” in BizTalk and AX.
Appreciate any help and hints.
Regards, Toraj
Background:
We have BizTalk 2013 and AX2012 R2.
From BizTalk Suspended Job
System.ServiceModel.FaultException: <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action
s:mustUnderstand="1">http://schemas.microsoft.com/dynamics/2008/01/services/PurchaseInvoiceService/createAifFaultFault</a:Action><a:RelatesTo>urn:uuid:ddd18935-18a7-415d-bbbf-38e4b9a08bf7</a:RelatesTo><a:To s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/anonymous</a:To></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value></s:Code><s:Reason>
<s:Text xml:lang="en-US">Invalid document schema. The following error was returned: 
The 'http://schemas.microsoft.com/dynamics/2008/01/documents/PurchaseInvoice:LedgerJournalTable' element is not declared.</s:Text>
</s:Reason><s:Detail><AifFault xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><CustomDetailXml i:nil="true"></CustomDetailXml><FaultMessageListArray i:nil="true"></FaultMessageListArray><InfologMessageList
From AX Exception Log
The 'http://schemas.microsoft.com/dynamics/2008/01/documents/PurchaseInvoice:LedgerJournalTable' element is not declared.
The BizTalk WCF-NetTcp > Configuration > Action as follows. Which matches the published WSDL
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="create" Action="http://schemas.microsoft.com/dynamics/2008/01/services/PurchaseInvoiceService/create" />
</BtsActionMapping>
The following is the XML from BizTalk to AX. I deleted some of the data to shorten the xml.
<ns1:PurchaseInvoice xmlns:ns1="http://schemas.microsoft.com/dynamics/2008/01/documents/PurchaseInvoice" xmlns:ns0="http://schemas.microsoft.com/dynamics/2008/01/sharedtypes">
<ns1:LedgerJournalTable action="create">
<ns1:_DocumentHash>45f5770e-0ee5-496c-a290-176a16e78b7c</ns1:_DocumentHash>
<ns1:Approver>0</ns1:Approver>
<ns1:BankAccountId>0</ns1:BankAccountId>
<ns1:BankRemittanceType>None</ns1:BankRemittanceType>
<ns1:CurrencyCode>USD</ns1:CurrencyCode>
<ns1:CurrentOperationsTax>Current</ns1:CurrentOperationsTax>
<ns1:CustVendNegInstProtestProcess>OpenPaym</ns1:CustVendNegInstProtestProcess>
<ns1:DefaultDimension>
<ns0:Values><ns0:Value>
<ns0:Name></ns0:Name>
<ns0:Value>0</ns0:Value>
</ns0:Value></ns0:Values>
</ns1:DefaultDimension>
<ns1:DetailSummaryPosting>Detail</ns1:DetailSummaryPosting>
<ns1:DocumentNum>P049368</ns1:DocumentNum>
<ns1:EndBalance>0.00</ns1:EndBalance>
<ns1:ExchRate>0.00</ns1:ExchRate>
<ns1:ExchrateSecondary>0.00</ns1:ExchrateSecondary>
<ns1:FixedExchRate>Yes</ns1:FixedExchRate>
<ns1:FixedOffsetAccount>Yes</ns1:FixedOffsetAccount>
<ns1:GroupBlockId>
</ns1:GroupBlockId>
<ns1:InUseBy></ns1:InUseBy>
<ns1:JournalBalance>1573.91</ns1:JournalBalance>
<ns1:JournalName>APINV</ns1:JournalName><ns1:JournalTotalDebit>1573.91</ns1:JournalTotalDebit>
<ns1:LedgerJournalTrans>
<ns1:CurrencyCode>... LedgerJournalTrans Deleted for Simplicitsy </ns1:CurrencyCode>
</ns1:LedgerJournalTrans>
<ns1:DocuRefTable />
<ns1:LedgerJournalTable_W />
</ns1:LedgerJournalTable>
</ns1:PurchaseInvoice>
Toraj [email protected]

Hi:
After working on this off and on for a few weeks,
I just posted the following Technical Blog / article for solution. Happy reading.
BizTalk 2013 and AX2012 R2 Receive Services Interface -
http://torajkhavari.blogspot.com/2015/01/title-biztalk2013-and-ax2012-r2-receive.html
Regards,Toraj
Toraj [email protected]

Similar Messages

  • I'm getting a 'The Management Pack element is not declared' error when trying to import CSV data into my *extended* WindowsComputer class

    Background:
    I have a class called SUS_WindowsComputerMP, that is an extension of the Microsoft class, Microsoft.Windows.Computer
    I'm trying to import CSV data into this extended class and to the base class as well.
    Question:
    What am I doing wrong? I have a feeling that the Import CSV Format file is different for importing data into *extended* classes like mine, because the XML structure below would work for non-extended classes.
    "...Creating new CSVImporter
    Data Filename: D:\Peter\CMDB II\Exported MPs\TestMPs\SUS_WindowsComputer.csv
    Format Filename: D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml
    Validating against XSD schema...
    The 'ManagementPack' element is not declared.
    Validation completed.
    Format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml contains an invalid root element. Expected: root node with name \"CSVImportFormat\"
    Could not initialize a Management Object Creator from format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml. Import thread exiting.
    My import format XML is this:
    <CSVImportFormat>
    <Class Type="ClassExtension_a3ae3e0f_d578_43dc_aa3e_9037a094763c" >
    <Property ID="WindowsServerID" />
    <Property ID="PrincipalName" />
    <Property ID="NetbiosComputerName" />
    <Property ID="IPAddress" />
    <Property ID="NetbiosDomainName" />
    <Property ID="DNSName" />
    <Property ID="OSVersionDisplayName" />
    <Property ID="SerialNo" />
    <Property ID="ServerDescription" />
    <Property ID="AssetTagNo" />
    <Property ID="ServerNameRow" />
    <Property ID="ChassisType" />
    <Property ID="InstallDate" />
    <Property ID="IsVirtualMachine" />
    <Property ID="BusinessUnitCustomersEnum" />
    <Property ID="RegionLocationEnum" />
    <Property ID="OtherFunctionRoleEnum" />
    <Property ID="ProductTypeEnum" />
    <Property ID="ObjectStatus" />
    <Property ID="AssetStatus" />
    <Property ID="CriticalityEnum" />
    <Property ID="EnvironmentEnum" />
    <Property ID="CostCodeClassEnum" />
    <Property ID="DataClassificationEnum" />
    <Property ID="Manufacturer" />
    </Class>
    </CSVImportFormat>

    Hello,
    Can anyone please help me out with this weird issue.
    thanks,
    orton

  • Trouble sending messages to Dynamics AX: Element is not declared.

    I'm having problems getting Dynamics AX to accept a message from BizTalk.
    Here's my setup:
    AX 2012:
    A table, BTAIF_test, with two fields ("Name" and "Phone").
    A query, BTAIFQuery, with BTAIF_test as datasource.
    A service, BTAIFQueryService, autogenerated by the AX AIF Wizard, registered and deployed on
    An inbound port, BTAIF, using net.tcp.
    BizTalk:
    An incoming schema, generated from a simple XML file containing a name and a phone number.
    An outgoing schema, generated by the Consume WCF Service wizard.
    A map, mapping the two value fields from the incoming to the outgoing schema.
    A receive port, using a receive location with FILE transport to pick up the incoming message, and using XMLReceive pipeline
    A send port, using the previously mentioned map, and WCF-NetTcp configured with my AX service address and a simple soap header pointing at the create method of the service. It uses the XMLTransmit pipeline.
    When I drop a message in the receive location I get the following message in the Exception log of AX:
    "Invalid document schema. The following error was returned:  
    The 'http://schemas.microsoft.com/dynamics/2008/01/documents/BTAIFQuery:BTAIFtest_1' element is not declared."
    The send port has a backup FILE transport, and this is what the message looks like when it dumps it there:
    <?xml version="1.0" encoding="utf-8"?>
    <ns0:BTAIFQuery xmlns:ns0="http://schemas.microsoft.com/dynamics/2008/01/documents/BTAIFQuery"
    xmlns:st="http://schemas.microsoft.com/dynamics/2008/01/sharedtypes">
    <ns0:BTAIFtest_1 class="entity">
    <ns0:Name>John Hancock</ns0:Name>
    <ns0:Phone>555-123-4567</ns0:Phone>
    </ns0:BTAIFtest_1>
    </ns0:BTAIFQuery>
    Any pointers as to what I'm doing wrong here? I've been searching for information on the net and either nobody's doing this or it's so easy nobody cares to write about it. I'm hoping it's the latter and I'm just making some stupid mistake.

    From the above output I think the AxdExtType_Name, AxdExtType_Phone and AxdEnum_AxdEntityAction are defined as simple type in BTAIF_schemas_microsoft_com_dynamics_2008_01_sharedtypes.xsd, so the above output is correct as per this schema. Recheck if the
    format of schema is correct so that AX can accept it.
    Yes, they're defined as simple types, here's the relevant definitions from sharedtypes.xsd:
    <xs:simpleType name="AxdExtType_Name">
    <xs:annotation>
    <xs:documentation xml:lang="EN-US">Name:Name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
    <xs:minLength value="0" />
    <xs:maxLength value="60" />
    </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="AxdExtType_Phone">
    <xs:annotation>
    <xs:documentation xml:lang="EN-US">Telephone:Telephone number.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
    <xs:minLength value="0" />
    <xs:maxLength value="20" />
    </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="AxdEnum_AxdEntityAction">
    <xs:annotation>
    <xs:documentation xml:lang="EN-US">AxdEntityAction:AxdEntityAction</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
    <xs:enumeration value="create" />
    <xs:enumeration value="update" />
    <xs:enumeration value="replace" />
    <xs:enumeration value="delete" />
    </xs:restriction>
    </xs:simpleType>
    This schema and the destination schemas are auto-generated by BizTalk's Consume WCF Service
    wizard.

  • DBMS_PIPE : NOT DECLARED ERROR 발생 시

    제품 : PL/SQL
    작성날짜 : 1996-10-30
    DBMS_PIPE NOT DECLARED ERROR 발생 시
    ====================================
    발생원인 1)
    DBMS_PIPE는 oracle install시에 $ORACLE_HOME/rdbms/admin/catproc.sql을
    실행함으로써 생성되도록 되어 있는 stored package이다.
    다른 stored package(DBMS_OUTPUT....)등은 생성직후 sys를 owner로한
    stored package에 대해 public synonym을 생성한 후 바로 이 synonym에
    대해 public에게 execute previlege가 grant되지만 DBMS_PIPE는 생성만
    되도록 되어 있기 때문에 사용하고자 하는 user에게 별도의 grant작업이
    필요하다.
    -> 확인사항 및 해결 방법
    1) sqldba에서
    select * from dba_objects where object_name = 'DBMS_PIPE';
    를 수행하여 DBMS_PIPE에 관한 자료가 sys가 owner인 package
    spec,package body,synonym만 나타나야 한다.
    2) sqldba에서
    grant execute on DBMS_PIPE to user_name;
    을 실행하여 해당 user에게 grant한다.
    발생원인 2)
    DBMS_PIPE는 sys가 owner이어야 한다.
    user의 실수로 system이나 다른 별도의 user로 connect하여 catproc.sql을
    실행한 경우에 발생한다.
    -> 확인사항 및 해결방법
    1) sqldba에서
    select * from dba_objects where object_name = 'DBMS_PIPE';
    를 수행하여 DBMS_PIPE에 관한 자료가 sys나 public이 아닌 다른
    user가 owner로 되어 있는 DBMS_PIPE object를 drop시킨다.
    2) sqldba에서
    grant execute on DBMS_PIPE to user_name;
    을 실행하여 해당 user에게 grant한다.

    Your comments are inappropriate.
    First of all, documentation links outside Oracle might not contain the correct documentation, as Oracle fixes documentation bugs silently.
    Secondly, you should not post links to desupported release. You seem to have assumed the 8.1.5 solution still applies to newer releases, which is correct in this case but not necessarily in all cases.
    Finally in the time you took to flame Saubhik you could have helped someone else out.
    Sybrand Bakker
    Senior Oracle DBA

  • Page not found error while opening sharepoint 2013 site

    page not found error while opening sharepoint 2013 site 
    Please help me on this

    Hi,
    Please check the log file to find more information about this issue. The path of the log file is:
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS.
    In addition, please make sure the URL of the site is correct.
    Please check whether you could access other pages in the problematic site.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • I tried to empty my trash and could not - an error code 8003 showed up and stopped me. What can I do to empty the trash?

    I tried to empty my trash and could not - an error code 8003 showed up and stopped me. What can I do to empty the trash?

    Look to the right under 'More like This' - many good sugestions there.

  • Migrate biztalk 2006R2/SQL server 2005 projects to Biztalk 2013/SQL server 2012

    We have Biztalk application projects deployed on Biztalk 2006R2/SQL server 2005 environment on a single server
    Now we  have installed and configured Biztalk 2013/SQL server 2012 in a multicomputer environment where Biztalk server is on one computer while SQL server is on the other.
    Now it's time to migrate the projects 2006R2 to 2013.. Is it a smooth process? I found a lot of posts about migration from 2006R2 to Biztalk 2010...  Just wondering if it is similar or more complex?? Appreciate any help/suggestions.. thanks!!

    Hi Annee,
    Following article should answer your question:
    BizTalk Application Migration Guide
    Also have a look at following forum post:
    http://social.msdn.microsoft.com/Forums/en-US/f9ac6b6c-3dbe-487b-85c5-448d257d62f4/migration-from-biztalk-server-2006-to-2013?forum=biztalkgeneral
    Maheshkumar S. Tiwari|http://tech-findings.blogspot.in/

  • Still ORA-19007: Schema and element do not match Error

    Hi all,
    I'm new to XML and dealing with lots of information but I'm stuck with this error ORA-19007: Schema and element do not match. Read some forums and tried some possibitlities but none has solved this issue. I think this is related with some malformed headers definitions but I'm not sure, so any help will be much appreciated.
    Here's what I've done so far:
    This is the xml file - emp.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>
    ...and this is the XSD file: emp.xsd:
    <?xml version="1.0" encoding="ISO-8859-15"?>
    <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:storeVarrayAsTable="true">
         <xs:element name="comment" type="xs:string"/>
         <xs:element name="id" type="xs:string"/>
         <xs:element name="name" type="xs:string"/>
         <xs:complexType name="employeeType">
              <xs:sequence>
                   <xs:element ref="id"/>
                   <xs:element ref="name"/>
                   <xs:element ref="comment" minOccurs="0"/>
              </xs:sequence>
              <xs:attribute name="team" type="xs:string" use="optional"/>
         </xs:complexType>
         <xs:element name="employee" type="employeeType"/>
         <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    1) Created folders
    declare
    ignore boolean;
    begin
    ignore := dbms_xdb.createFolder('/public/Emp');
    ignore := dbms_xdb.createFolder('/public/Emp/xsd');
    ignore := dbms_xdb.createFolder('/public/Emp/xml');
    commit ;
    end;
    2) Copied emp.xsd to /public/Emp/xsd in Win Explorer (via WebDAV connection)
    3) Registered the schema
    begin
    dbms_xmlschema.registerURI(schemaURL => 'http://xmlns.oracle.com/xdb/emp.xsd'
    ,schemaDocURI => '/public/Emp/xsd/emp.xsd'
    ,genTables => true
    commit ;
    end ;
    4) Copied the xml file to /public/Emp/xml. At this point I was expecting that the xml file was automatically uploaded to corresponding tables based on is content but it didn't happen. I didn't got any error also. When I issue:
    Select count(*) from employees
    ...or
    select y."name", y."team" from employees x, table(x.xmldata."employee") y
    ...got 0 rows returned
    5) So then created the table:
    create table emp_tab(
    id number,
    emp sys.XMLType
    xmltype column emp
    XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
    element "employee";
    6) And tried to insert one record based on the emp.xml:
    insert into emp_tab values (1,
    xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>'));
    ...and that when I get ORA-19007: Schema and element do not match.
    Any help on this will be appreciated. Thx.

    SQL> set echo on
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/ as sysdba
    Enter password:
    Connected.
    SQL> set define on
    SQL> --
    SQL> define USERNAME = OTNTEST
    SQL> --
    SQL> def PASSWORD = OTNTEST
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user OTNTEST cascade
    User dropped.
    SQL> grant connect, resource to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant connect, resource to &USERNAME identified by &PASSWORD
    new   1: grant connect, resource to OTNTEST identified by OTNTEST
    Grant succeeded.
    SQL> grant create any directory, drop any directory to &USERNAME
      2  /
    old   1: grant create any directory, drop any directory to &USERNAME
    new   1: grant create any directory, drop any directory to OTNTEST
    Grant succeeded.
    SQL> grant alter session, create view to &USERNAME
      2  /
    old   1: grant alter session, create view to &USERNAME
    new   1: grant alter session, create view to OTNTEST
    Grant succeeded.
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user OTNTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> alter session set events ='19027 trace name context forever, level 0x800'
      2  /
    Session altered.
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xmlns.oracle.com/xdb/emp.xsd';
      3    :schemaPath := '/public/testcase.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> create or replace directory XMLDIR as 'c:\xdb\otn'
      2  /
    Directory created.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="ISO-8859-15"?>
      5  <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
      6  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:store
    VarrayAsTable="true">
      7  <xs:element name="comment" type="xs:string"/>
      8  <xs:element name="id" type="xs:string"/>
      9  <xs:element name="name" type="xs:string"/>
    10  <xs:complexType name="employeeType">
    11  <xs:sequence>
    12  <xs:element ref="id"/>
    13  <xs:element ref="name"/>
    14  <xs:element ref="comment" minOccurs="0"/>
    15  </xs:sequence>
    16  <xs:attribute name="team" type="xs:string" use="optional"/>
    17  </xs:complexType>
    18  <xs:element name="employee" type="employeeType"/>
    19  <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
    20  <xs:complexType>
    21  <xs:sequence>
    22  <xs:element ref="employee" maxOccurs="unbounded"/>
    23  </xs:sequence>
    24  </xs:complexType>
    25  </xs:element>
    26  </xs:schema>');
    27  begin
    28    if (dbms_xdb.existsResource(:schemaPath)) then
    29      dbms_xdb.deleteResource(:schemaPath);
    30    end if;
    31    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    32  end;
    33  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmltext :=
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
      5  <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
    "http://xmlns.oracle.com/xdb/emp.xsd">
      6  <employee team="Team Test">
      7  <id>1</id>
      8  <name>Nelson Branco</name>
      9  <comment>No Comments</comment>
    10  </employee>
    11  </employees>';
    12  end;
    13  /
    PL/SQL procedure successfully completed.
    SQL> insert into EMPLOYEES values ( xmltype(:xmltext));
    1 row created.
    SQL> /
    1 row created.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employee"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    insert into EMP_TAB values ( 1, xmltype(:xmltext))
    ERROR at line 1:
    ORA-19040: Element employees does not match expected employee.
    SQL> drop table emp_tab
      2  /
    Table dropped.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employees"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    1 row created.
    SQL>

  • Varray of Objects "Bind variable not declared" error.. I don't want a bind variable.

    Hello.
    This program is supposed to pull values from a table using a loop, and in the loop, put the values in objects in a varray.  I'm new to objects and am stumped trying to get this program to run.  When I attempt to run it in SQL*Plus  I get the following feedback:
    Type created.
    Type body created
    SP2-0552: Bind variable "MY_VARRAY_EMP1" not declared.
    I don't think I even need a bind variable.  Any feedback would be appreciated.  Here's the program:
    -- Enable screen I/O
    SET SERVEROUTPUT ON SIZE 1000000
    SET VERIFY OFF
    -- begin object spec
    CREATE OR REPLACE TYPE employee3 AS OBJECT
      ename CHAR (20 char),
      empno NUMBER (4),
      sal NUMBER (10),
      MEMBER FUNCTION get_ename RETURN CHAR, MEMBER PROCEDURE set_ename (SELF IN OUT NOCOPY employee3),
      MEMBER FUNCTION get_empno RETURN NUMBER, MEMBER PROCEDURE set_empno (SELF IN OUT NOCOPY employee3),
      MEMBER FUNCTION get_sal RETURN NUMBER, MEMBER PROCEDURE set_sal (SELF IN OUT NOCOPY employee3)
    -- begin object body
    CREATE OR REPLACE TYPE BODY employee3 AS
      -- gets
      MEMBER FUNCTION get_ename RETURN CHAR IS
      BEGIN
      RETURN self.ename;
      END;
      MEMBER FUNCTION get_empno RETURN NUMBER IS
      BEGIN
      RETURN self.empno;
      END;
      MEMBER FUNCTION get_sal RETURN NUMBER IS
      BEGIN
      RETURN self.ename;
      END;
      -- sets
      MEMBER PROCEDURE set_ename(SELF IN OUT employee3) IS
      BEGIN
      self.ename := ename;
      END;
      MEMBER PROCEDURE set_empno(SELF IN OUT employee3) IS
      BEGIN
      self.empno := empno;
      END;
      MEMBER PROCEDURE set_sal(SELF IN OUT employee3) IS
      BEGIN
      self.sal := sal;
      END;
    END;
    DECLARE
      TYPE emp_varray IS VARRAY(10) OF EMPLOYEE3;
      my_varray_emp1 EMP_VARRAY;
      -- List of EMPNO's in order of appearance in EMP table (for cross-referencing, single-line retrieval)
      TYPE MYCREF_VARRAY IS VARRAY(10) OF NUMBER(4);
      varray_mycref MYCREF_VARRAY := MYCREF_VARRAY(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
      this_object EMPLOYEE3;
      -- make a variable to store one empno
      thisno NUMBER(4);
      -- make a counter
      counter INT;
      -- query variables for the set calls
      q_ename CHAR(20 CHAR);
      q_empno NUMBER(4);
      q_sal NUMBER(10);
      my_result INT;
    BEGIN
      --my_varray_emp1 := EMP_VARRAY(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
      -- Put the first 10 EMPNO's in my cref array
      SELECT empno BULK COLLECT INTO varray_mycref FROM emp WHERE ROWNUM < 11;
      -- Use a loop to retrieve the first 10 objects in the "emp" table and put them in the varray of objects
      q_ename := NULL;
      q_empno := NULL;
      q_sal := NULL;
      my_result := NULL;
      this_object := NULL;
      counter := 1;
      FOR counter IN 1..10 LOOP
      thisno := varray_mycref(counter);
      this_object := my_varray_emp1(counter);
      SELECT ename INTO q_ename FROM emp WHERE empno = thisno;
      my_result := this_object.set_ename(q_ename, NULL);
      SELECT empno INTO q_empno FROM emp WHERE empno = thisno;
      my_result := this_object.set_empno(q_empno, NULL);
      SELECT sal INTO q_sal FROM emp WHERE empno = thisno;
      my_result := this_object.set_sal(q_sal, NULL);
      END LOOP;
      -- Use another loop to display the information in the reverse order.
      FOR counter in REVERSE 1..10 LOOP
      this_object =: my_varray_emp1(counter);
      dbms_output.put_line((this_object.get_ename()) || CHR(9) || (this_object.get_empno()) || CHR(9) || (this_object.get_sal()));
      END LOOP;
    END;

    Cleaning up your code for errors and eliminating unnecessary complexity...
    Add a user-defined constructor which takes all attributes and calls the "setter" procedures in one trip:
    -- Enable screen I/O
    set SERVEROUTPUT on size 1000000
    set VERIFY off
    -- begin object spec
    create or replace type employee3 as object
      ename CHAR (20 char),
      empno NUMBER (4),
      sal NUMBER (10),
    constructor function employee3(
        self    in out nocopy    employee3,
        aEname    in        char,
        aEmpNo    in        integer,
        aSal    in        number
      return self as result,
      member function get_ename return CHAR, member procedure set_ename (SELF in out nocopy employee3, ename in char),
      member function get_empno return NUMBER, member procedure set_empno (SELF in out nocopy employee3, empno in integer),
      member function get_sal return NUMBER, member procedure set_sal (SELF in out nocopy employee3, sal in integer)
    -- begin object body
    create or replace type body employee3 as
      constructor function employee3(
        self    in out nocopy    employee3,
        aEname    in        char,
        aEmpNo    in        integer,
        aSal    in        number
      return self as result
      is
      begin
        self.set_ename(aEname);
        self.set_empno(aEmpNo);
        self.set_sal(aSal);
        return;
      end;
      -- gets
      member function get_ename return CHAR is
      begin
      return self.ename;
      end;
      member function get_empno return NUMBER is
      begin
      return self.empno;
      end;
      member function get_sal return NUMBER is
      begin
      return self.sal;
      end;
      -- sets
      member procedure set_ename(SELF in out employee3, ename in char) is
      begin
      self.ename := ename;
      end;
      member procedure set_empno(SELF in out employee3, empno in integer) is
      begin
      self.empno := empno;
      end;
      member procedure set_sal(SELF in out employee3, sal in integer) is
      begin
      self.sal := sal;
      end;
    end;
    (Since I don't have EMP handy at the moment, create a simple view instead)
    create or replace view emp
    as
    select    'EMP' || to_char(level) ename
    ,    level + 100 empno
    ,    DBMS_RANDOM.VALUE(25000,75000) sal
    from    DUAL
    connect by
        level <= 20
    Get rid of your loop and individual SELECTs, and replace it with a single SELECT BULK COLLECT INTO...
    declare
      type emp_varray is varray(10) of EMPLOYEE3;
      my_varray_emp1 EMP_VARRAY;
      this_object EMPLOYEE3;
    begin
      -- No need for a loop. Use SELECT BULK COLLECT INTO, together with a user-defined constructor call (since the
      -- user-defined constructor overrides the default constructor we need to call it using named-parameter notation):
      select    new employee3(
                aEname    => e.ename,
                aEmpNo    => e.empno,
                aSal    => e.sal
      bulk collect into
            my_varray_emp1
      from        emp e
      where        rownum <= 10;
      -- Use another loop to display the information in the reverse order.
      for counter in reverse 1..10 loop
      this_object := my_varray_emp1(counter);
      dbms_output.put_line((this_object.get_ename()) || chr(9) || to_char(this_object.get_empno()) || chr(9) || to_char(this_object.get_sal()));
      end loop;
    end;
    EMP10        
    110    60110
    EMP9         
    109    67485
    EMP8         
    108    58242
    EMP7         
    107    47597
    EMP6         
    106    58995
    EMP5         
    105    49098
    EMP4         
    104    47406
    EMP3         
    103    67574
    EMP2         
    102    59663
    EMP1         
    101    52929
    PL/SQL procedure successfully completed.
    Gerard

  • SP2-0552: Bind variable not declared error. Any help please?

    Hi Experts,
    I have a question regarding the error that I am getting: SP2-0552: Bind variable "V_COUNT_TOT_BAL" not declared.
    I have 'out' parameters declared in my procedure and executing the same from sql script as shown below:
    set ver off
    set serverout on
    set linesize 8000
    Declare
    Variable v_count_dtl_bal NUMBER(10);
    Variable v_updat_dtl_bal NUMBER(10);
    Variable v_count_tot_bal NUMBER(10);
    Begin
    execute load_abc.insert_abc_bal(:v_count_dtl_bal,:v_updat_dtl_bal,:v_count_tot_bal);
    End;
    exit;
    So, when this sql script runs it given me the above error. However, all the result looks good and there's no problem with the data or anything else that might be impacted. I suspect this error stems from the code in the sql script above.
    Any idea what am I doing wrong?
    Thanks in advance for any inputs.

    Thanks Frank. I still receive the same error if I follow your example or any of the ones explained above. This is what I am getting and still an error underneath:
    Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
              VARCHAR2 (n CHAR) | NCHAR | NCHAR (n) |
              NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR |
              BINARY_FLOAT | BINARY_DOUBLE ] ]
    Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
              VARCHAR2 (n CHAR) | NCHAR | NCHAR (n) |
              NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR |
              BINARY_FLOAT | BINARY_DOUBLE ] ]
    Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
              VARCHAR2 (n CHAR) | NCHAR | NCHAR (n) |
              NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR |
              BINARY_FLOAT | BINARY_DOUBLE ] ]
    SP2-0552: Bind variable "V_COUNT_TOT_BAL" not declared.

  • Compilation error after installling BizTalk 2013 CU2

    Hi,
    I started getting the below error in the orchestration project
    "non-readonly field/property access is limited to distinguished fields on class-based messages"
    it was failing at this line RequestMessage.DocumentElement.LocalName == "Fault".
    Here RequestMessage is a message of type System.Xml.XmlDocument. 
    It was working again after I uninstalled BizTalk 2013 CU2. Has anyone faced this problem and what was the solution .
    Looking at the release notes of CU2 at
    http://support.microsoft.com/kb/2892599/en-gb it says about a fix to XpathMutator class
    "FIX: XpathMutatorStream class does not work as expected when you execute Xpath statements against XmlDocuments in BizTalk Server 2013"
    Probably this is causing the compilation error. Can we raise this with the BizTalk Product team if someone else has also faced this issue ?
    Regards,
    Mahesh

    What subsequent CU's? There hasn't been any CU's for BizTalk Server 2013 since CU2 which was released in Oct. 2013 (almost 1 1/2 year ago now!)
    http://support.microsoft.com/kb/2555976
    Morten la Cour

  • Library not registered error in Visual Studio 2013.

    Whenever I attempt to build a solution, build multiple projects, or even run a program (with debugging) in visual studio 2013, I receive the error below.
    "Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))"
    I have attempted to fix this by repairing my Visual Studio installation, but without success. 
    I believe the issue to be with Visual Studio itself, though, because this happens with every solution I have tried it with.
    Any assistance in resolving this issue would be most appreciated.

    Hi ndowney,
    Based on your issue, could you please tell me if you install some other tools on your machine before you get the ""Library not registered" error?
    (1) If yes, please you disable or un-install these tools and then build solution/project check this issue again.
    (2)If no, to check if the issue is related to the VS IDE, please refer the following steps to check this error message.
    (2.1) I suggest you could try the following commands to check if it is helpful.
    a.  Run devenv /Safemode to see if you can apply it correctly. This can eliminate the possibility that third party Add-ins or packages are causing problems.
    b. Run devenv /Resetsettings to eliminate the cause of corrupted settings.
    c. Run devenv /ResetSkipPkgs in Command Prompt.
    If above still cannot work, try use this command again: devenv /resetsuerdata
    (2.2) If the above suggestion still could not help you, maybe you will need to re-install the VS2013 and then check this issue again.
    If you have any latest message about your issue, please tell me.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting Error while installing Exchange 2013 on server 2012

    Error During Exchange 2013 Mailbox Transport
    Role Install On Server 2012 
    Exchange
    Server forums
     > 
    Exchange
    Server 2013 - Setup, Deployment, Updates, and Migration
    Question
    1
    Sign
    in to vote
    I was installing Exchange 2013 on Server 2012.  The server is not a DC, but is a member of a domain with a 2008 R2 functional level, and I was logged in as a domain admin.  There has never been an Exchange instance on this domain.  I got past
    the prerequisite checks, and the installer showed 15 steps, so I walked away.  When I came back, I saw this:
    Step 8 of 15: Mailbox role: Transport service
    Error:
    The following error was generated when "$error.Clear(); 
              $maxWait = New-TimeSpan -Minutes 8
              $timeout = Get-Date;
              $timeout = $timeout.Add($maxWait);
              $currTime = Get-Date;
              $successfullySetConfigDC = $false;
              while($currTime -le $timeout)
                $setSharedCDCErrors = @();
                try
                  Set-SharedConfigDC -DomainController $RoleDomainController -ErrorVariable setSharedCDCErrors -ErrorAction SilentlyContinue;
                  $successfullySetConfigDC = ($setSharedCDCErrors.Count -eq 0);
                  if($successfullySetConfigDC)
                    break;
                  Write-ExchangeSetupLog -Info ("An error ocurred while setting shared config DC. Error: " + $setSharedCDCErrors[0]);
                catch
                  Write-ExchangeSetupLog -Info ("An exception ocurred while setting shared config DC. Exception: " + $_.Exception.Message);
                Write-ExchangeSetupLog -Info ("Waiting 30 seconds before attempting again.");
                Start-Sleep -Seconds 30;
                $currTime = Get-Date;
              if( -not $successfullySetConfigDC)
                Write-ExchangeSetupLog -Error "Unable to set shared config DC.";
            " was run: "Unable to set shared config DC.".

    Hi Deepak,
    From the error description, I would like to clarify the following things:
    1. Please ensure that IPv6 on the network adaptor is turned on.
    2. Please check if the account that you used to install Exchange has necessary permissions to perform the installation.
    3. Make sure that DNS is configured correctly.
    Hope my clarification is helpful.
    If there are any problems, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Sharepoint 2013 and SSRS 2012 Integration - Report Server Content Types not displayed

    Hello, Everyone:
      I installed SSRS 2012 on our Sharepoint 2013 application server following the step-by-step instruction from the posting below:
      http://msdn.microsoft.com/en-us/library/jj219068.aspx
      Everything goes well after STEP 3 is completed.
      I did see the reporting services started and SSRS service application created.
      However, when I created a new site and tried to enable the predefined Reporting Services content types, I do not see the Shared data source (.rsds) files, report models (.smdl), and Report Builder report definition (.rdl) 3 types of files listed at
    all.
      Further more, when I go to the Provision Subscriptions and Alerts page, I keep getting a "SQL Server Agent state cannot be determined" error, even though the username and password provided is the admin user
    for the database.
      Any experience of what is wrong with the SSRS - Sharepoint integration? Please help!
    Tina

    Hello, Treavor:
      Now that the content types problem is resolved, I need to come back to the
    Provision Subscriptions and Alerts page.
      I guess I'm a little confused about what is being asked for the Provision Subscriptions and Alerts  page.
      The user I provided on the Provision Subscriptions and Alerts  page is my user-defined sysadmin role. And the page takes that.
      When I downloaded the SQL script, it was trying to give the automatically generated user "sa-SPDevContentAppPo" permission.
      Which user are we using to detect the SQL Server Agent?
      Thanks again!
    Tina

  • Adobe Premiere Elements 10 not working on both my Computer

    I just bought Adobe Premiere Elements 10 to use with my Sony Handycam HDR-XR160 but it just dont work
    I first try to install on my PC: Intel Quad Q6600 with 8 Gig of Ram and a 500 Go WD Black Edition and a GeForce 9800 GT with 1 Gig of Video Memory .... really jerky video editing interface and the play back is really bad a lot of pixellization all over and also really realy jerky
    then I tried with My Mac Pro 2008 2XQuad Core Xeon 10 Gig of Ram 2 x 1TB WD Black Edition (Scratch Folder on second HD) and a ATI  Radeon HD 3870 same problem but now the video play back just stop every 5 seconde it s also hard just to drag the video in the time line at the botom of the screen
    This is computer I use for My Recording Studio and it's working like a DREAM. I did the same manipulation with other program like IMovie and so on with NO PROBLEM AT ALL .... and the interface was responsive unlike Premiere
    I bought your programe thinking I was going for a upgrade from what I was using before and now I can't take it back cause the box is open so please tell me you have a fix or someting cause at the moment ...  i'm really not to impress
    Thanks for the help

    Hello Steve
    Thanks for a your help
    I still have the same problem I did change the recording from 60p to 60i but the video are still jerky , I know i'm probably the one who's got the problems but I just don't see it !!!
    This is the setting I have on my Camera:       Image Quality/Size
                                                                      Image Quality = HD
                                                                      Frame Rate = 60i
                                                                      Recording mode = High Quality FH
                                                                      x.v.Color = On
                                                                     Connection
                                                                     TV Type = 16:9
                                                                     Component = 1080p/480i
                                                                     HDMI Resolution = Auto
                                                                     CTRL FOR HDMI = On
    From thoes Info can you tell me what's the Best Preset in Premiere or if someone is using premiere with a Sony Handycam HDR-XR160 can you tell me your exact settings for both the Cam and Premiere
    Thanks

Maybe you are looking for