Getting error while inserting xmldoc to a table

I am getting following error .
ERROR at line 2:
ORA-06550: line 2, column 6:
PLS-00103: Encountered the symbol "INSERTXML" when expecting one of the
following:
:= . ( @ % ;
The symbol ":=" was substituted for "INSERTXML" to continue.
Here is my code below.
CREATE TABLE empleados (empid NUMBER PRIMARY KEY,
empname VARCHAR2(30),
empjob VARCHAR2(30),
empsal NUMBER);
create or replace procedure InsertXML(xmlDoc IN VARCHAR2, tableName IN VARCHAR2) is
insCtx DBMS_XMLSave.ctxType;
rows number;
begin
insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
dbms_output.put_line(to_char(rows) || ' rows inserted');
DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
end;
begin
exec InsertXML('<?xml version="1.0"?><ROWSET><ROW num="1"><EMPID>10</EMPID><EMPNAME>Perry Smith
</EMPNAME><EMPJOB>Manager</EMPJOB><EMPSAL>800</EMPSAL></ROW><ROW num="1"><EMPID>20</EMPID><EMPNAME>J
ohn Calvach</EMPNAME><EMPJOB>Principal Support Consultant</EMPJOB><EMPSAL>900</EMPSAL></ROW><ROW num
="1"><EMPID>30</EMPID><EMPNAME>Louis Bald</EMPNAME><EMPJOB>Technical Specialist</EMPJOB><EMPSAL>400<
/EMPSAL></ROW><ROW num="1"><EMPID>40</EMPID><EMPNAME>Anthony Flowers</EMPNAME><EMPJOB>Technical Team
Leader</EMPJOB><EMPSAL>500</EMPSAL></ROW><ROW num="1"><EMPID>50</EMPID><EMPNAME>George Monk</EMPNAM
E><EMPJOB>Support Consultant</EMPJOB><EMPSAL>200</EMPSAL></ROW></ROWSET>','empleados');
end;

I changed the name.But still I get that error.
Thanks

Similar Messages

  • Getting Error While inserting a record in table PDSNR through Tcode PA30

    Hi Experts,
    Im doing a transaction in  TCode PA30 by entering a pernr and infty as 14 and wage type.
    My need is when im entering a particular wage type in PA30 with infotype 14 , for that particular wage type and infotype i need to assign a different cost centre. This requirement was doing now manually by changing the cost centre form EDIT - > Maintain Cost Assignment.
    But my Client Needs to do it automatically. by comparing the wage type and infotype the cost centre needs to get automatically updated.
    So i use the Enhancement EXIT_SAPFP50M_002 * INCLUDE ZXPADU02.* and wrote coding like below
    CASE innnn-infty.
    To check whether the record belong to pa0014
    If so,check the wage type for the updation
    If so update the values of cost center assignments in the table assob and asshe
    when '0014'.
    if innnn-subty eq '2211'.
    Select the last updated sequence number in the table pdsnr
    if sy-ucomm eq 'UPD' or sy-ucomm eq 'INS'.
    select single * from pa0001 into wa_0001 where pernr eq INNNN-pernr and
                                                   endda eq '99991231'.
      if sy-subrc = 0.
    call function 'ENQUEUE_EPPRELE'
    EXPORTING
       MODE_PREL            = 'E'
       MANDT                = SY-MANDT
       PERNR                = INNNN-pernr
       INFTY                = INNNN-INFTY
       SUBTY                = INNNN-SUBTY
    EXCEPTIONS
       FOREIGN_LOCK         = 1
       SYSTEM_FAILURE       = 2
       OTHERS               = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    CLEAR : lv_pdsnr.
    select MAX( pdsnr ) from pdsnr into lv_pdsnr.
    lv_pdsnr = lv_pdsnr + 1.
        ls_assob-pdsnr = lv_pdsnr.
        ls_assob-pernr = INNNN-pernr.
        ls_assob-bukrs = wa_0001-bukrs. "'1001'.
        ls_assob-gsber = wa_0001-gsber. "'0001'.
        ls_assob-kokrs = wa_0001-kokrs. "'1000'.
        ls_assob-kostl = '1-1361'.
        ls_asshr-pdsnr = lv_pdsnr.
        ls_asshr-pernr = INNNN-pernr.
        ls_asshr-infty = innnn-infty.
        ls_asshr-subty = innnn-subty.
        ls_asshr-begda = sy-datum.
        ls_asshr-endda = '99991231'.
        ls_PDSNR-pdsnr = lv_pdsnr.
        ls_PDSNR-PDGRP = '5B'.
    insert into pdsnr values ls_pdsnr.
    insert into asshr values ls_asshr.
    insert into assob VALUES ls_assob.
    call function 'DEQUEUE_EPPRELE'
    EXPORTING
       MODE_PREL       = 'E'
       MANDT           = SY-MANDT
       PERNR           = INNNN-pernr
       INFTY           = INNNN-INFTY
       SUBTY           = INNNN-SUBTY.
        ENDIF.
    ENDIF.
    ENDIF.
    COMMIT WORK.
    ENDCASE.
    This is to update the three tables PDSNR, ASSOB,ASSHR.
    Its getting Updated correctly, But when i goto EDIT - > Maintain Cost Assignment to do some changes and while saving the data i get the following Error Message :
    You Cannot insert data in table : PDSNR.
    Message no. P2715
    Can Anyone please suggest me how to solve this issue.
    Thanks,
    Vijayan.R

    Hi. Were you able to fix the error?

  • Error while inserting data into a table.

    Hi All,
      I created a table.While inserting data into the table i am getting an error.Its telling "Create data Processing Function Module".Can any one help me regarding this?
    Thanx in advance
    anirudh

    Hi Anirudh,
      Seems there is already an entry in the Table with the same Primary Key.
    INSERT Statement will give short dump if you try to insert data with same key.
    Why dont you use MODIFY statement to achieve the same.
    Reward points if this Helps.
    Manish

  • Iam getting error while insert .

    HI every one , i getting error while doing insert data into backend table.the error is like this , could you clarify is it possible to change the lookup of sappd1db to other.
    Object not found in lookup of SAPPD1DB.

    Hi Eswar,
    go to J2EE perspective..expend ur Ejb project n now double click on persistent.xml file
    now in right pane first deselect switch off verification ,if its selectd..
    then select  No automatic locking..
    now in datasource name input field u can write ur new datasource sys ID..
    secondly..go to entity bean tab after doin this in same pane
    n expend entity bean
    nw check for ejb field's mapping for corressponding fields ..
    id it shows table is varified by d dictionary thn its fine else u map it wid correct fields..
    now save the changes..n delete ue old .jar file of ejb project n create new..now create new .ear file for application project aftr deleting old one...n deploy new1....
    hpe it hlps u...
    Regards,
    Khushboo

  • Error while Inserting data into flow table

    Hi All,
    I am very new to ODI, I am facing lot of problem in my 1st interface. So I have many questions here, please forgive me if it has irritated to you.
    ========================
    I am developing a simple Project to load a data from an input source file (csv) file into a staging table.
    My plan is to achieve this in 3 interfaces:
    1. Interface-1 : Load the data from an input source (csv) file into a staging table (say Stg_1)
    2. Interface-2 : Read the data from the staging table (stg_1) apply the business rules to it and copy the processed records into another staging table (say stg_2)
    3. Interface-3 : Copy the data from staging table (stg_2) into the target table (say Target) in the target database.
    Question-1 : Is this approach correct?
    ========================
    I don't have any key columns in the staging table (stg_1). When I tried to execute the Flow Control of this I got an error:
    Flow Control not possible if no Key is declared in your Target Datastore
    With one of the response (the response was - "FLOW control requires a KEY in the target table") in this Forum I have introduced a column called "Record_ID" and made it a Primary Key column into my staging table (stg_1) and my problem has been resolved.
    Question-2 : Is a Key column compulsary in the target table? I am working in BO Data Integrator, there is no such compulsion ... I am little confused.
    ========================
    Next, I have defined one Project level sequence. I have mapped the newly introduced key column Record_Id (Primary Key) with the Project level sequence. Now I am got another error of "CKM not selected".
    For this, I have inserted "Insert Check (CKM)" knowledge module in my Project. With this the above problem of "CKM not selected" has been resolved.
    Question-3 : When is this CKM knowledge module required?
    ========================
    After this, the flow/interface is failing while loading data into the intermediar ODI created flow table (I$)
    1 - Loading - SS_0 - Drop work table
    2 - Loading - SS_0 - Create work table
    3 - Loading - SS_0 - Load data
    5 - Integration - FTE Actual data to Staging table - Drop flow table
    6 - Integration - FTE Actual data to Staging table - Create flow table I$
    7 - Integration - FTE Actual data to Staging table - Delete target table
    8 - Integration - FTE Actual data to Staging table - Insert flow into I$ table
    The Error is at Step-8 above. When opened the "Execution" tab for this step I found the message - "Missing parameter Project_1.FTE_Actual_Data_seq_NEXTVAL RECORD_ID".
    Question-4 : What/why is this error? Did I made any mistake while creating a sequence?

    Everyone is new and starts somewhere. And the community is there to help you.
    1.) What is the idea of moving data from stg_1 and then to stg_2 ? Do you really need it for any other purpose other than move data from SourceFile to Target DB.
    Otherwise, its simple to move data from SourceFile -> Target Table
    2.) Does your Target table have a Key ?
    3.) CKM (Check KM) is required when you want to do constraint validation (Checking) on your data. You can define constraints (business rules) on the target table and Flow Control will check the data that is flowing from Source File to Target table using the CKM. All the records that donot satisfy the constraint will be added to E$ (Error table) and will not be added to the Target table.
    4.) Try to avoid ODI sequences. They are slow and arent scalable. Try to use Database sequence wherever possible. And use the DB sequence is target mapping as
    <%=odiRef.getObjectName( "L" , "MY_DB_Sequence_Row" , "D" )%>.nextval
    where MY_DB_Sequence_Row is the oracle sequence in the target schema.
    HTH

  • Error while inserting rows in a table

    Hi,
    We have recently migrated from 9i to 10g. We have a scheduled job out our DB which first deletes all the rows from a table and then inserts them back by selecting rows from 5 tables. This table has a composite primary key based on 6 columns in it. In 9i, when i try to insert rows into the table after deleting all the rows from it, I am able to insert the data successfully . However, in 10g, when i try doing the same operation, it fails with the ORA error:
    ORA-00001: unique constraint violated
    The same query which works perfectly in 9i fails in 10g
    If anybody has some ideas on how to resolve the same, kindly let me know.
    Thanks in advance.

    Hi,
    I was finally able to resolve the reason behind that error message and found it even more weird. The error was because I was using the substr function for extracting the characters 1-4 from a column which is 5 characters long. When i specify the query as:
    select substr(column1, 1, 4)) from table1;
    only the characters 1-3 are retrieved. Now if i change the query to select substr(column1, 1, 5)) from table1, in that case also only 3 characters are retrieved although i have specified the substr to start from 1 and read till 5 characters. Also, when i run the query:
    select length(substr(column1, 1, 4)) from table1 or select length(substr(column1, 1, 5)) from table1
    I get the answer as 3.
    However, the most amazing part is that the query is working perfectly in 9i and is retrieving the data correctly i.e. from substr 1-4.
    Can anyone suggest what the problem could be?
    Thanks
    Edited by: CrazyAnie on May 13, 2009 1:34 AM

  • Error while inserting XMLType document into table

    Dear sir,
    I have created a table in oracle 9i.The description is as follows:
    Name Null? Type
    ID NUMBER
    XML_DOCUMENT SYS.XMLTYPE(XMLSchema "http:
    //localhost:8080/home/SCOTT/
    xsd/message.xsd" Element "me
    ssage") STORAGE Object-relat
    ional TYPE "MESSAGE_TYPE"
    Later I tried to insert values into this table using the following statement:
    1 insert into test1(ID,XML_DOCUMENT)
    2 VALUES
    3 (100,
    4 xmltype
    5 (
    6 bfilename('xmldir','message1.xml'),
    7 nls_charset_id('AL32UTF8')
    8 )
    9* )
    I get the following error:
    ERROR at line 4:
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'.
    I have no idea of what to do now.Can someone please tell me how to proceed.
    Reference:(this is for the insert command statement)
    http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10790/xdb04cre.htm#BABDCAFB
    Thanking you in advance,
    Sincerely,
    Sirisha.

    Yes, but bear in mind that Text searching is not truely XML aware...
    Also, a single 65M document is probably not a single docuemnt, it's probably a collection of smaller documents that have been colllected together into a single document. It may make more sense to split this into it's seperate components before loading it into the database...
    The typcical signature of document of this nature is
    <ROOT>
    <ELEMENT>
    </ELEMENT>
    <ELEMENT>
    </ELEMENT>
    <ELEMENT>
    </ELEMENT>
    </ROOT>

  • Getting error while inserting a row in a table

    Hi,
    The following error occurs when one of my enduser is trying to enter record into a table
    <b>Error: Insertion of Infotype 1032 (return code 3) </b>
    There are no records in the table at all.. what could be the reason and why the error occurs?
    Thanks in advance
    Regards,
    Suresh

    Hello Suresh,
    in which table... did you get a dump?
    What is the ORA-error? Is a trace or an alert.log entry generated?
    Your information is insufficient to solve the problem
    Regards
    Stefan

  • Getting error while loading flat file into table.

    I am using ODI 11 and i am trying to load data in oracle database table using source as flat .txt file .
    When i execute the interface , i am getting below errors.
    ODI-1217: Session INF_FILE2TAB (31022) fails with return code 7000.
    ODI-1226: Step INF_FILE2TAB fails after 1 attempt(s).
    ODI-1240: Flow INF_FILE2TAB fails while performing a Loading operation. This flow loads target table PARTNER.
    Caused By: org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 44, in <module>
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1074)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
         at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2224)
         at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2168)
         at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:333)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    java.sql.SQLException: java.sql.SQLException: ORA-06564: object DAT_DIR does not exist
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2458)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         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 oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         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)
    Please let me know pointers on this.

    Yes,after your sugestion i have created ODI agent and tested the file system connection in topology. It was connected successfully.
    but when i tried again for file to table load. Again got below error.
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 44, in <module>
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1074)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
         at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2224)
         at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2168)
         at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:333)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    java.sql.SQLException: java.sql.SQLException: ORA-06564: object DAT_DIR does not exist
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2458)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         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 oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         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)
    Please suggest.

  • Error while inserting xml data into table

    Hello
    I am running thid stored procedure and this compiles correctly , but when I try to execute it gives me a error, I have been trying this form the past 3 days , could anyone please help me ASAP
    SQL> CREATE OR REPLACE PROCEDURE loadxml12 AS
    2 fil BFILE;
    3 buffer RAW(32767);
    4 len INTEGER;
    5 insrow INTEGER;
    6 BEGIN
    7 SELECT f_lob INTO fil FROM xml_temp12 WHERE key = 1;
    8 DBMS_LOB.FILEOPEN(fil,DBMS_LOB.FILE_READONLY);
    9 len := DBMS_LOB.GETLENGTH(fil);
    10 DBMS_LOB.READ(fil,len,1,buffer);
    11 xmlgen.resetOptions;
    12 insrow := xmlgen.insertXML('xml_doc',UTL_RAW.CAST_TO_VARCHAR2(buffer));
    13 DBMS_OUTPUT.PUT_LINE(insrow);
    14 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    15 DBMS_LOB.FILECLOSE(fil);
    16 END IF;
    17 EXCEPTION
    18 WHEN OTHERS THEN
    19 DBMS_OUTPUT.PUT_LINE('In Exception');
    20 DBMS_OUTPUT.PUT_LINE(SQLERRM(SQLCODE));
    21 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    22 DBMS_LOB.FILECLOSE(fil);
    23 END IF;
    24 end;
    25 /
    Procedure created.
    SQL> exec loadxml12
    In Exception
    BEGIN loadxml12; END;
    ERROR at line 1:
    ORA-20000: ORU-10028: line length overflow, limit of 255 bytes per line
    ORA-06512: at "SYS.DBMS_OUTPUT", line 99
    ORA-06512: at "SYS.DBMS_OUTPUT", line 65
    ORA-06512: at "CARCLUB_RW2.LOADXML12", line 20
    ORA-06512: at line 1
    null

    Could you explain what your procedure does, please. I also tried to compile it but always got error message:
    PL/SQL: SQL Statement ignored
    PLS-00385: type mismatch found at 'FIL' in SELECT...INTO
    statement
    SQL> CREATE OR REPLACE PROCEDURE loadxml12 AS
    2 fil BFILE;
    3 buffer RAW(32767);
    4 len INTEGER;
    5 insrow INTEGER;
    6 BEGIN
    7 SELECT f_lob INTO fil FROM xml_temp12 WHERE key = 1;
    8 DBMS_LOB.FILEOPEN(fil,DBMS_LOB.FILE_READONLY);
    9 len := DBMS_LOB.GETLENGTH(fil);
    10 DBMS_LOB.READ(fil,len,1,buffer);
    11 xmlgen.resetOptions;
    12 insrow := xmlgen.insertXML('xml_doc',UTL_RAW.CAST_TO_VARCHAR2(buffer));
    13 DBMS_OUTPUT.PUT_LINE(insrow);
    14 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    15 DBMS_LOB.FILECLOSE(fil);
    16 END IF;
    17 EXCEPTION
    18 WHEN OTHERS THEN
    19 DBMS_OUTPUT.PUT_LINE('In Exception');
    20 DBMS_OUTPUT.PUT_LINE(SQLERRM(SQLCODE));
    21 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    22 DBMS_LOB.FILECLOSE(fil);
    23 END IF;
    24 end;
    25 /
    Bober
    null

  • Access issues while inserting data in a table in same schema

    Hi All.
    I have a script that at first creates and then populates a table. My script used to run fine in production environment till few hours back. But all of a sudden, it is popping up error while inserting data into the table .
    Error message - "Insufficient Previlages".
    Please suggest me what may be the reasons for this kind of error.
    Thanks in advance

    Sonika wrote:
    Hi All.
    I have a script that at first creates and then populates a table. My script used to run fine in production environment till few hours back. But all of a sudden, it is popping up error while inserting data into the table .
    Error message - "Insufficient Previlages".
    Please suggest me what may be the reasons for this kind of error.
    1) something changed
    2) you are hitting a bug

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • ERROR WHILE INSERTING BLOBS AS PARAMETERS OF EXISTING STORED PROCEDURE

    I have 2 simple tables to keep large application data (as XMLDOCUMENT in one table and BLOB in another):
    SQL> desc bindata_tbl;
    Name Null? Type
    BDATA_ID NOT NULL NUMBER(10)
    BDATA NOT NULL BLOB
    SQL> desc metadata_tbl;
    Name Null? Type
    MDATA_ID NOT NULL NUMBER(10)
    MDATA NOT NULL SYS.XMLTYPE
    and stored preocedure to input new data into those tables:
    "SP_TEST_BIN_META_DATA"
    i_MetaData in METADATA_TBL.MDATA%TYPE,
    i_BinData in BINDATA_TBL.BDATA%TYPE
    as
    begin
    if i_MetaData is not null then
    insert into METADATA_TBL (MDATA_ID, MDATA)
    values (METADATA_SEQ.nextval, i_MetaData);
    end if;
    if i_BinData is not null then
    insert into BINDATA_TBL (BDATA_ID, BDATA)
    values (BINDATA_SEQ.nextval, i_BinData);
    end if;
    COMMIT;
    -- Handle exceptions
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RAISE;
    end;
    I communicate with database from .Net application using "Oracle.DataAccess 10.1.0.200 (Runtime version v1.0.3705)" component.
    Following procesure is a [simplified] examlple of the code I use, which demonstrates the errors while inserting XMLDOCUMENT and BLOB values simultaneously.
    In my application those should be quite big objects (~200 K XML and ~5-25M binary image data), but following sample keeps failing even with very small-sized objects:
    Line Number
    1          private void PureTest()
    2          {
    3               OracleConnection conn = null;
    4               OracleTransaction tx = null;
    5               OracleCommand command = null;
    6
    7               try
    8               {
    9                    // Open connection
    10                    string strConn = "Data Source=AthenaWf; User ID=AthenaWf; Password=Poseidon";
    11                    conn = new OracleConnection( strConn );
    12                    conn.Open();
    13
    14                    // Begin transaction (not sure if really needed)
    15                    tx = conn.BeginTransaction();
    16
    17                    // Create command
    18                    string strSql = "SP_TEST_BIN_META_DATA";
    19                    command = new OracleCommand();
    20                    command.Connection = conn;
    21                    command.CommandText = strSql;
    22                    command.CommandType = CommandType.StoredProcedure;
    23
    24                    // Create parameters
    25                    // 1) XmlType parameter
    26                    string strXml = "<?xml version=\"1.0\"?><configuration testValue=\"123456789\"/>";
    27                    XmlDocument xmlDoc = new XmlDocument();
    28                    xmlDoc.LoadXml( strXml );
    29                    OracleXmlType oraXml = new OracleXmlType( conn, xmlDoc );
    30                    //oraXml = null;
    31                    //
    32                    OracleParameter xmlPrm = new OracleParameter();
    33                    xmlPrm.ParameterName = "i_MetaData";
    34                    xmlPrm.Direction = ParameterDirection.Input;
    35                    xmlPrm.OracleDbType = OracleDbType.XmlType;
    36                    xmlPrm.Value = oraXml;
    37                    command.Parameters.Add( xmlPrm );
    38
    39                    // 2) Blob type
    40                    byte[] buf = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    41                    OracleBlob oraBlob = new OracleBlob( conn, true );
    42                    //oraBlob.Write( buf, 0, buf.Length );
    43                    oraBlob = null;
    44                    //
    45                    OracleParameter blobPrm = new OracleParameter();
    46                    blobPrm.ParameterName = "i_BinData";
    47                    blobPrm.Direction = ParameterDirection.Input;
    48                    blobPrm.OracleDbType = OracleDbType.Blob;
    49                    blobPrm.Value = oraBlob;
    50                    command.Parameters.Add( blobPrm );
    51
    52
    53                    // Execute command finally
    54                    command.ExecuteNonQuery();
    55                    tx.Commit();
    56               }
    57               catch( Exception ex )
    58               {
    59                    // Clean-up
    60                    if( command != null )
    61                    {
    62                         command.Dispose();
    63                    }
    64                    if( tx != null )
    65                    {
    66                         tx.Dispose();
    67                    }
    68                    if( conn != null )
    69                    {
    70                         conn.Dispose();
    71                    }
    72
    73                    // Display error message
    74                    MessageBox.Show( ex.Message, "Error" );
    75               }
    76          }
    If I try insert only XMLDOCUMENT object (lines 30, 42 are commented out, 43 IS NOT) - everything is OK.
    If I try to insert only BLOB object (lines 30, 42 are NOT COMMENTED OUT, line 43 is commented out) - everything is OK again.
    If I try to insert them both having some values (lines 30, 43 are commented out, 42 is not commented out) - it fails right on "command.ExecuteNonQuery();" (line 54)
    with the following exception:
    "ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%]".
    Even when I nullify oraBlob before assigning it to OracleParameter value (line 30 is commented out, line 42 and 43 are not) I have the same exception.
    XMLDOCUMENT and DLOB data logically are very coupled objects (in my application), so I really want to insert them simultaneously in one stored procedure in transactional way.
    Is it bug of drivers, server, .net environment, or I miss something in implementation?
    PS. In some articles on Oracle web and in MSDN site I found a mention about necessity of wrapping all write/update operations in a transaction, while working with temporary LOBs. I use it here, but it does not look like changing anything.

    Hello,
    I tested your code with the 10.1.0.4.0 ODP and 10.1.0.4.0 Client and it worked fine.
    Can you please apply the 10.1.0.4.0 patches for both ODP and client to see if this resolves the issue for you.
    Here is the output from the same execution of the ODP application you provided as a testcase. These rows were inserted at the same time when I executed the application and passed the data as parameters to the SP you provided.
    Results of Testing with 10.1.0.4.0
    ==========================
    SQL> select count(*) from BINDATA_TBL
    2 ;
    COUNT(*)
    1
    SQL> select count(*) from METADATA_TBL;
    COUNT(*)
    1
    SQL> select dbms_lob.getlength(bdata) from BINDATA_TBL;
    DBMS_LOB.GETLENGTH(BDATA)
    10
    SQL> select mdata from METADATA_TBL;
    MDATA
    <?xml version="1.0"?><configuration testValue="123456789" />

  • Error while Inserting DB

    Hi,
    We are getting the below error while inserting a record in to DB. It is not occuring always, as sometimes the transactions are passing and some times it is throwing the below error. Any one faced this issue and have solution for the same?
    The invocation resulted in an error: <jca-transport-application-error xmlns="http://www.bea.com/wli/sb/transports/jca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <jca-transport-error-message>Invoke JCA outbound service failed with application error</jca-transport-error-message>
    <jca-runtime-fault-detail>
    <eis-error-code xsi:nil="true"/>
    <eis-error-message xsi:nil="true"/>
    <exception>com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceProcessor_1.00/src/osb/resources/wsdls/Service_DB_Write_1.00 [ ServiceDBAdp_ptt::insert(SampleMiddlewareLogCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    ; nested exception is:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invokeOneWay(JCATransportOutboundOperationBindingServiceImpl.java:114)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendOneWay(JCATransportEndpoint.java:191)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:168)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:598)
    at sun.reflect.GeneratedMethodAccessor900.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at $Proxy142.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:380)
    at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:79)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:137)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:135)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:140)
    at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceProcessor_1.00/src/osb/resources/wsdls/Service_DB_Write_1.00 [ ServiceDBAdp_ptt::insert(SampleMiddlewareLogCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    ; nested exception is:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.post(JCABindingReferenceImpl.java:197)
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invokeOneWay(JCATransportOutboundOperationBindingServiceImpl.java:109)
    ... 37 more
    Caused by: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceProcessor_1.00/src/osb/resources/wsdls/Service_DB_Write_1.00 [ ServiceDBAdp_ptt::insert(SampleMiddlewareLogCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    ; nested exception is:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:662)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:353)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:312)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:291)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:345)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.post(JCABindingReferenceImpl.java:195)
    ... 38 more
    Caused by: BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:682)
    at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:648)
    at oracle.tip.adapter.db.exceptions.DBResourceException.outboundWriteException(DBResourceException.java:696)
    at oracle.tip.adapter.db.DBInteraction.executeOutboundWrite(DBInteraction.java:1056)
    at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:240)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:529)
    ... 43 more
    Caused by: java.lang.ArrayIndexOutOfBoundsException</exception>
    </jca-runtime-fault-detail>
    </jca-transport-application-error>.
    Thanks

    Hi
    Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array you are sending.
    make sure your table can able to recieve that array of data

  • Wm_Valid: Fail to convert to internal representation error while inserting

    Hi,
    I'm trying to execute an insert via XmlCommand. The table is created with this statement:
    create table testtable4 (testtable4_pk number, mydate date, myts timestamp with time zone, wm_valid wm_period);
    I have a problem while inserting on a simple table with wm_period field. The c# code is the following:
    OracleConnection oraConnection;
    OracleCommand insertCommand;
    string[] KeyColumnsList = null;
    string[] UpdateColumnsList = null;
    string xml1 = "<?xml version=\"1.0\"?>\n" +
    "<ROWSET>\n" +
    "<MYROW num = \"1\">\n" +
    "<TESTTABLE4_PK>1</TESTTABLE4_PK><MYDATE>2012-01-20T00:00:00.00000</MYDATE><MYTS>01-01-11T00:00:00.000000000 +00:00</MYTS>" +
    "</MYROW>\n" +
    "</ROWSET>\n";
    string xml2 = "<?xml version=\"1.0\"?>\n" +
    "<ROWSET>\n" +
    "<MYROW num = \"2\">\n" +
    "<TESTTABLE4_PK>2</TESTTABLE4_PK><MYDATE>2012-01-20T00:00:00.00000</MYDATE><MYTS>01-01-11T00:00:00.000000000 +00:00</MYTS><WM_VALID><VALIDFROM>01-01-11T00:00:00.000000000 +00:00</VALIDFROM></WM_VALID>" +
    "</MYROW>\n" +
    "</ROWSET>\n";
    KeyColumnsList = new string[1];
    KeyColumnsList[0] = "TESTTABLE4_PK";
    UpdateColumnsList = new string[4];
    UpdateColumnsList[0] = "TESTTABLE4_PK";
    UpdateColumnsList[1] = "MYDATE";
    UpdateColumnsList[2] = "MYTS";
    UpdateColumnsList[3] = "WM_VALID";
    try
    string ConnString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + host + ")(PORT=" + port + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" + sid + ")));User Id=" + username + ";Password=" + password + ";";
    oraConnection = new OracleConnection(ConnString);
    oraConnection.Open();
    using (OracleCommand cmd = new OracleCommand())
    cmd.Connection = oraConnection;
    cmd.CommandText = "alter session set NLS_DATE_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SS.SSSSS'";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "alter session set NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SS.SSSSS'";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "alter session set NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SSXFF TZH:TZM'";
    cmd.ExecuteNonQuery();
    insertCommand = new OracleCommand();
    insertCommand.Connection = oraConnection;
    insertCommand.XmlCommandType = OracleXmlCommandType.Insert;
    insertCommand.XmlSaveProperties.KeyColumnsList = KeyColumnsList;
    insertCommand.XmlSaveProperties.RowTag = "MYROW";
    insertCommand.XmlSaveProperties.Table = "TESTTABLE4";
    insertCommand.XmlSaveProperties.UpdateColumnsList = UpdateColumnsList;
    insertCommand.XmlSaveProperties.Xslt = null;
    insertCommand.XmlSaveProperties.XsltParams = null;
    //this works
    insertCommand.CommandText = xml1;
    insertCommand.ExecuteNonQuery();
    //this fails
    insertCommand.CommandText = xml2;
    insertCommand.ExecuteNonQuery();
    insertCommand.Dispose();
    oraConnection.Close();
    oraConnection.Dispose();
    catch (Exception err)
    this.WriteLogErr("ERROR: " + err.Message);
    With the first ExecuteNonQuery I attempt an insert of a data value and a timestamp with timezone value. The execution is ok (xml1).
    When the second ExecuteNonQuery is run (with the value of wm_valid), the execution fails with this error:
    ERROR: ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: Fail to convert to internal representation: 01-01-11T00:00:00.000000000 +00:00' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 111
    ORA-06512: at line 1
    The stored procedure at row 111 calls this Java method:
    oracle.xml.sql.dml.OracleXMLStaticSave.insertXML(int, java.lang.String) return int
    The structure of complex data type wm_period is:
    CREATE OR REPLACE TYPE wm_period AS OBJECT (
    validfrom TIMESTAMP WITH TIME ZONE,
    validtill TIMESTAMP WITH TIME ZONE);
    The problem is: I am able to insert a timestamp with timezone value (myts) but I'm not able to insert a wm_valid that contains two values of the same type...
    This works: <MYTS>2011-01-01T00:00:00.00000</MYTS>
    This fails: <WM_VALID><VALIDFROM>2011-01-01T00:00:00.00000</VALIDFROM></WM_VALID>
    I also tried to change the format of NLS_TIMESTAMP_TZ_FORMAT with a lot of various setup, but nothing changed.
    Thanks in advance for your precious help.
    Best Regards,
    Mario.

    Hi jschell ...thnx for ur reply......
    the getString(2) parameter is just avarchar which
    return the error from the procedure, if its ok,then
    the query is executed properly..its just a check I've
    kept to jump into the next step.If the status is OK,
    then I'm retrieving the values from the cursor. I'm
    getting right value for this parameter.I wasn't questioning the logic. I understand what you are doing.
    However JDBC drivers can have problems when items are retrieved out of order.
    You might also try switching driver types. If the thin works and oci doesn't (or visa-versa) then you know it is a driver problem and you will just have to try a work around.

Maybe you are looking for

  • Ref cursors pls help

    hi, what is ref cursor, what is its advantage over normal cursor. How we can pass a cursor as an argument to a procedure?? How we return a cursor from a procedure??

  • Possible for Oracle to consider constraints when using bind variable?

    Consider the following table with a check constraint listing the possible values of the column create table TEST_TABLE( my_column varchar2(10)); insert into TEST_TABLE select 'VALUE1' from dba_objects; alter table TEST_TABLE add constraint TEST_TABLE

  • Add on connection error

    hello experts, i have some problem in my client pc .my client pc face some problem at the time of add a add on .when he add the document a error occur "u r not connect to the company" while i m doing well every thing on my pc i can add the document o

  • Datasource of HR Tools & Reporting Management

    Dear all,      I am activating business content in the version of sap BI 7.3.  I want to know the datasources of HR module which includes Tools & Reporting  (HR Tools and Reporting in HR Management), HR Tools(Enterprise content management).  Please s

  • The Report Abuse Function

    Has anyone else had trouble with the Report Abuse function? Recently I attempted to write an abuse report, but received an error message upon submission. How does one report abuse in this forum? Roddy