Issue after succesfully loading xml into 11gr2 database

Hi All,
I'm currently experiencing an issue with a project I'm working on at a customer:
I have succesfully loaded multiple xml files into the Oracle 11gr2 database using sqlloader and since the intention is to be able to query the loaded data, it needs
to be transferred from the xml table to a 'normal' table, which also went ok.
Since most of the XML files contain multiple records, i've used the fn:string-join option in the insert into....select statement and used a ; as delimiter.
This is where I've encountered the thing that I can't seem to find a solution for.
When there's multiple records in the xml file it inserts all the records into one record.
So say i've got an xml file containing info for a bunch of electricity meters consisting of the fields brand, supplier, type for 3 records (actual files can be uploaded if neccesary)
inserting the data by using the above construction gives me the following data in the destination table:
Brand
BrandA;BrandB;BrandC
Supplier
Company1;Company2;Company3
Type
Type1;Type2;Type3
How do I split up the above info so that every separate record from the imported xml file lands in its own record?
Thanks in advance!
Cheers,
E.

Thanks, I'm curious on how you'll demo it
Here's the sample xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--XML file generated by Protocol Manager-->
<tns:Main Company="Company" Supplier="Supplier" xmlns:tns="http://schema.dsmr22plus.com/delivery/v1.0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.dsmr22plus.com/delivery/v1.0.5 ..\..\..\xmllib\bla\DeliveryFile.xsd">
<tns:Header DeviceType="ME382-D1 GPRS" BatchNumber="NC2043W_59" /><tns:DeviceAttributes YearOfManufactory="2011" CoreFirmwareVersion="14DA21B4B6F53C47613466AF8C263209" SerialNumber="50727236" OperationalFirmwareVersion="B330EBC763450ADC3E0C11F9BA0EA732" HardwareVersion="20611978">
<tns:Emeter>
<tns:DSMRAttributes DSMRVersion="2.3" BatteryType="Supercap type SG" EquipmentIdentifier=" KAL7005072723611" KemaGastecCode="KAL7" GOVersion="1" />
<tns:GPRS>
<tns:DlmsAttributes GlobalEncryptionKeyUnicast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" GlobalEncryptionKeyBroadcast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" P0Password1="12345678" AuthenticationKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" HDLCPassword="12345678" MasterKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
<tns:GPRSCommunicationAttributes>
<tns:SimCard MSISDN="" ICCID="8931084811080544999" CommunicationProviderBatchId="5765" IMSI="204080800339599" CommunicationProvider="KPN" />
<tns:Modem IMEI="353471006235660" PPPPassword="xxxxxxxxxxxxxxx" PPPUsername="KAL7005072723611" />
</tns:GPRSCommunicationAttributes>
</tns:GPRS>
</tns:Emeter>
</tns:DeviceAttributes>
<tns:DeviceAttributes YearOfManufactory="2011" CoreFirmwareVersion="14DA21B4B6F53C47613466AF8C263209" SerialNumber="50727237" OperationalFirmwareVersion="B330EBC763450ADC3E0C11F9BA0EA732" HardwareVersion="20611978">
<tns:Emeter>
<tns:DSMRAttributes DSMRVersion="2.3" BatteryType="Supercap type SG" EquipmentIdentifier=" KAL7005072723711" KemaGastecCode="KAL7" GOVersion="1" />
<tns:GPRS>
<tns:DlmsAttributes GlobalEncryptionKeyUnicast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" GlobalEncryptionKeyBroadcast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" P0Password1="12345678" AuthenticationKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" HDLCPassword="12345678" MasterKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
<tns:GPRSCommunicationAttributes>
<tns:SimCard MSISDN="" ICCID="8931084811080544981" CommunicationProviderBatchId="5765" IMSI="204080800339598" CommunicationProvider="KPN" />
<tns:Modem IMEI="353471006235450" PPPPassword="xxxxxxxxxxxxxxx" PPPUsername="KAL7005072723711" />
</tns:GPRSCommunicationAttributes>
</tns:GPRS>
</tns:Emeter>
</tns:DeviceAttributes>
</tns:Main>
Edited by: user6357028 on 12-Nov-2012 04:55

