Answer: OracleXMLSave and SDO_GEOMETRY type

I am generating XML data from table that contains SDO_GEOMETRY datatype using XSU utility, it works fine.
But then I trying to insert those data into other table with exactly same structure using OracleXMLSave.insertXML(..) it returns following error:
oracle.xml.sql.OracleXMLSQLException: 'getArrayVal: Internal Error -- '8 != 2'' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
int oracle.xml.sql.dml.OracleXMLSave.saveXML(org.w3c.dom.Document, int)
int oracle.xml.sql.dml.OracleXMLSave.saveXML(java.net.URL, int)
int oracle.xml.sql.dml.OracleXMLSave.insertXML(java.net.URL)
void ca.teranet.db.xml.ProcessXML.main(java.lang.String[])
Process exited with exit code 1.
When I comment out sdo_geometry datatype it works fine.
table
Name Type
GDO_GID NUMBER(38)
TERA_GID VARCHAR2(14)
TYPE VARCHAR2(1)
POLBLK VARCHAR2(5)
LRO_ID VARCHAR2(2)
CREATE_DATE DATE
RETIRE_DATE DATE
STATE VARCHAR2(1)
GEOM MDSYS.SDO_GEOMETRY
GM_TEXT BLOB
TEXT_ANGLE FLOAT(126)
LABEL VARCHAR2(50)
FCODE VARCHAR2(20)
ORA_VALID VARCHAR2(10)
SDE_VALID VARCHAR2(1)
XML File:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<GDO_GID>158</GDO_GID>
<TERA_GID>000030060</TERA_GID>
<TYPE>P</TYPE>
<POLBLK>00003</POLBLK>
<LRO_ID>41</LRO_ID>
<CREATE_DATE>6/6/1996 13:54:51</CREATE_DATE>
<RETIRE_DATE NULL="TRUE"/>
<STATE>C</STATE>
<GEOM>
<SDO_GTYPE>2001</SDO_GTYPE>
<SDO_SRID>8265</SDO_SRID>
<SDO_POINT>
<X>-80.8255177207051</X>
<Y>42.9976199216779</Y>
<Z NULL="TRUE"/>
</SDO_POINT>
<SDO_ELEM_INFO NULL="TRUE"/>
<SDO_ORDINATES NULL="TRUE"/>
</GEOM>
<GM_TEXT>C9FFD20FBC8CCF11ABDE08003601B769982C4748D53454C0E4B87402B27F45400000000000000000D60D50692694284000000000000000000000000000000000000000000000F03F0000010009000000303030303330303630</GM_TEXT>
<TEXT_ANGLE NULL="TRUE"/>
<LABEL>000030060</LABEL>
<FCODE>TOWPCE</FCODE>
<ORA_VALID>Y</ORA_VALID>
<SDE_VALID>Y</SDE_VALID>
</ROW>
</ROWSET>
I appreciate any comments.
Thanks
George.
Answer:
The code works fine on 9iR2 Database. Would you please specify the XSU version, Database Version and JDBC libs Version?

I've tried to investigate more.
I've created folloving DB object in SCOTT schema
create type emp_col as array(100) of varchar2(10);
create type o_emp as object (
empname varchar2(10),
empaddres varchar2(10),
empcol emp_col);
create table obj_emp (
id number,
info o_emp);
and I've used same java code to insert attached XML file into obj_emp table:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<ID>1</ID>
<INFO>
<EMPNAME>bbbb</EMPNAME>
<EMPADDRES NULL="TRUE"/>
<EMPCOL>
<EMPCOL_ITEM>111</EMPCOL_ITEM>
<EMPCOL_ITEM>222</EMPCOL_ITEM>
</EMPCOL>
</INFO>
</ROW>
</ROWSET>
And I found inconsistent behaviour:
if type emp_col is defined as array of varchar2 it is OK
if I've changed emp_col type to array of number - it returned same ugly error:
oracle.xml.sql.OracleXMLSQLException: 'getArrayVal: Internal Error -- '8 != 2'' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
     at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2298)
     at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2175)
     at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1264)
     at ca.teranet.db.xml.ProcessXML2.main(ProcessXML2.java:20)
