Error in inserting Japanese charcters into XMLDB -[b]Urgent[/b]

Hi,
I have set database charcterset as 'UTF-8' and I saved the xml file in server with 'UTF-8' encoding, the inerstion works for english, but if I inlucde japanese charcters I get the following error (please find below), we use Oracle 9i for developement.Since this is very urgent and critical,kindly help us, we are thankful for the earlier responses got for our diferent queries.
This is XML Schema we registered.
XML SCHEMA:
==========
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema id="Dp_Pref_mst" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="PrefMaster">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="StateDetails">
<xs:complexType>
<xs:sequence>
<xs:element name="Pref_code" type="xs:string" minOccurs="0" />
<xs:element name="Pref_desc" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Schema registration:
===================
begin
dbms_xmlschema.registerSchema( 'sample.xsd', getFileContent('sample.xsd','DP','UTF8'));
end;
Table creation :
===============
Create table states of XMLType XMLSCHEMA "sample.xsd" ELEMENT "PrefMaster";
This is XML we try to insert
XML :
====
<?xml version="1.0" encoding="UTF-8"?>
<PrefMaster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sample.xsd">
<StateDetails>
<Pref_code>1</Pref_code>
<Pref_desc>小川鐵工所</Pref_desc>
</StateDetails>
<StateDetails>
<Pref_code>2</Pref_code>
<Pref_desc>Honshu</Pref_desc>
</StateDetails>
<StateDetails>
<Pref_code>3</Pref_code>
<Pref_desc>Nagasaki</Pref_desc>
</StateDetails>
<StateDetails>
<Pref_code>4</Pref_code>
<Pref_desc>Osaka</Pref_desc>
</StateDetails>
</PrefMaster>
CREATE OR REPLACE FUNCTION getFileContent(filename varchar2,directoryName varchar2 default USER,
charset varchar2 default 'AL32UTF8')
return CLOB
is
fileContent CLOB := NULL;
file bfile := bfilename(directoryName,filename);
dest_offset number := 1;
src_offset number := 1;
lang_context number := 0;
conv_warning number := 0;
begin
DBMS_LOB.createTemporary(fileContent,true,DBMS_LOB.SESSION);
DBMS_LOB.fileopen(file, DBMS_LOB.file_readonly);
DBMS_LOB.loadClobfromFile
fileContent,
file,
DBMS_LOB.getLength(file),
dest_offset,
src_offset,
nls_charset_id(charset),
lang_context,
conv_warning
DBMS_LOB.fileclose(file);
return fileContent;
end;
our insert statement
====================
Insert into states values (XMLType(getFileContent('sample.xml','DP','UTF8')));
The error we are getting
=======================
Error
=====
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00210: expected '<' instead of '¿'
Error at line 1
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
Any help in resolving this would be highly appriciated.
Thank you
Kathiresan.

COMMIT is an SQL command and I don't think it will have any effect on you dataset. I think this should work:
FORM f_write_aufk.
  CLEAR: gv_error, gv_reccnt, gv_t_amt, gv_t_qty,
  gv_t_docs, gv_previous_rec_id, gv_passcnt.
*--------Open in compress mode ----------------------------------------*
  DATA: gc_commit dafault '1000'.
  OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT FILTER
          'compress'.
  IF sy-subrc = 0.
    SELECT aufnr auart autyp ernam aenam aedat ktext
    FROM aufk INTO gs_aufk
    WHERE aufnr IN s_aufnr.
      PERFORM f_transfer_dataset
        USING p_f_aufk gs_aufk CHANGING gv_error.
    ENDSELECT.
    PERFORM f_closedataset USING p_f_aufk CHANGING gv_error.
  ENDIF.
ENDFORM.                    "F_WRITE_AUFK
Rob

