Applescript Error -  Error Loading XML Tools.osax

I have a bash script which runs applescript code a few times in order to import items into iTunes. The script completes and does what I want it to do, howver each call to Applescript generates the error listed below.
here is an example call from my script:
osascript -l AppleScript -e 'tell application id "com.apple.iTunes" to set video kind of track id [trackID] to TV show'
[trackID] is a variable which holds the iTunes track ID.
Any help would be appreciated.
Error loading /Users/scott/Library/ScriptingAdditions/XML Tools.osax/Contents/MacOS/XML Tools: dlopen(/Users/scott/Library/ScriptingAdditions/XML Tools.osax/Contents/MacOS/XML Tools, 262): no suitable image found. Did find:
/Users/scott/Library/ScriptingAdditions/XML Tools.osax/Contents/MacOS/XML Tools: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Users/scott/Library/ScriptingAdditions/XML Tools.osax" declares no loadable handlers.

the error seems to be with the scripting addition
XML Tools.osax you have installed. it might be outdated or not fully SL compatible. check with the vendor.
http://www.latenightsw.com/freeware/XMLTools2/
beyond that I suggest you ask on the UNIX or Applescript forums under OS X technologies.

Similar Messages

  • Creating new analysis gives "Error loading XML Document from ..."

    Trying to create analysis and getting "Error loading XML Document from saw.dll/answers/answersproperties.xml?fmapId=S1clug.
    The response given was:" after choosing subject area. Analysis editor is opened but Subject Areas is empty and can't do anything.
    The problem is on Mozilla 12 (16.0.2, 17.0.1) and IE 8. Chrome works fine.
    My system is Win 7, BI 11.1.1.6.0 is on Oracle Linux (and by the way Mozilla from Linux system works fine)
    What could be the reason of this?
    Edited by: 898973 on 4/12/2012 15:11

    Reinstalling Mozilla with "Remove personal data" option checked resolved the problem.

  • Error loading XML Document from /analytics/saw.dll/common/privileges.xml

    I tested my procedure for upgrading from OBI 11.1.1.5 to 11.1.1.6 which was successful. I had to rollback to OBI 11.1.1.5 using my database backup and VM snapshot due to project requirements.
    The OBI application successfully comes up but users who login just get "Error loading XML Document from /analytics/saw.dll/common/privileges.xml?fmapID=KqIJCw. The response given was: ". They can't close this message box so are unable to do anything.
    How can I fix this?

    Hi All,
    You can face this issue with other versions of OBIEE 11.*
    Problem cab be solved as follows:
    Go to http://localhost:7001/em  > coreapplication > Capacity Management > Scalibility >
    1. Lock and edit
    2 .increase number of presentation services to 2
    3. restart opmn component.
    Go to coreapplication > Availibility > processes
    1 .please note that in deployment > catalog > change path of catalog field from $coreapplication to path where your catalog resides.
    2. Take down your primary instance.
    3. As your secondary is up, it will grant you to browse you through catalog and dashboards.
    If you want to run primary instance of presentation services
    Go to path \Middleware\instances\instance1\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips2
    except catalog and catalog manager > Copy all other files to coreapplication_obips1
    restart opmn component > problem solved.!!!
    Regards,
    Akshay S.
    please like if you find it helpful

  • ODi - error loading xml file

    Hi Gurus,
    I'm facing some problems on loading data using ODI (11.1.1.5.0) from a xml file.
    These steps are made without issues:
    1- Data Server XML_STROBE created with these options:
    com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    dbc:snps:xml?f=E:\INBOX_MCA\XML\xml_strobe.xml&s=XML_S&ro=true&dod=true
    2- Create the Physical Schema
    3- Test Connection: Sucesseful Connection
    4- Create teh Logical Schema
    5- Models - Reverse Engineer with sucess
    6- I can view data from tables
    After that i create the interface, to load xml data to oracle table.
    I use the LKM SQl to SQL with the option DELETE_TEMPORARY_OBJECTS = true,
    and IKM SQl COntrol Append.
    When execute that there is a problem on step Load Data:
    ODI-1227: Task SrcSet0 (Loading) fails on the source XML connection XML_STROBE.
    Caused By: java.sql.SQLException: unexpected token: CALL
    at com.sunopsis.jdbc.driver.xml.SnpsXmlStatementRedirector.execute(SnpsXmlStatementRedirector.java:125)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlStatement.execute(SnpsXmlStatement.java:31)
    at com.sunopsis.rdb.manager.SnpsRDBHelperISO.createTable(SnpsRDBHelperISO.java:218)
    at com.sunopsis.rdb.manager.SnpsRDBStructCreator.createTable(SnpsRDBStructCreator.java:69)
    at com.sunopsis.rdb.manager.SnpsRDBStructCreator.createStructure(SnpsRDBStructCreator.java:57)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.createModel(SnpsXmlDTD.java:198)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:273)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:438)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:463)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.<init>(SnpsXmlDTD.java:126)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlSchema.<init>(SnpsXmlSchema.java:522)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.createNewSchema(SnpsXmlSchemaManager.java:294)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.getSchemaFromProperties(SnpsXmlSchemaManager.java:272)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlDriver.connect(SnpsXmlDriver.java:110)
    at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:409)
    at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:385)
    at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:352)
    at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:331)
    at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:99)
    at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
    at oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter.getConnection(OnConnectOnDisconnectDataSourceAdapter.java:74)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
    at com.sunopsis.sql.SnpsConnection.createConnection(SnpsConnection.java:391)
    at com.sunopsis.sql.SnpsConnection.connect(SnpsConnection.java:348)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2875)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1596)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$2.doAction(StartScenRequestProcessor.java:582)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:513)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(StartScenRequestProcessor.java:1070)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
    at java.lang.Thread.run(Thread.java:662)
    Any ideas?
    Best Regards,
    Teresa

    Hi,
    I solve this issue changing he JDBC URL on the Topology Navigator to use no_batch_update
    &nobu=false
    Teresa

  • Sqlldr errors loading XML file

    I am getting two errors on two different data elements trying to load an XML file. DB version is 11.2.0.2.0 - 64bit.
    This is part of the instance file:
    <?xml version="1.0" encoding="utf-8"?>
    <SamseAMSS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://SAMSE-AMSS.org/namespace">
    <FileInfo>
    <AviationUIC>
    <OrigUnit>
    <UIC>WV7PB0</UIC>
    <UnitName>B TRP 1-230TH ACS</UnitName>
    <OrgLocCde>A</OrgLocCde>
    <DPICode>Need LOGSA DPICode</DPICode>
    <IsReporter>true</IsReporter>
    <UnitPOC />
    <POCNbr>(865)985-4634</POCNbr>
    <POCEmail />
    </OrigUnit>
    <AMSSUtilCde>
    <UtilCde>0</UtilCde>
    <Summary>
    <EIC>ROC</EIC>
    *<MDS xsi:type="xsd:string">OH-58D</MDS>*
    *<Model>OH-58D</Model>*
    <QtyAuth>6</QtyAuth>
    <QtyOH>6</QtyOH>
    <RptTimeCde>H</RptTimeCde>
    </Summary>
    </AMSSUtilCde>
    </AviationUIC>
    The problem is with the MDS and Model elements.
    This is part of the schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns="http://SAMSE-AMSS.org/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    targetNamespace="http://SAMSE-AMSS.org/namespace"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:smse="http://samsecommon.xsd/namespace"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:import namespace="http://samsecommon.xsd/namespace" schemaLocation="samsecommon.xsd"/>
    <xs:element name="SamseAMSS" xdb:defaultTable="SAMSEAMSS">
    <xs:sequence>
    <xs:element name="FileInfo" smse:type="SamseFileInfoType"/>
    <xs:element name="AviationUIC" maxOccurs="unbounded">
    <xs:annotation>
    <xs:documentation>1 element for each UIC being reported</xs:documentation>
    </xs:annotation>
    <xs:complexType xdb:SQLType="AMSSUIC_T">
    <xs:sequence>
    <xs:element name="AMSSUtilCde" minOccurs="0" maxOccurs="unbounded">
    <xs:annotation>
    <xs:documentation>1 element for each UtilCde being reported for this UIC</xs:documentation>
    </xs:annotation>
    <xs:complexType xdb:SQLType="AMSSUTILCDE_T">
    <xs:sequence>
    <xs:element name="UtilCde">
    <xs:annotation>
    <xs:documentation>Key Field</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:length value="1"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Summary" maxOccurs="unbounded">
    <xs:annotation>
    <xs:documentation>1 element per type of equipment (by EIC / PrimeEIC) authorized for this UIC -- always sent every time.</xs:documentation>
    </xs:annotation>
    <xs:complexType xdb:SQLType="SUMMARY_T">
    <xs:sequence>
    <xs:element name="EIC" minOccurs="0" smse:type="EICType">
    <xs:annotation>
    <xs:documentation>Key Field</xs:documentation>
    </xs:annotation>
    </xs:element>
    *<MDS xsi:type="xsd:string">OH-58D</MDS>*
    *<Model>OH-58D</Model>*
                   <xs:element name="PrimeEIC" minOccurs="0" smse:type="EICType" nillable="true">
    <xs:annotation>
    <xs:documentation>Key Field</xs:documentation>
    </xs:annotation>
    </xs:element>
    <xs:element name="QtyAuth" type="xs:unsignedShort"/>
    First, it doesn't recognize the "Model" data element that is defined in the schema:
    Record 3: Rejected - Error on table SAMSEAMSS.
    ORA-30937: No schema definition for 'Model' (namespace 'http://SAMSE-AMSS.org/namespace') in parent '/SamseAMSS/AviationUIC[1]/AMSSUtilCde[1]/Summary[1]'
    If I remove the Model from the instance file and try to load, it does not recognize the xsi:type in the MDS element. I also tried using xsi:type in the schema definition.
    Record 1: Rejected - Error on table SAMSEAMSS.
    ORA-31079: unable to resolve reference to type "string"
    If I change xsi:type to xsd:type it loads with no errors. However we don't control the incoming XML files so it needs to load with xsi:type.
    Thanks for your help.

    Whoops no I didn't put that in the schema definition! This is the part with those elements:
    <xs:complexType xdb:SQLType="AMSSUTILCDE_T">
    <xs:sequence>
    <xs:element name="UtilCde">
    <xs:annotation>
    <xs:documentation>Key Field</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:length value="1"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Summary" maxOccurs="unbounded">
    <xs:annotation>
    <xs:documentation>1 element per type of equipment (by EIC / PrimeEIC) authorized for this UIC -- always sent every time.</xs:documentation>
    </xs:annotation>
    <xs:complexType xdb:SQLType="SUMMARY_T">
    <xs:sequence>
    <xs:element name="EIC" smse:type="EICType">
    <xs:annotation>
    <xs:documentation>Key Field</xs:documentation>
    </xs:annotation>
    </xs:element>
                   *<xs:element name="MDS" minOccurs="0" type="xsd:string"/>*
                   *<xs:element name="Model" minOccurs="0" type="xsd:string"/>*
                   <xs:element name="PrimeEIC" smse:type="EICType" nillable="true">
    <xs:annotation>
    <xs:documentation>Key Field</xs:documentation>
    </xs:annotation>
    </xs:element>
    Thanks.
    Edited by: user4109719 on Jun 12, 2012 6:32 AM Put correct Model definition
    Edited by: user4109719 on Jun 12, 2012 6:37 AM

  • Error loading xml file with sqlldr

    Hi there,
    I am having trouble loading an xml file via sqlldr into oracle.
    The version i am running is Oracle Database 10g Release 10.2.0.1.0 - 64bit Production and the file size is 464 MB.
    It ran for about 10 hours trying to load the file and then threw up the error:
    ORA-22813: operand value exceeds system limits.
    I have loaded a file of 170MB using the same process succesfully.
    Any Ideas?
    Cheers,
    Dan.

    Looked a bit into the issue (ORA-22813) and although it can be caused by a lot of issues varrying database versions, you could have a go at sizing up your PGA database parameter. See Oracle support Doc ID 837220.1 for more info.
    The following might help
    CREATE OR REPLACE PROCEDURE show_pga_memory (context_in IN VARCHAR2 DEFAULT NULL)
    SELECT privileges required on:
      SYS.v_$session
      SYS.v_$sesstat
      SYS.v_$statname
    Here are the statements you should run:
    GRANT SELECT ON SYS.v_$session  TO <schema>;
    GRANT SELECT ON SYS.v_$sesstat  TO <schema>;
    GRANT SELECT ON SYS.v_$statname TO <schema>;
    IS
      l_memory NUMBER;
    BEGIN
      SELECT st.VALUE
        INTO l_memory
        FROM SYS.v_$session se, SYS.v_$sesstat st, SYS.v_$statname nm
      WHERE se.audsid = USERENV ('SESSIONID')
        AND st.statistic# = nm.statistic#
        AND se.SID = st.SID
        AND nm.NAME = 'session pga memory';
      DBMS_OUTPUT.put_line (CASE WHEN context_in IS NULL
                              THEN NULL
                              ELSE context_in || ' - '
                            END
                            || 'PGA memory used in session = ' || TO_CHAR (l_memory));
    END show_pga_memory;
    /

  • Error Loading XML Data into Template Builder

    Hi,
    I am using XMLP 5.6.2 with E-business Suite. I copied a seeded Oracle Apps report and changed the output from Text to XML. I executed the report and it generated XML Output. I saved the output file as an XML file using IE.
    When I try to load the XML Data file in MS Word, I am getting:
    'Error No :-1072896682: Invalid at the top level of the document.
    Line No : 1
    Position : 1
    File Pos: 0
    Source: Authentication failed
    I never had this problem before using the older version of XMLP (I think it was 5.0).
    Does anyone have an idea how to fix this?
    Thanks,
    Steve

    Try using "view source" within IE to get the XML in a text file (Notepad) and save it from there. Then it should load fine. When you save it directly from the browser window there is extra formatting that prevents it from being loaded in template builder.

  • Error loading XML content, returned by PHP script

    JavaScript
    function loadXMLDoc(fname)
    var xmlDoc;
    // code for IE
    if (window.ActiveXObject)
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
    // code for Mozilla, Firefox, Opera, etc.
    else if (document.implementation && document.implementation.createDocument)
    xmlDoc=document.implementation.createDocument("","doc",null);
    else
    alert('Ваш броузер не может обработать необходимые скрипты. Воспользуйтесь браузерами IE 8, FireFox 3.х, Opera 9.х');
    xmlDoc.async=false;
    xmlDoc.load(fname);
    return(xmlDoc);
    PHP Script in XMLsrc.phtml
    error: loadXMLDoc("XMLsrc.phtml").documentElement is null
    It works in Opera 10.x (checked)

    JavaScript
    function loadXMLDoc(fname)
    var xmlDoc;
    // code for IE
    if (window.ActiveXObject)
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
    // code for Mozilla, Firefox, Opera, etc.
    else if (document.implementation && document.implementation.createDocument)
    xmlDoc=document.implementation.createDocument("","doc",null);
    else
    alert('Ваш броузер не может обработать необходимые скрипты. Воспользуйтесь браузерами IE 8, FireFox 3.х, Opera 9.х');
    xmlDoc.async=false;
    xmlDoc.load(fname);
    return(xmlDoc);
    PHP Script in XMLsrc.phtml
    error: loadXMLDoc("XMLsrc.phtml").documentElement is null
    It works in Opera 10.x (checked)

  • Error when loading XML file

    When using Load XML Data utility I am getting an error:
    ORA-00942: table or view does not exist
    Error loading XML.
    Loading as CSV text works except some records with new line characters.
    Also, when xml file is really small – “Load XML” works too. The actual file is ~ 12 MB.
    How to resolve this issue?
    Application Express 3.2.0.00.27
    Oracle 10.2.0.1.0
    Your help will be appreciated,
    Anatoly

    Hi Anatoly,
    I suspect this is a problem with the underlying package DBMS_XMLGEN and not directly in APEX.
    Can you reproduce this issue on apex.oracle.com?
    Joel

  • Loading XML from a server

    Hi,
    I have registered as an Iphone developer at apple website, and was able to package iphone apps successfuly.
    My first experiment was to read a value from an XML file that resides at http://www.mediaplus.com.jo/iphone.xml
    When I test the SWF on my PC it works normally but when I package it and test on my iphone I receive nothing!!
    I am sure it is something about securinty, any help would be highly appreciated!
    Here is the (simple) code I am using
    import flash.events.MouseEvent;
    var all_content:XML;
         function loadXml(xmlPath:String)
                var xml_loader:URLLoader = new URLLoader();
                xml_loader.load( new URLRequest( xmlPath) );
                            xml_loader.addEventListener(Event.COMPLETE, onXmlLoad);
         function onXmlLoad(e:Event):void
            all_content = new XML(e.target.data);
            text_field.text = String(all_content.item);
    btn.addEventListener(MouseEvent.CLICK, retrieve);
    function retrieve (evt:MouseEvent) :void
        loadXml("http://www.mediaplus.com.jo/iphone.xml")

    I've successfully done w/o problems as well.
    Here is what I've used for tests...
    private function loadGallery( feed:String ):void
    var request:URLRequest = new URLRequest( "http://www.site.com/file.xml" );
    var loader:URLLoader = new URLLoader();
    loader.addEventListener( Event.COMPLETE, parseSetup );
    loader.addEventListener( IOErrorEvent.IO_ERROR, xmlError );
    loader.load( request );
    private function parseSetup( event:Event ):void
    var xml:XML = new XML( event.target.data );
    trace( xml );
    private function xmlError( event:IOErrorEvent ):void
    trace("Error loading xml file: " + event);}

  • Error while loading xml files using JDBC

    Hi,
    I am trying to load xml files into an xmltype table using JDBC calls and am getting this error for some files
    LPX-00200: could not convert from encoding UTF-8 to UCS2
    The xml files and our database are both UTF-8 encoded. The version of oracle that we have here is 9.2.0.6
    Any suggestions in this matter will be greatly appreciated.
    Thanks,
    Uma

    I also experienced this problem and unfortunately this solution didn't work for me given that the tag you suggested was already on the XML file.

  • Error While Loading XMl Doc into Oracle Database 10g

    Hi all,
    I have a task that , I have to make a utillity by which we can load XML Doc into a Table. While searching on Internet i found following Procedure on ASK Tom
    CREATE OR REPLACE
    procedure insert_xml_emps(
    p_directory in varchar2, p_filename in varchar2, vtableName in varchar2 )
    as
    v_filelocator bfile;
    v_cloblocator clob;
    l_ctx dbms_xmlsave.ctxType;
    l_rows number;
    begin
    dbms_lob.createtemporary(v_cloblocator,true);
    v_filelocator := bfilename(p_directory, p_filename);
    dbms_lob.open(v_filelocator, dbms_lob.file_readonly);
    DBMS_LOB.LOADFROMFILE(v_cloblocator, v_filelocator,
    dbms_lob.getlength(v_filelocator));
    l_ctx := dbms_xmlsave.newContext(vTableName);
    l_rows := dbms_xmlsave.insertxml(l_ctx,v_cloblocator);
    dbms_xmlsave.closeContext(l_ctx);
    dbms_output.put_line(l_rows || ' rows inserted...');
    dbms_lob.close(v_filelocator);
    DBMS_LOB.FREETEMPORARY(v_cloblocator);
    end ;
    when i try to run this procedure
    BEGIN
    insert_xml_emps('XML_LOAD','load.xml','IBSCOLYTD');
    END;
    it gaves me following Error
    ORA-29532: java call terminated by uncaught java exception : Oracle.xml.sql.OracleXMLSQLException:No
    rows to modify-- the row enclosing tag missing. Specify the correct row enclosing tag.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 115
    ORA-06512: at "EXT_TEST.INSERT_XML_EMPS", line 18
    ORA-06512: at line 2
    Can anyone describe me this error
    Thanks.
    Best Regards.

    SQL> /* Creating Your table */
    SQL> CREATE TABLE IBSCOLYTD
      2  (
      3  ACTNOI VARCHAR2 (8),
      4  MEMONOI NUMBER (7,0),
      5  MEMODTEI DATE,
      6  AMOUNTI NUMBER (8,0),
      7  BRCDSI NUMBER (4,0),
      8  TYPEI NUMBER (4,0),
      9  TRANSMONI NUMBER (6,0)
    10  );
    Table created.
    SQL> CREATE OR REPLACE PROCEDURE insert_xml_emps(p_directory in varchar2,
      2                                              p_filename  in varchar2,
      3                                              vtableName  in varchar2) as
      4    v_filelocator    BFILE;
      5    v_cloblocator    CLOB;
      6    l_ctx            DBMS_XMLSTORE.CTXTYPE;
      7    l_rows           NUMBER;
      8    v_amount_to_load NUMBER;
      9    dest_offset      NUMBER := 1;
    10    src_offset       NUMBER := 1;
    11    lang_context     NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    12    warning          NUMBER;
    13  BEGIN
    14    dbms_lob.createtemporary(v_cloblocator, true);
    15    v_filelocator := bfilename(p_directory, p_filename);
    16    dbms_lob.open(v_filelocator, dbms_lob.file_readonly);
    17    v_amount_to_load := DBMS_LOB.getlength(v_filelocator);
    18    ---  ***This line is changed*** ---
    19    DBMS_LOB.LOADCLOBFROMFILE(v_cloblocator,
    20                              v_filelocator,
    21                              v_amount_to_load,
    22                              dest_offset,
    23                              src_offset,
    24                              0,
    25                              lang_context,
    26                              warning);
    27 
    28    l_ctx := DBMS_XMLSTORE.newContext(vTableName);
    29    DBMS_XMLSTORE.setRowTag(l_ctx, 'ROWSET');
    30    DBMS_XMLSTORE.setRowTag(l_ctx, 'IBSCOLYTD');
    31    -- clear the update settings
    32    DBMS_XMLStore.clearUpdateColumnList(l_ctx);
    33    -- set the columns to be updated as a list of values
    34    DBMS_XMLStore.setUpdateColumn(l_ctx, 'ACTNOI');
    35    DBMS_XMLStore.setUpdateColumn(l_ctx, 'MEMONOI');
    36    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'MEMODTEI');
    37    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'AMOUNTI');
    38    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'BRCDSI');
    39    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TYPEI');
    40    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TRANSMONI');
    41    -- Now insert the doc.
    42    l_rows := DBMS_XMLSTORE.insertxml(l_ctx, v_cloblocator);
    43    DBMS_XMLSTORE.closeContext(l_ctx);
    44    dbms_output.put_line(l_rows || ' rows inserted...');
    45    dbms_lob.close(v_filelocator);
    46    DBMS_LOB.FREETEMPORARY(v_cloblocator);
    47  END;
    48  /
    Procedure created.
    SQL> BEGIN
      2  insert_xml_emps('TEST_DIR','load.xml','IBSCOLYTD');
      3  END;
      4  /
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM ibscolytd;
    ACTNOI      MEMONOI MEMODTEI     AMOUNTI     BRCDSI      TYPEI  TRANSMONI
    28004125     251942 05-SEP-92        400        513          1          0
    28004125     251943 04-OCT-92        400        513          1          0
    SQL>

  • IDOC_XML_FROM_FILE Error while loading XML as IDOC to ECC 6.0

    I have successfully converted IDOC to XML file.
    Getting Error while converting XML back to IDOC in ECC 6.0 using function: IDOC_XML_FROM_FILE
    Segment EDI_DS40 is not defined.....I am really not sure about the error as this idoc was previously posted to the same ECC 6.0...
    Exception       SEGMENT_ERROR
    Message ID:          EA                         Message number:           721
    Message:
    The segment EDI_DS40 is not defined.
    Secondly is there a way to load XML file via WE19?
    Tx
    Salman

    Thanks alot Oliver for taking a stab...
    I created the XML file from within SAP by using the functionailty of this function module:-
    IDOC_XML_TRANSFORM
    I created my ZIDOC_XML_TRANSFORM and just added file download facility in that the rest is the same as the orignal function.
    Is there any way for me to supress generation of ED_DS40 segements in the XML file??

  • Error while loading XML files into scott user

    Hi All,
    I'm new to xml files. I need to load xml files into database through OWB.
    I have xml file in my local machine & am trying to load into table PO of Scott. Scott is registered as repository user.
    Followed same steps as specified in userguide.
    But, when executing the procedure ( in two ways one as just table name, and other as user.table name) it is showing the below error:
    Procedure is:(1)--with username.tablename
    begin
    wb_xml_load(
    '<OWBXMLRuntime>'||
    '<XMLSource>'||
    '<file>&&SAMPLES_DIR.sample1.xml</file>'||
    '</XMLSource>'||
    '<targets>'||
    '<target dateFormat="yyyy.MM.dd">scott.PO</target>'||
    '</targets>'||
    '</OWBXMLRuntime>'
    end;
    ERROR at line 1:
    ORA-20006: Error occurred while truncating target database object SCOTT.PO.
    Base exception: ORA-01031: insufficient privileges
    ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
    ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
    ORA-06512: at "SCOTT.SAMPLE1", line 3
    ORA-06512: at line 1
    Procedure is:(2) with out username
    begin
    wb_xml_load(
    '<OWBXMLRuntime>'||
    '<XMLSource>'||
    '<file>&&SAMPLES_DIR.sample1.xml</file>'||
    '</XMLSource>'||
    '<targets>'||
    '<target dateFormat="yyyy.MM.dd">PO</target>'||
    '</targets>'||
    '</OWBXMLRuntime>'
    end;
    ERROR at line 1:
    ORA-20006: Error occurred while truncating target database object PO.
    Base exception: ORA-00942: table or view does not exist
    ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
    ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
    ORA-06512: at line 2
    xml file:
    <ROWSET>
    <ROW>
    <ID>100</ID>
    <ORDER_DATE>2000.12.20</ORDER_DATE>
    <SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
    <SHIPTO_STREET>500 Marine World Parkway</SHIPTO_STREET>
    <SHIPTO_CITY>Redwood City</SHIPTO_CITY>
    <SHIPTO_STATE>CA</SHIPTO_STATE>
    <SHIPTO_ZIP>94065</SHIPTO_ZIP>
    </ROW>     
    </ROWSET>
    Note: Everything works fine if I create PO table in OWBSYS user and execute the procedurein OWBSYS user. OWBSYS.PO table will be loaded.
    What privileges are missing, what shouldI do if I want to execute the procedure from scott user and load the table of scott.
    Thanks in advance for the help.
    Regards,
    Joshna

    Hi Joshna,
    Please follow below steps to load xml file to oracle database.
    1.First connect to owb (Design Center) through your repository owner user (ex : REP_OWNER).
    2. Import WB_XML_LOAD procedure . and exit to repository owner.
    3. connect to owb design center through your repository user (ex : REP_USER)
    Create New mapping and drag one Constant Operator and create one attribute, paste / edit following code
    '<OWBXMLRuntime>'||
    '<XMLSource>'||
    '<file>E:\SOURCE\emp.xml</file>'||
    '</XMLSource>'||
    '<targets>'||
    '<target truncateFirst = "FALSE" dateFormat="yyyy.MM.dd">rep_user.emp</target>'||
    '</targets>'||
    '</OWBXMLRuntime>'
    4. Drag pre mapping operator and select WB_XML_LOAD procedure
    5. Connect Constant Operator attribute to pre mapping operator.
    6. Drag two dummy tables and connect source to target. (ex : drag t1 (table) tab two times and connect.
    7. Validate and deploy the mapping.
    8. grant necessary grant command to rep_owner user to rep_user user.
    (Note : target truncateFirst = "FALSE" by default truncate the table. So you have to give grant privileges
    To rep_user , select ,insert, delete privileges.
    9. Execute the mapping , and check EMP table. (Note : before loading EMP table delete all records ).
    10 . If you want more description please go through the below link
    http://download.oracle.com/docs/html/A95931_01/apf.htm
    Regards
    Venkat

  • Custom Connection Manager only works in 32bit- 0xC0011008: Error loading from XML

    I have a very basic / stripped connection manager with only one property (SSIS 2012). It works fine in design time (you can open the connection manager editor and change the value), but in runtime it only works in 32bit mode. The runtime-validate-method
    does work, but if everything validates OK then in 64bit it throws an error when you run the package:
    Exception deserializing the package "The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information
    can be stored.". This occurs when CPackage::LoadFromXML fails.
    The 2 VS projects are .Net 4 class library projects with the Build Platform on "Any CPU"
    I only add references to:
    Microsoft.SqlServer.ManagedDTS - C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ManagedDTS.dll
    Microsoft.SqlServer.Dts.Design - C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.Dts.Design\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Dts.Design.dll
    Compiled DLL's are available in GAC and SQL Server connections folder:
    I made the sourcecode available via codeplex:
    https://ssisconnectionmanager.codeplex.com/SourceControl/latest#myFirstConnectionManager/2012/myFirstConnectionManager/myFirstConnectionManager.cs
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

    AppPrincipal (identity) related? Hint http://serverfault.com/questions/339747/the-package-failed-to-load-due-to-error-0xc0011008-error-loading-from-xml
    Arthur My Blog
    Hi Arthur,
    Looks like something similar (same message, same 64bit issue), will try that tomorrow! But sounds weird that you should tell SSIS which identity to use...
    Found the same thread in MSDN:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/47d185d3-c801-45cf-becd-3c2524d98353/the-package-failed-to-load-due-to-error-0xc0011008-error-loading-from-xml?forum=sqlintegrationservices
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

Maybe you are looking for

  • Weblogic em and console crashes in Forms 11gR2 domain

    Hi, I am working towards an APEX and/or Forms11gR2 environment from Forms and Reports 6i. Coming from a client-server background,with the concept of application servers etc totally unfamiliar territory. and a near-zero knowledge of Java its been a to

  • Downgrade to Win 7 Pro from Win 8.1 Pro

    I will be downgrading my T440s to Win 7 64 bit. I was reading the instructions that came with the Win 7 CDs from Lenovo and on page 4 it states on item #6 "select GPT partition style or MBR partition style". From what I understand I would use GPT par

  • Remove Carriage Return from a TextEdit field

    Hi All, I have a tableview, of which the last field Description, is of type TextEdit. Not only this, when the data was migrated from a legacy system to SAP, either the last field with the value (If Description has value, Description field, else the f

  • SOX Compliance in SAP

    Hi all, we are about do one project for US based company for which they are asking about SOX compliance in SAP. Can any one tell, what we have to do in SAP R/3 in order meet SOX compliance as per US regulations. Regs, Ramesh B

  • Automatic "number of visible categories"

    Hello, did anyone know how to implement in code automatic number of visible categories in graph. I need to do in code something that user can do manually on graph by clicking: Right button mouse click on a vertical axis of ALV Graphics -> Format grid