Note. Spatial type SDO_GEOMETRY is contains SDO_ELEM_INFO type that is array of number.
Could you someone explain this?
Thanks
George.

Similar Messages

  • Designer and SDO_GEOMETRY object type

    I want to have tables with columns of object type MDSYS.SDO_GEOMETRY (Oracle Spatial's type) in Designer 9i and then generate these tables.
    So I created in Oracle Object Types branch object type called MDSYS.SDO_GEOMETRY without attributes, methods or source table.
    Then I created in Designer table with column named GEOMETRY which has Datatype property empty and Oracle Type property of value MDSYS.SDO_GEOMETRY.
    But when I generate this table I get these two messages:
    CDS-11349 Warning: The Oracle Object Type MDSYS.SDO_GEOMETRY cannot be generated.
    CDS-18025 Error: Table 'PRK_PRIMER_GEO_SDO' will not be created as Oracle Object Type 'MDSYS.SDO_GEOMETRY' is not created
    Object type MDSYS.SDO_GEOMETRY already exists in database for sure.
    What is wrong here?
    Regards
    Saso Celarc

    I think, Designer cannot handle SDO_GEOMETRY type.
    Workaround: use a other datatype/size not used in your schema ( such as varchar2(99) ), generate scripts and do a text substitution on them to SDO_GEOMETRY.

  • How could I Encrypt the data of SDO_GEOMETRY type using DBMS_CRYPTO package

    Hi:
    I want to Encrypt the data of SDO_GEOMETRY object type using DBMS_CRYPTO package.
    What could I do? hope anyone can help me,give me a suggestions!
    thanks in advance.
    lgs

    well, the spatial api would not be able to handle this data anymore, so what you are trying to do is converting an SDO_GEOMETRY to some cryptable user type (see http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_crypto.htm#sthref1506) and encrypting this.
    Before using the SDO_GEOMETRY type will have to decrypt and reconvert it again and pass it to the spatial query or function.

  • How to build a dimension witch has a column with sdo_geometry type

    hello everybody;
    i'm working with owb 11g, i have designed my dimension and also my fact table.
    in the implemnation, i have created (designed, depolyed and populated) successfully some dimenstions without any problems.
    But when i arrived to create a spatial dimension which contains a column with sdo_geometry type, i have the following error;
    Error: ORA-30373: object data types are not supported in this context
    So how can y bypasse this problem.
    Is there any tutorial to "how create spatial dimension with owb"?
    i have googled for a long time but no solution up to now
    any help will be welcome
    Thank you at advance

    Sans,
    I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
    This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues,

  • Stock on posting date with storagelocation,batch and stock types informatio

    Hi,
    I'm needing a report (similar funtion of MB5B) which must reveal the stock postion (closing balance) of the materials on a particular date alongwith storage loactions, batches and stocktypes (Unres/Q/Blkd).As such MB5B either gives the output either by storage location or by batch, not the combination of both.
    Else provide any possibilty means( Database tables) from where i could arrive these mention outputs.
    I could be able to get the information by collecting the values from MKPF & MSEG tables. But this information only suffice the material movements carried on that particular date.. And i will be not having the closing balance as a whole.
    I even wonder to get any such a kind of information in which i could able to get the stock with stock types(Unres/Q/Blkd).
    Any light on this matter is highly appreciable.
    Regards
    Prasanna

    Hi Amit Bakshi,
    Thanks for the reply..
    I executed the suggested program but i found the same kind of information aslike in MB5B..
    The information all i'm looking is to get the closing balance of the given material with storagelocations, batches and stock types on a given posting date.
    For eg.
    On 15 / 03 / 2011
    Material A
    Batch       Slocation       Stock type               Closing balance Qty.
    A1              S001               Unres.                             50
    A1              S002               Unres                            120
    B1              S001               Quality                             15
    C1              S003               Blocked                            30
    In MB5B i could able to get the values of closing balance either Storage location level or by batch level but is it possible to get the combination of both along with stock types?
    Reg
    Prasanna

  • Diff b/w reference type and elementary type

    hi all
    can any one what is the diff b/w reference type and elementary type in data element ....
    thanks
    lokesh

    The data type attributes of a data element can be defined by:
    Specifying a domain whose attributes are copied by the data element.
    Specifying a build-in type where the data type, number of places, and possibly decimal places can be directly specified.
    Specifying a reference type, i.e. reference to a class, an interface, a type defined in the Dictionary, a built-in type, or a generic reference to ANY or DATA.
    In the maintenance screen you can set the option you require by setting the appropriate flag (domain, built-in type, reference type) and filling in the corresponding input fields.
    A reference type is a reference to another type. There are the following kinds of reference types:
    Reference to a class or an interface
    Reference to a type defined in the Dictionary
    Generic reference to ANY, OBJECT, or DATA
    Reference to a built-in Dictionary type with specification of the length and possibly also the decimal places
    You can use a reference type to define the data type properties for a data element, or for typing the component of a structure or the line type of a table type.
    In the field Referenced type, enter the name of a class, an interface, the generic references DATA, OBJECT, ANY, or the name of a type defined in the Dictionary. If the reference type is to be a predefined Dictionary type, choose the reference to the predefined type. Enter the number of characters and, if required, the number of decimal places.
    where as
    The data class describes the data format at the user interface.
    If a table field or structure field or a data element is used in an ABAP program, the data class is converted to a format used by the ABAP processor. When a table is created in the database, the data class of a table field is converted to a corresponding data format of the database system used.
    You can find a detailed description of the data classes allowed in the ABAP Dictionary in Overview of the Data Classes.

  • Implicit and explicit Type conversion using Type object in heap

    Hi,
    I am surprised how Implicit and explicit Type conversion works using Type object in heap. for example when implicit type conversion occur what pointer it returns to object and similarly with explicit type conversion.

    Hello,
    >> I am surprised how Implicit and explicit Type conversion works using Type object in heap.
    For Implicit conversions: Typical examples are conversions from smaller to larger integral types, and conversions from derived classes to base classes. For the first one, the reference would be different which means it would return a different pointer to
    a new object. For the reference type, it actually points to the same memory location, you could use the object.ReferenceEquals() to check it.
    For Explicit conversions (casts):Typical examples include numeric conversion to a type that has less precision or a smaller range, and conversion of a base-class instance to a derived class. For first one, it would perform the same with implicit conversions.
    While for the conversion of conversion of a base-class instance to a derived class, actually, there's no built-in way to do this conversion.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Open SD orders and partner type?

    Hi,
    I need to extract 'open sd orders' and 'partner type'  i.e all partner types  and not only  just SP or  SH
    The transaction  VA05 does no allow  all partner functions - and I need to sort by all types
    is there another way?
    If I want to use SQVI . . . what tables can I join?
    Thanks,
    SM

    IMG --> Sales and Distribution --> Sales --> Lists --> Set Updating of Partner Index.  Here, maintain the following values.
    Transaction Group      Partner Function
              0                             SP     
              0                             SH
              0                             PY
              0                             BP
    Now you can generate VA05 based on any partner functions.
    thanks
    G. Lakshmipathi

  • What is the field and Table for "Batch Class" and "Class Type" in QM.

    Hi All,
    What is the field and Table for "Batch Class" and "Class Type" in QM.
    Thanks,

    Hi,
      For batch class the class type value is '023' . This you can find from KLAH table and the fileld for class type is KLART..
    And also all the data related to batch class are found in tables INOB, KLAH,KKSK and for the characeteristics of batch materials you can refer AUSP table.
    In INOB table, for batch class, you need to give 023 in KLART field and  value MCH1 in OBTAB filed.
    Please check this and let me know if this you need any more details?

  • How To Get FileType and MIME Type from a File

    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.
    Can any one help me on this.
    Thanks in advance,
    Ram.
    Edited by: javausers07 on Apr 15, 2009 4:25 PM

    javausers07 wrote:
    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);Why do you do all above?
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.That's because there's no way to get MIME type of all files on all filesystems.
    Kaj

  • How to get internal order and activity type other than from BSEG

    We want the Internal order and activity type fields. From BSEG, it is taking a long time, and it hangs.
    Is there any other table we can get these values from?
    Our query is this:
    select bukrs "Company code
    gjahr "Fiscal year
    belnr "Document no.
    buzei "Document Item no.
    aufnr "Internal order
    lstar "Activity type
    from bseg
    into table gt_add_info
    for all entries in gt_gl_detail
    where bukrs = gt_gl_detail-rbukrs"Comcode from G/L acct detail
    and buzei = gt_gl_detail-buzei "Doc item no. from G/L acct detail
    and belnr = gt_gl_detail-belnr "Doc no. G/L acct detail
    and gjahr = gt_gl_detail-gjahr."Fiscal yea
    Can advise please how to make it faster. My internal table (GT_GL_DETAIL) has over 100000 records. ? thanks.

    I did a SQL trace, and saw that tables CSLA, CSSL, COKL and COKA are being hit with the values I entered inthe Activity type in transaction FB50.
    Still not clear but where it gets stored. If in any of these tables, how do I get the object key?

  • How to get classification for a given material and material type in MM

    Hello Friends,
    One of my developer colleagues is struggling to find out : how to get classification for a given material and material type in MM?
    He is looking for probable table and table fields to Select from.
    I would appreciate seriously any help in this regard.
    ~Yours Sincerely

    Hi
    Below given the flow and table details for a given class and class type.
    - Table KLAH --> This contains the "Internal class no" [ for the given Class & Class type ]
    - Table KSML --> This contains the " internal character numbers " [ nothing but characteristics attached to the class ] , which can be fetched with the above fetched internal class no
    - Table AUSP --> This table contains the objects ( material ) attached to the internal characters of that class
    - Table CABNT --> This table contains the "Description" for the internal character numbers.
    - award points if this is ok

  • Error after updating field and content type

    Hi,
    I have a feature with a custom list and content type.
    I changed one field type from Text to Note, and made the same change in my Schema.xml file.
    But after deploying I get an error when I visit my list.
    "The file name you specified could not be used.  It may be the name of an
    existing file or directory, or you may not have permission to access
    the file".
    I have several sites with the same list, and all gives the same error.
    What I understand from the ULS logs it can't find my schema file, but when I look at the 14 hive it is there.
    ULS
    Failed to open the file 'schema.xml'.
    Failed to retrieve the list schema for feature {4D3315CB-7F20-4DB3-9CB3-258AC110F9BC}, list template 21973; expected to find it at: "".
    Any ideas about how to fix this?
    The text expected to find it at: "" can be the problem as I have my schema file in a folder named Correspondence List.
    And in the 14 hive I find the schema at 14\TEMPLATE\FEATURES\my feature\Correspondence List\Schema.xml
    This is from my manifest file:
    <ElementManifest Location="Correspondence\Elements.xml" />
    <ElementManifest Location="Correspondence List\Elements.xml" />
    <ElementFile Location="Correspondence List\Schema.xml" />
    Any help are appriciated

    Hi,
    Any update?
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Initial Stock Upload T code MB1C and Movement Type 561through LSMW - Error

    Hi,
    Trying to Upload the Initial Stock, Transaction Code MB1C and Movement Type 561 through LSMW.
    While recording the fileds, system giving a message of Code Block.
    Please let us know about Code Block while uploading the Initial Stock.
    Thanks
    Siddu.

    Check this thread
    [Re: Coding Block in LSMW recording via MB1C|Coding Block in LSMW recording via MB1C;
    thanks
    G. Lakshmipathi

  • Unable to connect to Wi-Fi connection using WPA2 PSK authentication and encryption type TKIP

    I was referred to here from this thread at the Windows Insider Program: http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_web/unable-to-connect-to-wi-fi-connection-using-wpa2/07bae1ed-c7fb-4f85-9d26-5549cc23e57a?msgId=2eb70420-fe35-494b-a13d-dcacd4d55eb9&rtAction=1426697691002
    My issue is copy/pasted below:
    Original Title: TKIP selection in WiFi network settings
    I have a workplace WiFi connection using WPA2 PSK authentication and encryption type TKIP.
    On the machine I used to test Windows 10, I had a previous installation of Windows 7 professional which connected to my workplace WiFi using the above settings. After installing Windows 10, my workplace wifi settings were imported and worked fine.
    Windows 10 had a system crash, and since I had deleted my previous windows installation, I performed a complete reinstall of Windows 7. However, when I went to install Windows 10 again, I had not taken the time to set up my workplace Wifi on Windows
    7 before installing Windows 10. As a result, I had to set up my workplace wifi as a new connection in Windows 10.
    When going to set up the wifi connection, the encryption type was grayed out, but appeared to default to AES. Searching the internet suggested that Windows 8.1 did not need a encryption type selected, because Windows could automatically determine
    if it was TKIP or AES, hence why the option to select encryption type was grayed out. However, after completing the setup of my workplace wifi, Windows 10 could not connect to my workplace wifi. After restoring Windows 7 with a factory reset, and setting up
    the workplace wifi (the encryption type selection was not grayed out and I manually selected TKIP encryption), my workplace wifi was working again.

    I was referred to here from this thread at the Windows Insider Program: http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_web/unable-to-connect-to-wi-fi-connection-using-wpa2/07bae1ed-c7fb-4f85-9d26-5549cc23e57a?msgId=2eb70420-fe35-494b-a13d-dcacd4d55eb9&rtAction=1426697691002
    My issue is copy/pasted below:
    Original Title: TKIP selection in WiFi network settings
    I have a workplace WiFi connection using WPA2 PSK authentication and encryption type TKIP.
    On the machine I used to test Windows 10, I had a previous installation of Windows 7 professional which connected to my workplace WiFi using the above settings. After installing Windows 10, my workplace wifi settings were imported and worked fine.
    Windows 10 had a system crash, and since I had deleted my previous windows installation, I performed a complete reinstall of Windows 7. However, when I went to install Windows 10 again, I had not taken the time to set up my workplace Wifi on Windows
    7 before installing Windows 10. As a result, I had to set up my workplace wifi as a new connection in Windows 10.
    When going to set up the wifi connection, the encryption type was grayed out, but appeared to default to AES. Searching the internet suggested that Windows 8.1 did not need a encryption type selected, because Windows could automatically determine
    if it was TKIP or AES, hence why the option to select encryption type was grayed out. However, after completing the setup of my workplace wifi, Windows 10 could not connect to my workplace wifi. After restoring Windows 7 with a factory reset, and setting up
    the workplace wifi (the encryption type selection was not grayed out and I manually selected TKIP encryption), my workplace wifi was working again.

Maybe you are looking for

  • SCCM client deployment on windows server 2012 R2

    Hi All, Can some one please share the information , step by step guide to install SCCM 2007 Sp2 client installation on windows server 2012 R2 machine. IF step by step guide is there this would be really helpful. Regards,

  • Viber on my iphone 4s while traveling

    I am travelling outside the usa. I do have a data plan but want to ensure i use viber via wifi on my iphone  4s and that data is not being used.

  • Implementing a Mobile Positioning Provider

    I'm attempting to develop a mobile position provider (as described in the Wireless Dev. Guide, Section 15.7). Implementing the required interfaces seemed relatively straight forward (MPProviderSelector, MPProvider, and Positioner). I've run into an i

  • Subtotal calculation in ALV

    hi all, i need to calculate montly subtotal value of a field  in ALV ( OO), how can i do that. plz send the code also. thanks in advance. regards sushant  singh

  • XSU for C++

    Does anyone know if there will be a version of XSU for C++? I want to insert/delete/update records in a database, given a XML document from a C++ program. Do I have any other options if I cannot use the current version of XSU? Thanks, Jon Shuler