Similar Messages

  • Error while inserting .doc file into CLOB object in oracle

    hello everybody ,
    i am trying to insert .doc file into clob column in oracle database.i am using oracle 8i. But i am getting error saying
    ORA-01461: can bind a LONG value only for insert into a LONG column
    i have no clue.
    i am pasting code here
    please help me out.
    regards
    darshan
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.Reader;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    public class InsertingClob {
    public static void main(String[] args) {
    File f = new File("E:\\dar
    sowres.doc");
    int len = (int) f.length();
    System.out.println(len);
    Connection conn = null;
    PreparedStatement ps = null;
    try {
    FileReader fr = new FileReader(f);
    String FILE_INSERT_QUERY = "INSERT INTO RESUMED VALUES(?,?)";
    conn = JDBCUtility.getConnection();
    ps = conn.prepareStatement(FILE_INSERT_QUERY);
    ps.setString(1,"1");
    ps.setCharacterStream(2,fr,len);
    int result = ps.executeUpdate();
    if(result ==1) {
    System.out.println("file has been successfully inserted into the db");;
    }else {
    System.out.println("not inserted");
    }catch (Exception e) {
    e.printStackTrace();
    and the error is
    java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
    at InsertBlob.main(InsertBlob.java:21)
    java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column

    You may have one of a few errors going for you there:
    The error says your column in Oracle is a Long not a CLOB, if it is, then make your column a CLOB.
    CLOB's are not suppored in all environments and/or all interfaces (specifically Windoz ODBC has a problem).
    I believe a DOC (Windoz MS-Word) file is a BLOB, due to formatting characters in the file.
    I had a very similar error using Access and trying to do this, but changing to SAS fixed the problem. It could very well be that your version of ODBC/JDBC drivers does not support it properly.

  • Javascript Error after insert a Webpart into Page

    Hi everone, have you ever experienced getting error just after inserting a Webpart into page? I'm using Sharepoint Server 2013. These steps what I did:
    1. Create new page
    2. Click 'Add Webpart'
    3. Choose the webpart and click OK
    4. Webpart showed on page (simple table form)
    5. All ribbon controls are disable and there is javascript error on browser's console with message:
    SCRIPT1004: Expected ';' 
    Picture: http://i(dot)imgur(dot)com/UBM91b3(dot)png
    That line is not from my codes, it's automatically added by sharepoint after inserting webpart. Thanks for anyone who has workaround for this..
    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContractReviewWP.ascx.cs" Inherits="Mitrais.SP2013.ContractManagement.WebParts.ContractReviewWP.ContractReviewWP" %>
    <script type="text/javascript">
    $(function () {
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) {
    //datepicker
    $(".datePicker").datepicker();
    </script>
    <div id="divMain">
    <asp:UpdatePanel ID="upContract" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <asp:HiddenField ID="currentStage" runat="server" />
    <h1>
    <asp:Label ID="lblFormTitle" runat="server" Text="Request"></asp:Label>
    Contract Review/Approval
    </h1>
    <div class="divControl">
    <table>
    <tr>
    <td>
    <asp:Label ID="lblTitle" runat="server" Text="Title"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="requiredValidatorTitle" runat="server" ErrorMessage="*" ControlToValidate="txtTitle" ValidationGroup="SubmitValidation"></asp:RequiredFieldValidator>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblRequestType" runat="server" Text="Request Type"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:DropDownList ID="ddlRequestType" runat="server" CssClass="dropdownRequestType" OnSelectedIndexChanged="ddlRequestType_SelectedIndexChanged" AutoPostBack="true">
    </asp:DropDownList>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblDocumentType" runat="server" Text="Document Type"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:DropDownList ID="ddlDocumentType" runat="server">
    </asp:DropDownList>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblRequestedBy" runat="server" Text="Requested By"></asp:Label>
    </td>
    <td>:</td>
    <td class="tdPeoplePick">
    <SharePoint:PeopleEditor Enabled="false" ID="pplRequestedBy" runat="server" AllowEmpty="false" MultiSelect="false" SelectionSet="User" />
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblRequiredDate" runat="server" Text="Required Date"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="dtRequiredDate" runat="server" CssClass="datePicker"></asp:TextBox>
    <asp:RequiredFieldValidator ID="requiredValidatorRequiredDate" runat="server" ControlToValidate="dtRequiredDate" ErrorMessage="*" ValidationGroup="SubmitValidation"></asp:RequiredFieldValidator>
    </td>
    </tr>
    <asp:Panel ID="pnlRequestedDate" runat="server">
    <tr>
    <td>
    <asp:Label ID="lblRequestedDate" runat="server" Text="Requested Date"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="dtRequestedDate" runat="server" CssClass="datePicker"></asp:TextBox>
    </td>
    </tr>
    </asp:Panel>
    <tr>
    <td>
    <asp:Label ID="lblDescription" runat="server" Text="Description"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="txtDescription" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredValidatorDescription" runat="server" ControlToValidate="txtDescription" ErrorMessage="*" ValidationGroup="SubmitValidation"></asp:RequiredFieldValidator>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblClientCode" runat="server" Text="Client Code"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="txtClientCode" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="requiredValidatorClientCode" runat="server" ControlToValidate="txtClientCode" ErrorMessage="*" ValidationGroup="SubmitValidation"></asp:RequiredFieldValidator>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblSSOCode" runat="server" Text="SSO Code"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="txtSSOCode" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="requiredValidatorSSOCode" runat="server" ControlToValidate="txtSSOCode" ErrorMessage="*" ValidationGroup="SubmitValidation"></asp:RequiredFieldValidator>
    </td>
    </tr>
    <asp:Panel ID="panelCPC" runat="server">
    <tr>
    <td>
    <asp:Label ID="lblCPC" runat="server" Text="CPC"></asp:Label></td>
    <td>:</td>
    <td><asp:TextBox ID="txtCPC" runat="server"></asp:TextBox></td>
    <asp:CustomValidator ID="customValidatorCPC" runat="server" ControlToValidate="txtCPC" ErrorMessage="*" ValidationGroup="SubmitValidation"></asp:CustomValidator>
    </tr>
    </asp:Panel>
    <tr>
    <td>
    <asp:Label ID="lblValue" runat="server" Text="Value (US$)"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:DropDownList ID="ddlValue" runat="server"></asp:DropDownList>
    </td>
    </tr>
    <asp:Panel ID="panelCRM" runat="server">
    <tr>
    <td><asp:Label ID="lblCRMUpdated" runat="server" Text="CRM Updated"></asp:Label></td>
    <td>:</td>
    <td>
    <asp:CheckBox ID="checkBoxCRMUpdated" runat="server" />
    </td>
    </tr>
    </asp:Panel>
    <tr>
    <td>
    <asp:Label ID="lblAgreement" runat="server" Text="Agreement Authorisation Level"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:DropDownList ID="ddlAgreement" runat="server"></asp:DropDownList>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblAssignedTo" runat="server" Text="Assigned To"></asp:Label>
    </td>
    <td>:</td>
    <td class="tdPeoplePick">
    <SharePoint:PeopleEditor ID="pplAssignedTo" runat="server" AllowEmpty="true" MultiSelect="false" SelectionSet="User" />
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblStatus" runat="server" Text="Status"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="dropdownStatus"></asp:DropDownList>
    </td>
    </tr>
    <asp:Panel ID="panelStartDate" runat="server">
    <tr>
    <td>
    <asp:Label ID="lblStartDate" runat="server" Text="Start Date"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="txtStartDate" runat="server" CssClass="datePicker"></asp:TextBox>
    </td>
    </tr>
    </asp:Panel>
    <asp:Panel ID="panelEndDate" runat="server">
    <tr>
    <td>
    <asp:Label ID="lblEndDate" runat="server" Text="End Date"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:TextBox ID="txtEndDate" runat="server" CssClass="datePicker"></asp:TextBox>
    </td>
    </tr>
    </asp:Panel>
    <asp:Panel ID="pnlTemplate" runat="server">
    <tr id="rowTemplate">
    <td>Selected Template</td>
    <td>:</td>
    <td>
    <span id="selectedTemplateSpan"></span>
    <asp:HiddenField ID="hdnSelectedTemplate" runat="server" />
    <asp:Button ID="buttonLookupTemplate" runat="server" Text="Choose Template" CssClass="buttonTemplate" /></td>
    </tr>
    </asp:Panel>
    <tr>
    <td>
    <asp:Label ID="lblLatestDocument" runat="server" Text="Latest Document"></asp:Label>
    </td>
    <td>:</td>
    <td>
    <asp:HyperLink ID="linkLatestDocument" runat="server"></asp:HyperLink>
    <asp:FileUpload ID="fuLatestDocument" runat="server" />
    <asp:CustomValidator ControlToValidate="fuLatestDocument" OnServerValidate="LatestDocument_ServerValidate"
    ErrorMessage="The document with same name already exist, please use different name." SetFocusOnError="true" runat="server" ForeColor="Red" />
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblTaggedPerson" runat="server" Text="Person Tagged">
    </asp:Label>
    </td>
    <td>:</td>
    <td class="tdPeoplePick">
    <SharePoint:PeopleEditor ID="peopleTaggedPerson" runat="server" MultiSelect="true" AllowEmpty="true" SelectionSet="User" />
    </td>
    </tr>
    </table>
    </div>
    <div>
    <table class="tbButton">
    <tr>
    <td></td>
    <td>
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" OnClientClick="PreSubmit();" ValidationGroup="SubmitValidation"/>
    </td>
    <td>
    <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click"/>
    </td>
    <asp:TextBox ID="txtCheck" runat="server" Text="Add" Visible="false"></asp:TextBox>
    <asp:TextBox ID="txtTempID" runat="server" Style="visibility: hidden;"></asp:TextBox>
    <asp:TextBox ID="txtIsAddNew" runat="server" Text="true" Visible="false"></asp:TextBox>
    </tr>
    </table>
    </div>
    <div id="tabContainer">
    <div class="tabs">
    <ul>
    <li id="tabHeader_1">Comment</li>
    <li id="tabHeader_2">Document Template History</li>
    </ul>
    </div>
    <div class="tabscontent">
    <div class="tabpage" id="tabpage_1">
    <div id="phComment" runat="server"></div>
    </div>
    <div class="tabpage" id="tabpage_2">
    <div id="phDocHistory" runat="server" />
    </div>
    </div>
    </div>
    </ContentTemplate>
    <Triggers>
    <asp:PostBackTrigger ControlID="btnSubmit" />
    </Triggers>
    </asp:UpdatePanel>
    <asp:HiddenField ID="hfComment" runat="server" />
    </div>
    <script type="text/javascript">
    $("#<%= upContract.ClientID %>").ready(function () {
    setTimeout(MitraisCM.contract(), 5000);
    </script>

    Hi,                                                             
    Per my knowledge, such error might occurred when we modify the HTML code of the page, through SharePoint Designer or Content Editor Web Part.
    What web part you added into the page?
    What if you create another new page and insert a list into it, will the error occurs?
    Feel free to reply with the test result if the issue still exists.
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to get ALL validate-errors while insert xml-file into xml_schema_table

    How to get all validate-errors while using insert into xml_schema when having a xml-instance with more then one error inside ?
    Hi,
    I can validate a xml-file by using isSchemaValid() - function to get the validate-status 0 or 1 .
    To get a error-output about the reason I do validate
    the xml-file against xdb-schema, by insert it into schema_table.
    When more than one validate-errors inside the xml-file,
    the exception shows me the first error only.
    How to get all errors at one time ?
    regards
    Norbert
    ... for example like this matter:
    declare
         xmldoc CLOB;
         vStatus varchar
    begin     
    -- ... create xmldoc by using DBMS_XMLGEN ...
    -- validate by using insert ( I do not need insert ;-) )      
         begin
         -- there is the xml_schema in xdb with defaultTable XML_SCHEMA_DEFAULT_TABLE     
         insert into XML_SCHEMA_DEFAULT_TABLE values (xmltype(xmldoc) ) ;
         vStatus := 'XML-Instance is valid ' ;
         exception
         when others then
         -- it's only the first error while parsing the xml-file :     
              vStatus := 'Instance is NOT valid: '||sqlerrm ;
              dbms_output.put_line( vStatus );      
         end ;
    end ;

    If I am not mistaken, the you probably could google this one while using "Steven Feuerstein Validation" or such. I know I have seen a very decent validation / error handling from Steven about this.

  • Error while inserting attachements data into  FND_LOBS

    Hi,
    I m trying to insert data into fnd_lobs using below, I didn't declare any variables for below.
    I m getting many compilation erros for below insert, Could you let me know if i have to declare any of below values.
    INSERT INTO fnd_lobs
               (file_id, file_name, file_content_type, upload_date,expiration_date, program_name, program_tag, file_data,LANGUAGE, oracle_charset, file_format)
        VALUES (l_media_id, l_filename,p_file_content_type,SYSDATE,NULL, 'FNDATTCH', NULL, EMPTY_BLOB (),'US', 'UTF8', 'binary')
               RETURNING file_data
               INTO x_blob;
    -- Load the file into the database as a BLOB
        DBMS_LOB.OPEN (fils, DBMS_LOB.lob_readonly);
        DBMS_LOB.OPEN (x_blob, DBMS_LOB.lob_readwrite);
        DBMS_LOB.loadfromfile (x_blob, fils, blob_length);   -- Close handles to blob and file
        DBMS_LOB.CLOSE (x_blob);
        DBMS_LOB.CLOSE (fils);
    Thanks.

    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

  • 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>

  • 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

  • Insert XMLTYPE data into CLOB column

    Hi,
    I am trying to insert XMLTYPE datatype column value into the CLOB datatype column.
    I get an error -
    ORA - 00932: Inconsistent datatypes: expected CLOB got -
    How do I insert xml type data into clob?
    Thanks!

    Here is my sql code:
    I have a view :
    create or replace view test_view
    (id,
    code,
    desc)
    as select
    id,
    code,
    xmlroot(xmlelement("empname", ename), version '1.0') as desc
    from employee;
    I have a table emp_details_table. The columns in the emp_details_table are
    ID number,
    CODE varchar2,
    EMP_DETAILS CLOB
    I am tring to insert the 'test_view' data into the 'emp_details_table' and I get an error cannot insert xmltype data into clob.
    insert into emp_details_table
    (ID , CODE, EMP_DETAILS)
    select
    (ID, CODE, DESC) from test_view;
    Thanks.

  • Getting Error in inserting the data in ADF

    I am getting the below Error while inserting the data into Essbase in ADF:
    <Error> <Net> <BEA-000902> <Duplicate expression found in the system property http.nonProxyHosts: localhost|localhost.localdomain|127.0.0.1|::1|sgajulap-in|sgajulap-in.>
    Could you please give any solution to resolve this Error.
    Thanks.
    Swathi

    check below links:
    http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
    http://www.rgagnon.com/javadetails/java-0085.html
    // Get a system property
    String dir = System.getProperty("user.dir");
    // Set a system property
    String previousValue = System.setProperty("application.property", "newValue");

  • Error Msg - There is no disk in the drive. Please insert a disk into drive

    Okay, I have been using itunes w/the same ipod for quite a while. Recently my computer died so I just bought a new one. Before getting rid of the old one I logged onto windows and moved all my files to an external drive. I am now using this external drive for all my docs, music, etc. on the new computer and did a "move" of "my documents" (including "my music" contained therein). I installed itunes and my ipod using the software disks that came with my ipod. I inserted the ipod and it worked fine but it did make me associate the ipod with this new computer and had to reinstall all my music on my ipod. So far so good. Then when I went to play a purchased song itunes informed me that I had to upgrade to the most recent version of itunes to play the song. I then dowloaded the update and installed it. After installing the updated itunes, itunes then basically re-associated itself with my ORIGINAL profile (I'm not sure if profile is the correct word to use here) and once again deleted everything on my ipod and reinstalled all my songs. Now this is where I began having this problem. Now, everytime I run itunes (with or without my ipod connected) I get 12 of the above-mentioned error messages. The top of the box says "Windows - No Disk" and the main part of the box says "There is no disk in the drive. Please insert a disk into drive." I am given the choice of "Cancel" "Try Again" and "Continue." I hit cancel for a total of 12 times. I've tried with disks in both of my cd/dvd drives and get the same message. The funny thing is that I have about 12 or so card readers (scene by the computer as drives) and I'm thinking that maybe itunes is trying to access those drives or something, but I'm not sure. So, that's it in a nutshell. Any help by someone w/knowledge of this issue would be greatly appreciated. Thanks.

    This can also be caused in iTunes 7 by "dead tracks": songs that iTunes is expecting to find in a certain place but the song file isn't there.
    I recently upgraded to version 7 and got this message every time I started iTunes. I used the iTunes COM SDK for Windows with JScript to find all the dead tracks in my library. Then I fixed them by either deleting them from the library or else correcting the library's idea of where the song file was. Once I did this the message went away.
    Another way to look for dead tracks is to parse the iTunes library XML file and look for invalid file paths. I did this in Perl without too much trouble.
    (I'm cross-posting this to several threads about the same problem.)

  • Timeout expired error when inserting into a mirrored server

    We have 3 SQL Server 2012 servers.
    All 3 SQL Server has the same database, ie myDB.
    In 2 of the servers (say server A and B), myDB is mirrored, and on the 3rd server myDb is NOT mirrored.
    When the program calls a stored procedure to insert a record into a table in the database, on the mirrored servers (server A and B) sometimes it takes up to 7 seconds and gave an error "Timeout expired.  The timeout period elapsed prior
    to completion of the operation or the server is not responding.  This failure occured while attempting to connect to the Principle server." This doesn't happen all the time, but happens often enough throughout the day.
    The 3rd server (that is NOT mirrored) never gives this Timout expired error.
    Will mirrored server cause slowness in writing, thus causes the Timeout expired error ?
    Thank you.

    Since we can live with some missing data, I think we should use asynchronous mirroring instead of synchronous, do you agree ?
    That may be an options, provided that you are on Enterprise Edition. As I recall, Standard Edition only has synchronhous mirroring.
    There are caveats with asynchronous mirroring. One is data loss in case of a failover, which you say that you can live with. There may be more caveats, though. Unfortunately, since my role is more of a developer than a DBA, I'm not too well versed in
    the details. Maybe someone else can fill in?
    Can a firewall issue cause mirror latency, that in turn causes the delay in writing to the principal database ?
    Firewalls and other network hiccups certainly can cause a latency.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Error While Inserting Data into table using OAF

    Hi Experts,
    I am learning OAF; i am trying into insert the data into table using OAF. I followed the below procedure.
    My table(OLF_TEST_TBL) Columns:
    EmpID (Number), Ename(VARCHAR2 100), Sal Number, and who columns.
    1. created Application Module (AM).
    package: oracle.apps.mfg.simplepg.server
    name: oaf_test_tbl_am
    2. created simple page
    name:EmployeePG
    package:oracle.apps.mfg.simplepg.webui
    3. Assigned the Application Module to Page
    4. Created Entity Object(EO)
    name:oaf_test_tbl_eo
    package:oracle.apps.mfg.simplepg.schema.server
    schema:apps
    table:OLF_TEST_TBL
    note:
    1. EMPID column is selected as primary key
    2. selected create method, remove method and validation method.
    3.checked generate default view object
    VO:
    name:olf_test_tbl_vo
    note: Entity Object was assigned to VO
    Coming To page:
    page main region:EmployeeMainRN
    1.under main region i created one more region using wizard
    selected AM and VO, region style-default single column
    2. under main region i created one more region
    region style- pagebuttonbar, ID:pagebutoonsRN
    3. under pagebuttonRN, created two submit buttons(ID:SUBMIT, ID:CANCEL).
    In AM java page:
    created a method to insert row and for commit.
    Insert Method:
    public void insertrow(){
    OAViewObject vo=(OAViewObject)getoaf_test_tbl_vo1();
    if(!vo.isPreparedForExecution()){
    vo.executeQuery();
    Row row=vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    Commit Method:
    public void savaDataTooaftesttable(){
    getDBTransaction().commit();
    In EmployeeMainRN, created a controller.
    In this controller process request method, 'insertrow' method was called.
    import oracle.apps.fnd.framework.OAApplicationModule;
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    if (!pageContext.isFormSubmission())
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("insertrow");
    To commit the transaction when SUBMIT button pressed, commit method was called in process form request method.
    import oracle.apps.fnd.framework.OAViewObject;
    public void processformRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("SUBMIT") != null)
    am.invokemethod("savaDataTooaftesttable");
    Error After clicking the submit button_
    I ran the page, page was opened successfully. Once i enter data and click submit button, it's giving the following error.
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example). If the browser's navigation buttons were not used, this error could have been caused by coding mistakes in application code. Please check Supporting the Browser Back Button developer guide - View Object Primary Key Comparison section to review the primary causes of this error and correct the coding mistakes.
    Cause:
    The view object oaf_test_tbl_am.oaf_test_tbl_vo1700_oaf_test_tbl_vo1_practice_test_prc1_oracle_apps_mfg_simplepg_server_oaf_test_tbl_am.oaf_test_tbl_vo1 contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    Experts, Kindly help me why i am getting this error.
    Awating your replies.
    Thanks in advance.

    If you dont want to create message. You can throw exception like below as well
              throw new OAException("Emp Id is "+empId+" and employee name is "+empName, OAException.CONFIRMATION);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error while inserting into ms access using jsp

    i am using the following code to insert values from textboxes into access database
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(url);
              Statement stmt=con.createStatement();
              //ResultSet rs = null;
              //String sql = ("INSERT INTO co-ords VALUES ('" + nam + "','" + lat + "','" + lon + "','"+ latm +"','"+ lonm +"','"+ latmd +"','"+ lonmd +"','"+ latms +"','"+ lonms +"') ");
              String sql = "INSERT INTO co-ords (nam ,lat , lon , latm ,lonm , latmd , lonmd ,latms , lonms) VALUES ('" + nam + "','" + lat + "','" + lon + "','"+ latm +"','"+ lonm +"','"+ latmd +"','"+ lonmd +"','"+ latms +"','"+ lonms +"') ";
              out.println(sql);
              stmt.executeUpdate(sql);
    the output i get is
    INSERT INTO co-ords (nam ,lat , lon , latm ,lonm , latmd , lonmd ,latms , lonms) VALUES ('cck','28.656529681148545','77.23440170288086','28','77','39','14','23.508','3.8472') Exception:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    can somebody help me?

    Simple,
    Some error in your query right. Unable to understand Quotation stuff.
    Well understand it properly else error will follow forever :)
    Without String, Straight Away Values
    stmt1.executeUpdate("insert into Login_Details values('Example','Exmaple')");This is the query with Login_Id Pass_Word String containing the value
    stmt1.executeUpdate("insert into Login_Details values('"+Login_Id+"','"+Pass_Word+"')");Then storing sql as string and pass it in executeUpdate(sql)
    String sql="insert into Login_Details values ('example','example') "String + Values in String
    String sql="insert into Login_Details values ('"+example+"','"+example+"') "Just first it . Hope this reply solve ur SQL EXCEPTIONG
    Sachin Kokcha

  • Error inserting a row into a table with identity column using cfgrid on change

    I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
    also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
    update table (xxx,xxx,xxx)
    values (uu,uuu,uu)
         My component
    <!--- Edit a Media Type  --->
        <cffunction name="cfn_MediaType_Update" access="remote">
            <cfargument name="gridaction" type="string" required="yes">
            <cfargument name="gridrow" type="struct" required="yes">
            <cfargument name="gridchanged" type="struct" required="yes">
            <!--- Local variables --->
            <cfset var colname="">
            <cfset var value="">
            <!--- Process gridaction --->
            <cfswitch expression="#ARGUMENTS.gridaction#">
                <!--- Process updates --->
                <cfcase value="U">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                    <cfquery datasource="#application.dsn#">
                    UPDATE SP.MediaType
                    SET #colname# = '#value#'
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <!--- Process deletes --->
                <cfcase value="D">
                    <!--- Perform actual delete --->
                    <cfquery datasource="#application.dsn#">
                    update SP.MediaType
                    set Deleted=1
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <cfcase value="I">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                   <cfquery datasource="#application.dsn#">
                    insert into  SP.MediaType (#colname#)
                    Values ('#value#')              
                    </cfquery>
                </cfcase>
            </cfswitch>
        </cffunction>
    my table
    mediatype:
    mediatypeid primary key,identity
    mediatypename
    my code is
    <cfform method="post" name="GridExampleForm">
            <cfgrid format="html" name="grid_Tables2" pagesize="3"  selectmode="edit" width="800px" 
            delete="yes"
            insert="yes"
                  bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
                                                                ({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
                  onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
                                                {cfgridrow},
                                                {cfgridchanged})">
                <cfgridcolumn name="MediaTypeID" header="ID"  display="no"/>
                <cfgridcolumn name="MediaTypeName" header="Media Type" />
            </cfgrid>
    </cfform>
    on insert I get the following error message ajax logging error message
    http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
    {"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
    Thanks

    Is this with the Travel database or another database?
    If it's another database then make sure your columns
    allow nulls. To check this in the Server Navigator, expand
    your DataSource down to the column.
    Select the column and view the Is Nullable property
    in the Property Sheet
    If still no luck, check out a tutorial, like Performing Inserts, ...
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    John

  • I have downloaded Adobe Photoshop digitally but when i activated adobe I keep getting this error message Adobe Premiere Elements.exe - NO DISK. There is no disk in the drive. Please insert a disk into drive/device/harddisk/dr1

    I have downloaded Adobe Photoshop digitally but when I activated adobe I keep getting this error message Adobe Premiere.exe - NO DISK - There is no disk in the drive. Please insert a disk into drive/device/harddisk/DR1

    It sounds like you downloaded the wrong application, namely Adobe Premiere Elements.
    If you meant Adobe Photoshop Elements, you're in the wrong forum.  This is not the Elements forum.
    Here's the link to the forum you want:
    https://forums.adobe.com/community/photoshop_elements/content
    If you mean Photoshop proper, since you are posting in the Photoshop forum, give version details and your system specs.
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • Adobe Acrobat 8 Professional - Crash Problem

    The error appears when I open Acrobat, but also if I open any folder containing a PDF. The error reads "A serious error has been detected and Adobe Acrobat 8.1.0 Professional cannot continue. Please re-install the application and try again." If Okay

  • Build iTunes 7.7.1 Library over a network connection?

    Using the OPT-open iTunes to get it to ask for an iTunes Library, I connected my 2 Macs together using Connect to Server, and chose the iTunes Library on my Server Mac. All the Artwork showes up in my Servee Mac, but, after also Connect tp Server for

  • Config network broadcast

    Hello, I know that I can enable Broadcast in the WLC using CLI( config network broadcast enable ). Can I do it in the Web Interface? Regards.

  • Managing fi

    This is kind of a mess of a question without any real specifics. I'm just having a heck of a time managing my MP3's since I upgraded my zen touch to Plays for Sure. I joined napster to go, and I have the windows media player 0, and I downloaded the n

  • Quicktime player shows no picture

    Safari 3.0.4, Quicktime 7.4.1, iMac OS 10.5.1; best example of the problem is trying to watch Movie Trailers on the Apple site. Control bar opens half way up the allocated space where the picture should display, instead of at the bottom. If I pause a