Similar Messages

  • Issue of inserting greek characters into Oracle database using ICAN505

    Hi All,
    We are currently facing an issue of inserting greek characters into Oracle database using ICAN505.
    We receive a file containing greek characters.The values from the file should be inserted into the database.We are reading the file using file OTD with default encoding.
    The file can contain english characters too other than greek characters.
    The database NLS_CHARACTERSET is AL32UTF8.
    When I insert using an insert statement directly ,the values get inserted properly into the DB table.
    Inserting the same values using code results in improper characters getting inserted into the table in the database.
    Please help....
    Thanks in advance !!

    Globalization forum?
    Globalization Support
    It works for SQL Developer, which does not depend on NLS_LANG, so I suspect a problem with your NLS settings.

  • XML into Mysql Database

    Hi,
    I recently purchased The Dreamweaver developer toolbox, and I thought there was a behavior to import an XML file into a database (because dreamweaver bought interakt software http://www.interaktonline.com/Products/Dreamweaver-Extensions/XMLImport-Export/Statement/ )
    But now I see it isn't possible anymore.
    Is there someone who can help me to find a decent extention (php/mysql) to import an external xml into mysql database?
    Kind Regards,
    Bertel

    Not DW extensions, but plenty of classes to do it at...
    http://www.google.com/custom?domains=www.phpclasses.org&q=XML+import&sa=Search&sitesearch= www.phpclasses.org&client=pub-2951707118576741&forid=1&channel=5742870948&ie=ISO-8859-1&oe =ISO-8859-1&cof=GALT%3A%23663399%3BGL%3A1%3BDIV%3A%23222222%3BVLC%3A663399%3BAH%3Acenter%3 BBGC%3AA3C5CC%3BLBGC%3AA3C5CC%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3B GIMP%3A0000FF%3BLH%3A50%3BLW%3A256%3BL%3Ahttp%3A%2F%2Ffiles.phpclasses.org%2Fgraphics%2Fgo oglesearch.jpg%3BS%3Ahttp%3A%2F%2Fwww.phpclasses.org%2Fsearch.html%3BFORID%3A1%3B&hl=en

  • Loading Large XML into Oracle Database

    Hi,
    I am fairly new to XML DB. I have been successful in registering a schema to a table in the Database. Now, I have to load the appropriate XML into that table. I am using the Simple Bulk Loader program found on this oracle site, however, when I load my XML file I get the following error: ORA-21700: object does not exist or is marked for delete.
    So, I figured maybe simple bulk loader cannot handle large files? So I reduced my XML file and loaded it with the program and it worked. However, does anyone know how I can load large files into my registered schema table.
    Thanks,
    Prerna :o)

    Did you specify genTables true or false when registering the XML Schema ?
    Does you XML schema contain a recursive definition
    Is it possible that after reducing the size of the document you no longer have nodes that contain recursive structures...

  • OIM 9.1.0.2 Upgrade issue/ Loading metadata into the database

    I am getting the following error when I try to execute LoadXML_XACM.bat jdbc:oracle:[email protected]:1521:orcl oimuser oimuser
    Unable to load XML in REP where REP_CODE = UserProfileHistory
    java.sql.SQLException: invalid Oracle URL specified
    My tnsnames.ora has the following entry:
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = poc.sw.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl.sw.com)
    I would appreciate any feedback
    Thank you for your time
    Edited by: user11992509 on Jun 28, 2010 12:45 PM
    Edited by: user11992509 on Jun 28, 2010 12:49 PM

    You forgot a colon. Try:
    jdbc:oracle:thin:@poc.sw.com:1521:orcl
    -Kevin

  • Is there a feature to load XML into Oracle 9 ?

    Hello,
    I receive some XML files containing error messages from an external vendor, so i want to load these files into my database, yet i never worked with xml for import, so i dont really know if oracle has a build in feature like sqlldr, that i could make use of.
    I run Solaris 5.8, so i could surely build a shellscript to do the job, as files are consistent. Just i wanted to use oracles tool, if there is any :)
    regards
    thva

    See e.g. XML DB FAQ

  • Loading xml into relational tables.

    I was wondering if anyone knows of a product/libraries which does the following:
    -Read data from a relational Database (multiple tables) and generate XML files based upon an XML Schema or DTD file?
    -Read XML files and load data into a relational Database.
    -Graphical Interface for performing the maps (perhaps based upon .xslt). ie.... Mapping of the XML Schema to Multiple Database Tables, Performing Joins etc...
    -Ability to connect to any type of Relational database (not just Oracle). Which rules out XML DB.

    This product does look to be ok, however it is missing a couple features that I would like the product to have.
    I would like this product to be able to insert/update data across multiple tables. Being able to do such things as generate foreign key relationships.
    It doesn't seem as though the XML being generated can be customized very easily. Some XML formats I deal with are very complex (such as X12/EDI).
    I would really like a graphical mapper.
    Here is a note from the doc:
    Storing XML Data Across Tables
    Currently the XML SQL Utility (XSU) can only store data in a single table. It maps a canonical representation of an XML document into any table or view. But there is a way to store XML with XSU across tables. You can do this using XSLT to transform any document into multiple documents and insert them separately. Another way is to define views over multiple tables (using object views if needed) and then do the insertions into the view. If the view is inherently non-updatable (because of complex joins), then you can use INSTEAD OF triggers over the views to do the inserts.
    This product looks really good, I was hoping that Oracle had something comparable:
    http://www.hitsw.com/products_services/xml_platform/allora.html

  • Help needed to load XML into DB table

    I need some serious help if someone can spare the time. I am completely new to XML and don't really understand it yet but I need to be able to load an XML file (example) below.
    I want to load this into a table that would look like the following:
    CHAPTER_TITLE    DOC_HTML    DOC_TITLE
    Men's Health      494440          AAAAA
    Men's Health      496812          BBBBB
    etc....
    <?xml version=1.0 encoding=utf-8?>
    <BookCollections Quantity=1 Title=Emis Books Collection>
        <Book Folder=PILSS Title=Patient Support>
            <Chapter Title=Men''s Health>
                <Document DocHTML=494440 Title=AAAAA />
                <Document DocHTML=496812 Title=BBBBB />
                <Document DocHTML=498923 Title=CCCCC />
                <Document DocHTML=499844 Title=DDDDD />
                <Document DocHTML=499901 Title=EEEEE />
            </Chapter>
        </Book>
    </BookCollections>I have read through the documentation I could find but I can't get it to work. I had a simple procedure which loaded the text file as a CLOB and then inserted it into an XMLTYPE column but even that wouldn't work. I would rather it loaded as above in seperate columns.
    Is there a simple example someone can help me out with?

    That is very close ORA_SID thank you. But I get the ORA-19025 error when I have more than one Chapter section. The example was a cut down version, ther real file has thousands of Chapters.
    e.g.
      1  insert into test2 values(xmltype(' <BookCollections Quantity="1" Title="Emis Books Collection">
      2  <Book Folder="PILSS" Title="Patient Support">
      3  <Chapter Title="Men''s Health">
      4              <Document DocHTML="494440" Title="AAAAA" />
      5              <Document DocHTML="496812" Title="BBBBB" />
      6              <Document DocHTML="498923" Title="CCCCC" />
      7              <Document DocHTML="499844" Title="DDDDD" />
      8              <Document DocHTML="499901" Title="EEEEE" />
      9              <Document DocHTML="500381" Title="FFFFF" />
    10              <Document DocHTML="500446" Title="GGGGG" />
    11              <Document DocHTML="500996" Title="HHHHH" />
    12          </Chapter>
    13          <Chapter Title="Contraception">
    14              <Document DocHTML="496815" Title="IIIII" />
    15              <Document DocHTML="496817" Title="JJJJJ" />
    16              <Document DocHTML="499547" Title="KKKKK" />
    17              <Document DocHTML="499550" Title="LLLLL" />
    18              <Document DocHTML="500473" Title="MMMMM" />
    19              <Document DocHTML="500704" Title="NNNNN" />
    20              <Document DocHTML="500813" Title="OOOOO" />
    21              <Document DocHTML="500995" Title="PPPPP />
    22              <Document DocHTML="500996" Title="QQQQQ" />
    23          </Chapter>
    24  </Book>
    25  </BookCollections>
    26* '))
    SQL> /
    1 row created.
    SQL> SELECT extractValue(xml_data, '/BookCollections/Book/Chapter/@Title') AS Chapter_Title,
      2  extractValue(value(em), '/Document/@DocHTML') AS Document_DocHTML,
      3  extractValue(value(em), '/Document/@Title') AS Document_Title
      4  FROM test2,table(XMLSequence(extract(xml_data,'/BookCollections/Book/Chapter/Document'))) em
      5  ;
    FROM test2,table(XMLSequence(extract(xml_data,'/BookCollections/Book/Chapter/Document'))) em
    ERROR at line 4:
    ORA-19025: EXTRACTVALUE returns value of only one nodeCan you help on this?

  • How2 load xml into datagrid, and create realtime search of datagrid data

    I wanted to be able to load xml data into a datagrid and then create a searchbox that would search in real time (as person typed) from any part of the datagrid.  Does anyone know of any as2.0 component that can do that easily?  If not, i would like to try to tackle this the old fashioned and use this to teach myself as2.0 advanced coding.  can someone point to a step by step or explain how i might get this accomplished?  from loading the xml to putting the node info into the datagrid, to being able to search it in real time.  This is part of a project that i was given that has some serious consequences if i botch it.  Please help!  Thanks so much!

    import fl.controls.DataGrid;
    import fl.controls.ScrollPolicy;
    import fl.data.DataProvider;
    import flash.net.URLLoader;
    import flash.events.Event;
    var dp:DataProvider = new DataProvider();
    var dg:DataGrid = new DataGrid();
    dg.columns=["User","Xp","Rank"];
    addChild(dg);
    var urlloader:URLLoader = new URLLoader();
    urlloader.addEventListener(Event.COMPLETE,loadcompleteF);
    urlloader.load(new URLRequest("whatever.xml"));
    function loadcompleteF(e:Event):void {
        var xml:XML=XML(e.target.data);
        for (var i:int = 0; i < xml..Name.length(); i++) {
            dp.addItem({User:xml..Name[i].User.text(), Xp:xml..Name[i].Xp.text(), Rank:xml..Name[i].Rank.text()});
        dg.dataProvider=dp;

  • Weblogic  message ---error while loading data into planning database

    Hi,
    Does anyone have idea on this error message .We are loading data into planning 11.1.2.1 using ERPI standalone 11.1.2.1.501 but everytime it load gives out this message and data load is unsuccessful.platform is Microsoft windows 64-bit 2008R2 ----Database Microsoft SQL Server 2008.
    Please help.
    <Mar 2, 2012 12:20:51 PM PST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DatabaseProductName on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=aif_datasource,Type=JDBCDataSourceRuntime during a call to getAttributes>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DriverVersion on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=aif_datasource,Type=JDBCDataSourceRuntime during a call to getAttributes>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DriverName on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=aif_datasource,Type=JDBCDataSourceRuntime during a call to getAttributes>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DatabaseProductVersion on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=aif_datasource,Type=JDBCDataSourceRuntime during a call to getAttributes>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DatabaseProductName on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=EPMSystemRegistry,Type=JDBCDataSourceRuntime during a call to getAttributes>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DriverVersion on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=EPMSystemRegistry,Type=JDBCDataSourceRuntime during a call to getAttributes>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DriverName on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=EPMSystemRegistry,Type=JDBCDataSourceRuntime during a call to getAttributes>
    <Mar 2, 2012 12:36:24 PM PST> <Warning> <JMX> <BEA-149515> <An error was encountered getting the attribute DatabaseProductVersion on the MBean com.bea:ServerRuntime=ErpIntegrator0,Name=EPMSystemRegistry,Type=JDBCDataSourceRuntime during a call to getAttributes>

    Hi Found solution.login to weblogic console and change the timeout of ERPI from 600 sec to 20000 sec.\
    It worked no more error.
    Cheers

  • R0 Rollback Segment in Import of 10gR2 into 11gR2 Database

    I have a new install of Oracle Database Server Enterprise Edition 11.2.0.3.6 on AIX 7.1.
    I used the DBCA to create two databases and used export datapump and import datapump to upgrade two 10gR2 database to 11gR2.
    One of the import logs includes the following messages:
    Processing object type DATABASE_EXPORT/ROLLBACK_SEGMENT
    ORA-39083: Object type ROLLBACK_SEGMENT failed to create with error:
    ORA-02221: invalid MAXEXTENTS storage option value
    Failing sql is:
    CREATE ROLLBACK SEGMENT "R0" TABLESPACE "SYSTEM" STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 2 MAXEXTENTS 2147483645)
    I verified that the source database has R0 with maxextents of 2147483645.
    I can copy and modify the CREATE ROLLBACK statement and lower the value assigned to MAXEXTENTS, or use MAXEXTENTS UNLIMITED, then run the command in the target database.
    In light of the fact that the DBCA did not create R0 in my two 11gR2 databases, I want to know if I still need to create R0 in the one that showed the error in the import log. Has anyone else noticed the disappearance of R0?
    Here are the rollback segments that exist in the 11gR2 database at this time:
    SQL> Select SEGMENT_NAME, OWNER, TABLESPACE_NAME, INITIAL_EXTENT, NEXT_EXTENT, MIN_EXTENTS, MAX_EXTENTS, PCT_INCREASE, STATUS
    from SYS.DBA_ROLLBACK_SEGS;
    SEGMENT_NAME OWNER TABLESPACE_NAME INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE STATUS
    SYSTEM                         SYS       SYSTEM     114688 57344 1 32765 ONLINE
    _SYSSMU1_3638931391$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU2_3033359625$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU3_2670780772$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU4_286801445$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU5_1738828719$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU6_3548494004$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU7_700714424$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU8_2755301871$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU9_2087597455$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    _SYSSMU10_3267518184$ PUBLIC UNDOTBS1 131072 65536 2 32765 ONLINE
    11 rows selected.
    Thanks,
    Bill

    Srini,
    Both the 10gR2 and 11gR2 versions of the database are using automatic undo management.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> show parameter undo
    NAME TYPE VALUE
    _undo_autotune boolean TRUE
    undo_management string AUTO
    undo_retention integer 14400
    undo_tablespace string UNDOTBS1
    SQL>
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 14400
    undo_tablespace string UNDOTBS1
    SQL>
    Do you know anything about Oracle no longer automatically creating R0 in 11gR2?
    Thanks,
    Bill

  • Refresh jTable after inserting new data into the Database

    Hey all,
    I'm using Netbeans 6.5 to create a Desktop Application which is connected to a Java DB (Derby).
    The first simple steps were all very successfull:
    Create the jTable and bind it to the Database => everything works fine. When the application starts it correctly shows all data from the database.
    The problem starts when I try to insert new data to the database.
    For that reason I've created textfields and a button "Save". When I press the button it successfully inserts the data to the database but they are not displayed in the jTable (when the application starts they are all there, they are not updated at runtime) . I've tried table.invalidate() and table.repaint() but they just don't work.
    Any help will be GREATLY appreciated. But please have in mind that most of the code is Netbeans-generated and most of it not editable.
    Many thanks in advance.
    George

    Once again you are right my friend. I jumped to conclusion way too fast, when I shouldn't. (Give me a break, I've been busting my head with this well over a week). The response I saw when I did that was that indeed a line is added to the jTable. Because I falsly set the index of the object to be added to be second to last the row appeared on the table, what I didn't see at the time was that the last one disappeared. Hmm...
    A new adventure begins...
    So after a few hours of messing around with it here are my observations:
    1) It was not an observable list. When I add the new element with employeesList.add(newEmp); , the table gets notified but a get a bunch of exceptions:
    xception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
            at java.util.ArrayList.RangeCheck(ArrayList.java:546)
            at java.util.ArrayList.get(ArrayList.java:321)
            at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
            at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
            at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
            at javax.swing.JComponent.paintComponent(JComponent.java:743)
            at javax.swing.JComponent.paint(JComponent.java:1006)
            at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1602)
            at javax.swing.JViewport.windowBlitPaint(JViewport.java:1568)
            at javax.swing.JViewport.setViewPosition(JViewport.java:1098)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:818)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:807)
            at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
            at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
            at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
            at javax.swing.JScrollBar.setValue(JScrollBar.java:441)
            at javax.swing.plaf.basic.BasicScrollBarUI.scrollByUnits(BasicScrollBarUI.java:907)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved(BasicScrollPaneUI.java:778)
            at javax.swing.plaf.basic.BasicScrollPaneUI$MouseWheelHandler.mouseWheelMoved(BasicScrollPaneUI.java:449)
            at apple.laf.CUIAquaScrollPane$XYMouseWheelHandler.mouseWheelMoved(CUIAquaScrollPane.java:38)
            at java.awt.Component.processMouseWheelEvent(Component.java:5690)
            at java.awt.Component.processEvent(Component.java:5374)
            at java.awt.Container.processEvent(Container.java:2010)
            at java.awt.Component.dispatchEventImpl(Component.java:4068)
            at java.awt.Container.dispatchEventImpl(Container.java:2068)
            at java.awt.Component.dispatchMouseWheelToAncestor(Component.java:4211)
            at java.awt.Component.dispatchEventImpl(Component.java:3955)
            at java.awt.Container.dispatchEventImpl(Container.java:2068)
            at java.awt.Component.dispatchEvent(Component.java:3903)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
            at java.awt.Container.dispatchEventImpl(Container.java:2054)
            at java.awt.Window.dispatchEventImpl(Window.java:1801)
            at java.awt.Component.dispatchEvent(Component.java:3903)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
            at java.util.ArrayList.RangeCheck(ArrayList.java:546)
            at java.util.ArrayList.get(ArrayList.java:321)
            at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
            at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
            at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
    ... and a lot morewhich from my poor understanding means that the jTable succesfully notices the change but it is not able (??) to adjust to the new change. What is more interesting is that when I plainly add the element to the end of the list (without an idex that is), a blank row appears at the end of my Table. The weird thing is that I've bound the table to some text fields below it, and when I select that empty row all the data appear correctly to the text fields.
    I tried going through:
                    org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList).add(newEmp);as well as
                    help = org.jdesktop.observablecollections.ObservableCollections.observableListHelper(employeesList);
                    help.getObservableList().add(newEmp);
                    help.fireElementChanged(employeesList.lastIndexOf(newEmp));and
                    obsemployeesList = org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList);
                    obsemployeesList.add(newEmp);and I still get the same results (both the exeptions and the mysterious empty row at the end of the table
    So, I'm again in terrible need of your advice. I can't thank you enough for the effort you put into this.
    Best regards,
    George
    Edited by: tougeo on May 30, 2009 11:06 AM
    Edited by: tougeo on May 30, 2009 11:21 AM
    Edited by: tougeo on May 30, 2009 11:30 AM

  • How To Load XML into a Table

    Hello All,
    I need to load many XML files into their own tables without using the XMLType column type. We need each element/attribute to get it's own column. For example
    <book id="bk103">
    <genre>Mystery</genre>
    </book>
    should load to a table with columns ID, GENRE of type varchar2. I have 1000s of XML files that need to be loaded, each with different data/structure. Ideally, I want to be able to point a SP at a folder that contains, say 250 XML files, run it, then have it create 250 tables each with a column set corresponding to each element/attribute from the XML file. Given that each XML file has a different structure, I need a solution that does not require a table to already exist. A solution that figures it out on the fly, perhaps using the VARCHAR2 type for all columns, would be best. I did notice this post, but it first requires the table to already exist. Is there a way to load 1 or more XML files into their own table with non XMLType datatypes where each table is created on the fly?
    Any help appreciated,
    TIA
    Rob
    Edited by: user10729248 on Dec 19, 2008 6:13 AM
    Edited by: user10729248 on Dec 19, 2008 6:14 AM

    Thanks for the response but I am not finding the information helpful. The examples provided assume the table into which the XML file is loaded already exists or a CREATE TABLE script is run. I need a solution that creates the table automagically. Can someone provide an example of this please? Also, I'm looking for a PL/SQL SP-based solution if this is possible. Many of the examples use Java; we're using .NET.

  • Load XML into Table

    Hi All,
    I want to create a procedure in which , I provide table name and XML file location, The procedure goes at that location and pick XML file and load in to the table. Can this is possible ??
    Thanks
    Best Regards,
    Adil

    The following code very interesting.
    DROP TABLE TBL_TEST
    CREATE TABLE "TBL_TEST"
    (     "N" NUMBER,
    "V" VARCHAR2(20),
         "D" DATE)
    CREATE OR REPLACE DIRECTORY XML_DIR AS 'C:\XMLDIR';
    CREATE OR REPLACE
    PROCEDURE INSERT_XML_TBL_TEST(p_directory in varchar2,
    p_filename in varchar2)
    --p_tableName in varchar2 DEFAULT 'TBL_TEST')
    AS
    insCtx DBMS_XMLSTORE.CTXTYPE;
    rows NUMBER;
    xmlDoc CLOB := null;
    BEGIN
    if (dbms_xdb.existsResource('/public/'||lower(p_filename))) then
    dbms_xdb.deleteResource('/public/'||lower(p_filename));
    end if;
    v_return := DBMS_XDB.CREATERESOURCE(abspath => '/public/'||lower(p_filename),
    data => BFILENAME(UPPER(p_directory),LOWER(p_filename)));
    COMMIT;
    SELECT RV.RES.GETCLOBVAL()
    INTO xmldoc
    FROM RESOURCE_VIEW RV WHERE ANY_PATH = '/public/'||lower(p_filename);
    insCtx := DBMS_XMLSTORE.newcontext('TBL_TEST');
    dbms_xmlstore.SetRowTag(insctx,'TBL_TEST_ROW');
    dbms_xmlstore.clearkeycolumnlist(insctx);
    dbms_xmlstore.setupdatecolumn(insctx,'N');
    dbms_xmlstore.setupdatecolumn(insctx,'V');
    dbms_xmlstore.setupdatecolumn(insctx,'D');
    rows := dbms_xmlstore.insertxml(insctx, xmldoc);
    dbms_output.put_line(rows ||' rows inserted');
    dbms_xmlstore.closecontext(insctx);
    END;
    select * from tbl_test
    begin
    INSERT_XML_TBL_TEST('XML_DIR','tbl_test.xml');
    end;
    and I created XMLDIR folder on C:\
    and there have a xml file name is tbl_test.xml and content this file is
    <TBL_TEST_ROWSET>
    <TBL_TEST_ROW num="1">
    <N>11</N>
    <V>Testing 11</V>
    </TBL_TEST_ROW>
    <TBL_TEST_ROW num="2">
    <N>10</N>
    <V>Testing 11</V>
    </TBL_TEST_ROW>
    </TBL_TEST_ROWSET>
    Mahir M. Quluzade
    Edited by: Mahir M. Quluzade on Nov 24, 2010 11:47 AM

  • Dynamically load xml into TextArea

    How can I include text from an xml file (loaded using URLLoader) into a TextArea. Flex is stripping the brackets <, >, and mangling the text output.
    thx

    Try the toXMLString() method.

Maybe you are looking for