Conver BLOB column value to XML

Oracle 10G
My table has BLOB column my requirement is BLOB values needs to be populated in sequence file
right now am using Java code to convert into XML then ETL tool to extrcat in to sequence file
is is possible to pull directly into sequence file??
Thanks in advance
Edited by: Kalinga on Dec 8, 2009 9:19 PM

The thread's subject refers to converting a BLOB to a XML, and you're posting mentions converting it to a sequence file...
Not sure what you define a sequence file to be? Or what the intention is...
BLOBs are used to store binary data. CLOBs are used to store character data.
If the data is to be extracted as is into a file for a tool to use, the UTL_FILE can be used to read the contents of the BLOB/CLOB and write it to file.
In other words, if you have a XML CLOB and an external tool needs the data as a file, there is no data conversion as such required. Only data dumping. Reading that CLOB (without conversion to other data types) and writing it to a file.
If the CLOB data (in XML format) do needs to be processed as a XML DOM, then the SQL function XMLTYPE() can be used to convert that XML in the CLOB to a XML data type that can be processed using XML functions.
If the CLOB data is in a non-XML format and it needs to be converted into XML and then spooled to a file, you need to write a parser that extracts that CLOB data into a SQL structure (e.g. a global temporary table), and then make use of XML functions and SQL to convert that data into a XML DOM.
Once that is done, the XML DOM contents can be saved as a CLOB and written to an external file for external tools to use.
If you can be more specific about what the actual problem is, and what (4 digit) Oracle version you are using, the forum can supply more detailed responses - instead of trying to guess what you are trying to achieve and what the meaning is of terms like "+sequence file+".

Similar Messages

  • Insert data from XML in a BLOB column to a table

    I have a situation where my source table has a blob column and an XML file is loaded into it.
    Whenever an insert into the table happens I need to read the XML and insert the values from XML to a target table .
    I have done it with oracle inbuilt parser and tokens but this will do a call to the database when already the data is available on the extract file.That would mean a lower performance .
    Can someone help me maybe with some userexit or something
    Thanks in advance

    Please check if you can see the 'DBMS_XMLSAVE' object in all_objects.

  • BLOB column inserts are slow

    Hi All,
    Have a table with 7 columns where 4 columns are of Varchar2 type, 2 columns are of NUMBER type and 1 column is of type BLOB.
    Myself inserting the values to the table from JAVA program. Insertion to VARCHAR2 and NUMBER type columns are very much fast. But insertion to BLOB column is dead slow(data to BLOB column values are about 10KB).
    Please help me in this regard to insert BLOB values fastly.
    Regards/Sreekeshava S

    Sreekeshava S wrote:
    Running JAVA program in the same server as that of DB. Connecting how? IPC? TCP? Dedicated server? Shared server?
    Calling Oracle how? Doing a SQL statement prepare per insert? Reusing the SQL cursor handle? Binding variables?
    And inserting 250 records/ sec(during peak load and 50 records/sec during normal load). where each record is having size of 10K(Blob column size).And what is slow? You have NOT yet provided ANY evidence that points to the actual INSERT being slow.
    As I have already explained, there are a number of layers from client to server - and any, or all of these, could be contributing to the problem.
    Use your web browser and look up what instrumentation is. Apply it. Instrument your code. On the client. On the server. So you have evidence (call stats and metrics) to use to determine what and where the performance problem is. And not have to guess - and like most developers point your finger at the database in the false belief that your client code, client design, and client usage of the database, are all perfect.

  • Store the value  in BLOB column data type

    Hi All,
    I have a file of about 5MB. I want to store this in BLOB column data type of a table.
    Can we compress this file to store and when we take uncompress the same...or how do we do it.
    and what is the procedure to store this....
    pls. help me
    Thanks,
    Naresh

    Hi skud
    i juast want to store the agent code to variable.if i did get ur point...
    Why don't u just use a simple assign statment for example...
    DECLARE
    V_VALUE  NUMBER;
    BEGIN
    V_VALUE := LC354 ; -- IF it was a value as LC354 static i mean
    -- or u could use any value
    V_VALUE := :ur_form_item_name; --- if it was dynamic
    END;That's it .
    Hope this helps...
    Regards,
    Ammatu Allah.

  • Column value & heading is not displaying in xml publisher report

    Hi All,
    All Inventories Value Report - Average Costing Standard report copied to cusoom report. Now in rdf I need to add few column like PO Number, Receipt Number, Supplier Number etc.. for this I need Inventory_item_id & organization_id so that I can create the new data modal. But not able to get the Inventory_item_id & organization_id column display in .xml file. Please look and let me koow the solution.
    SELECT cost_group,
           item,
           category,
           description,
           uom,
           SUM(STKQTY) STKQTY,
           SUM(INTQTY) INTQTY,
           SUM(RCVQTY) RCVQTY,
           SUM(STKVAL) STKVAL,
           SUM(INTVAL) INTVAL,
           SUM(RCVVAL) RCVVAL,
            inventory_item_id,
           organization_id
    FROM(        
    SELECT CCG.cost_group COST_GROUP,
           &P_ITEM_SEG ITEM,
           &P_CAT_SEG CATEGORY,
           MSI.description DESCRIPTION,
           MSI.primary_uom_code UOM,
           ROUND(SUM(CIQT.rollback_qty),:P_Qty_Precision) STKQTY,
           0 INTQTY,
           0 RCVQTY,
           ROUND(
             SUM(CIQT.rollback_qty) *
             DECODE(SUB.asset_inventory,1,CICT.item_cost,0) *
             :pv_exchange_rate/
             :pv_round_unit
           :pv_round_unit STKVAL,
           0 INTVAL,
           0 RCVVAL,
          CIQT.inventory_item_id,
           CIQT.organization_id
    FROM   cst_inv_qty_temp CIQT,
           cst_inv_cost_temp CICT,
           mtl_parameters MP,
           mtl_system_items_vl MSI,
           mtl_categories MC,
           mtl_secondary_inventories SUB,
           cst_cost_groups CCG
    WHERE  CIQT.qty_source in (3,4)
    AND    CICT.cost_source = 1
    AND    CICT.organization_id = CIQT.organization_id
    AND    CICT.inventory_item_id = CIQT.inventory_item_id
    AND    (   MP.primary_cost_method = 1
           OR  CICT.cost_group_id = CIQT.cost_group_id) -- should we split?
    AND    MP.organization_id = CIQT.organization_id
    AND    SUB.organization_id = CIQT.organization_id
    AND    SUB.secondary_inventory_name = CIQT.subinventory_code
    AND    MSI.organization_id = CIQT.organization_id
    AND    MSI.inventory_item_id = CIQT.inventory_item_id
    AND    MC.category_id  = CIQT.category_id
    AND    CCG.cost_group_id = NVL(CIQT.cost_group_id,MP.default_cost_group_id)
    GROUP
    BY     CCG.cost_group,
           &P_ITEM_SEG,
           &P_CAT_SEG,
           MSI.description,
           MSI.primary_uom_code,
           DECODE(SUB.asset_inventory,1,CICT.item_cost,0),
            CIQT.inventory_item_id,
           CIQT.organization_id
    UNION ALL
    SELECT CCG.cost_group COST_GROUP,
           &P_ITEM_SEG ITEM,
           &P_CAT_SEG CATEGORY,
           MSI.description DESCRIPTION,
           MSI.primary_uom_code UOM,
           0 STKQTY,
           ROUND(SUM(CIQT.rollback_qty),:P_Qty_Precision) INTQTY,
           0 RCVQTY,
           0 STKVAL,
           ROUND(
             SUM(CIQT.rollback_qty) *
             CICT.item_cost *
             :pv_exchange_rate/
             :pv_round_unit
           :pv_round_unit INTVAL,
           0 RCVVAL,
            CIQT.inventory_item_id,
           CIQT.organization_id
    FROM   cst_inv_qty_temp CIQT,
           cst_inv_cost_temp CICT,
           mtl_parameters MP,
           mtl_system_items_vl MSI,
           mtl_categories MC,
           cst_cost_groups CCG      
    WHERE  CIQT.qty_source in (6,7)
    AND    CIQT.organization_ID = :P_ORG_ID
    AND    CICT.cost_source = 1
    AND    CICT.organization_id = CIQT.organization_id
    AND    CICT.inventory_item_id = CIQT.inventory_item_id
    AND    (   MP.primary_cost_method = 1
           OR  CICT.cost_group_id = CIQT.cost_group_id) -- should we split?
    AND    MP.organization_id = CIQT.organization_id
    AND    MSI.organization_id = CIQT.organization_id
    AND    MSI.inventory_item_id = CIQT.inventory_item_id
    AND    MC.category_id  = CIQT.category_id
    AND    CCG.cost_group_id = NVL(CIQT.cost_group_id,MP.default_cost_group_id)
    GROUP
    BY     CCG.cost_group,
           &P_ITEM_SEG,
           &P_CAT_SEG,
           MSI.description,
           MSI.primary_uom_code,
           CICT.item_cost,
            CIQT.inventory_item_id,
           CIQT.organization_id
    UNION ALL
    SELECT CCG.cost_group COST_GROUP,
           &P_ITEM_SEG ITEM,
           &P_CAT_SEG CATEGORY,
           MSI.description DESCRIPTION,
           MSI.primary_uom_code UOM,
           0 STKQTY,
           0 INTQTY,
           ROUND(SUM(CIQT.rollback_qty),:P_Qty_Precision) RCVQTY,
           0 STKVAL,
           0 INTVAL,
           ROUND(
             SUM(CIQT.rollback_qty)*
             CICT.item_cost *
             :pv_exchange_rate /
             :pv_round_unit
           :pv_round_unit RCVVAL,
          CIQT.inventory_item_id,
           CIQT.organization_id
    FROM   cst_inv_qty_temp CIQT,
           cst_inv_cost_temp CICT,
           mtl_system_items_vl MSI,
           mtl_categories MC,
           mtl_parameters MP,
           cst_cost_groups CCG
    WHERE  CIQT.qty_source = 9
    AND    CICT.cost_source = 3
    AND    CICT.organization_id = CIQT.organization_id
    AND    CICT.inventory_item_id = CIQT.inventory_item_id
    AND    CICT.rcv_transaction_id = CIQT.rcv_transaction_id
    AND    MSI.organization_id = CIQT.organization_id
    AND    MSI.inventory_item_id = CIQT.inventory_item_id
    AND    MC.category_id  = CIQT.category_id
    AND    MP.organization_id = CIQT.organization_id
    AND    CCG.cost_group_id = NVL(CIQT.cost_group_id,MP.default_cost_group_id)
    GROUP
    BY     CCG.cost_group,
           &P_ITEM_SEG,
           &P_CAT_SEG,
           MSI.description,
           MSI.primary_uom_code,
           CICT.item_cost,
             CIQT.inventory_item_id,
           CIQT.organization_id
    ) TEMP
    GROUP BY cost_group,
           item,
           category,
           description,
           uom,
            inventory_item_id,
           organization_id
    - <CSTRAIVA> 
    - <LIST_G_COST_GROUP> 
    - <G_COST_GROUP> 
    <COST_GROUP>100191</COST_GROUP>  
    - <LIST_G_CATEGORY> 
    - <G_CATEGORY> 
    <CATEGORY>Not Assigned</CATEGORY>  
    - <LIST_G_ITEM> 
    - <G_ITEM> 
    <ITEM>82557653</ITEM>  
    <DESCRIPTION>BEARING LINING (GLACIER 100KSA075)</DESCRIPTION>  
    <UOM>EA</UOM>  
    <STKQTY>6</STKQTY>  
    <STKVAL>38934.7</STKVAL>  
    <RCVQTY>0</RCVQTY>  
    <RCVVAL>0</RCVVAL>  
    <INTQTY>0</INTQTY>  
    <INTVAL>0</INTVAL>  
    <CF_ITEM>82557653</CF_ITEM>  
    <TOTQTY>6</TOTQTY>  
    <TOTVAL>38934.7</TOTVAL>  
    <CF_STKVAL_DSP>38,934.70</CF_STKVAL_DSP>  
    <CF_INTVAL_DSP>0.00</CF_INTVAL_DSP>  
    <CF_RCVVAL_DSP>0.00</CF_RCVVAL_DSP>  
    <CF_TOTVAL_DSP>38,934.70</CF_TOTVAL_DSP>  
    </G_ITEM>
    </LIST_G_ITEM>
    <CF_ORDER />  
    <CF_CATEGORY>Not Assigned.</CF_CATEGORY>  
    <SUMSTKVALPERCATEGORY>38934.7</SUMSTKVALPERCATEGORY>  
    <SUMINTVALPERCATEGORY>0</SUMINTVALPERCATEGORY>  
    <SUMRCVVALPERCATEGORY>0</SUMRCVVALPERCATEGORY>  
    <SUMTOTVALPERCATEGORY>38934.7</SUMTOTVALPERCATEGORY>  
    <CF_SUM_STKVAL_CAT_DSP>38,934.70</CF_SUM_STKVAL_CAT_DSP>  
    <CF_SUM_INTVAL_CAT_DSP>0.00</CF_SUM_INTVAL_CAT_DSP>  
    <CF_SUM_RCVVAL_CAT_DSP>0.00</CF_SUM_RCVVAL_CAT_DSP>  
    <CF_SUM_TOTVAL_CAT_DSP>38,934.70</CF_SUM_TOTVAL_CAT_DSP>  
    </G_CATEGORY>
    </LIST_G_CATEGORY>
    <SUMSTKVALPERCOST_GROUP>38934.7</SUMSTKVALPERCOST_GROUP>  
    <SUMINTVALPERCOST_GROUP>0</SUMINTVALPERCOST_GROUP>  
    <SUMRCVVALPERCOST_GROUP>0</SUMRCVVALPERCOST_GROUP>  
    <SUMTOTVALPERCOST_GROUP>38934.7</SUMTOTVALPERCOST_GROUP>  
    <CF_SUM_STKVAL_CG_DSP>38,934.70</CF_SUM_STKVAL_CG_DSP>  
    <CF_SUM_INTVAL_CG_DSP>0.00</CF_SUM_INTVAL_CG_DSP>  
    <CF_SUM_RCVVAL_CG_DSP>0.00</CF_SUM_RCVVAL_CG_DSP>  
    <CF_SUM_TOTVAL_CG_DSP>38,934.70</CF_SUM_TOTVAL_CG_DSP>  
    </G_COST_GROUP>
    </LIST_G_COST_GROUP>
    <SUMSTKVALPERREPORT>38934.7</SUMSTKVALPERREPORT>  
    <SUMINTVALPERREPORT>0</SUMINTVALPERREPORT>  
    <SUMRCVVALPERREPORT>0</SUMRCVVALPERREPORT>  
    <CS_DUMMY>1</CS_DUMMY>  
    <SUMTOTVALPERREPORT>38934.7</SUMTOTVALPERREPORT>  
    <CF_SUM_STKVAL_REP_DSP>38,934.70</CF_SUM_STKVAL_REP_DSP>  
    <CF_SUM_INTVAL_REP_DSP>0.00</CF_SUM_INTVAL_REP_DSP>  
    <CF_SUM_RCVVAL_REP_DSP>0.00</CF_SUM_RCVVAL_REP_DSP>  
    <CF_SUM_TOTVAL_REP_DSP>38,934.70</CF_SUM_TOTVAL_REP_DSP>  
    </CSTRAIVA>

    Thanks for your reply.
    I did below changes in the CQWP but no luck. Please let me know if any further modification needed.
    Thank you!
            <property name="DataMappingViewFields" type="string">{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},Image;{94f89715-e097-4e8b-ba79-ea02aa8b7adb},Lookup;{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;{33f34208-1553-4361-b3ff-26f5da1ae591},Text;{b7ff04a4-a33a-429a-99bd-0ac5367bd189},User;{37cb0520-3169-4bca-9941-1886a5a73f92},DateTime;{6b2c772c-a130-4814-bfd0-d84efb061e3b},TaxonomyFieldType;{d31655d1-1d5b-4511-95a1-7a09e9b75bf2},User;{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f},DateTime;</property>
            <property name="DataMappings" type="string">Editor:{d31655d1-1d5b-4511-95a1-7a09e9b75bf2},Editor,User;|Actors:|Modified:{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f},Modified,DateTime;|Input:|Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|LinkUrl:{94f89715-e097-4e8b-ba79-ea02aa8b7adb},FileRef,Lookup;|ExpiryDate:{37cb0520-3169-4bca-9941-1886a5a73f92},ExpiryDate,DateTime;|Author:{d31655d1-1d5b-4511-95a1-7a09e9b75bf2},Editor,User;|Approver:{f30275e3-0638-451f-bb1f-b5c74ac432ef},Approver,User;|PreRequisites:|DocumentOwner:{b7ff04a4-a33a-429a-99bd-0ac5367bd189},DocumentOwner,User;|Trigger:|RelatedtoGeneralTopic:{6b2c772c-a130-4814-bfd0-d84efb061e3b},RelatedtoGeneralTopic,TaxonomyFieldType;|OpenInNewWindow:|Frequency:|Image:|Output:|Body:|Locallyvalidfor:{31a5c887-10a3-49ca-afa0-97c5679bbda9},Locallyvalidfor,TaxonomyFieldType;|ProcessOwner:|ShortDescription:{33f34208-1553-4361-b3ff-26f5da1ae591},ShortDescription,Text;|Description:{691b9a4b-512e-4341-b3f1-68914130d5b2},ShortComment,Text;|Created:|LinkToolTip:|Mandatory:|ProcessManager:|ImageUrl:{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},EncodedAbsThumbnailUrl,Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},PublishingRollupImage,Image;|</property>

  • How to read a XML file from BLOB column and insert in a table - PL/SQL Only

    Hi,
    To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
    I tried with DBMS_LOB and didnt get around.
    Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080543758</DET_CODE>
    <DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
    <ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
    </Corporate_alloc>
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080534343</DET_CODE>
    <DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
    <ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
    </Corporate_alloc>
    </dataroot>
    CREATE TABLE TEST_XML
    ( PKG_CODE VARCHAR2(50),
    PKG_NAME VARCHAR2(100),
    DET_CODE VARCHAR2(20),
    DET_NAME VARCHAR2(500),
    ALLOCATION_RATIO NUMBER )
    Thanks
    EBV

    In regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
    Re: XML Data - Caliculate fields
    Re: Extractvalue function not recognised

  • Oracle Text Help with XML column values

    Hello. In addition to being new to Oracle Text, I am inheriting an Oracle Text application and have a couple of questions.
    First, A context-based index has been set-up on a CLOB column which contains an XML formatted document. The Auto Section Group parameter has been set to created zones for each tag of the XML document. I have found that when using a browser to display the content of the CLOB, some of the column values have trouble displaying in the browser, where I receive an XML processing error. I believe this is due to the fact that some of the XML document rows contain URLs that are not embedded in the CDATA tag. In any case, if the browser has trouble displaying the XML, will oracle text have trouble indexing the XML and creating the section group zones?
    Second, I understand that the NOT operator takes a right operand term and left operand term. Can either of the terms be the results of the WITHIN operator, i.e. "dogs not (cats within animals)".
    Thank you.

    I bet you just whipped that out, and I thank you with all my
    heart, its amazing to me how many ways I tried to do what you did.
    Thanks
    I have a second question relating to the same problem and
    that is in referencing the over state. Currently, I can write
    'text' into the text field and see what I have coming in from xml
    in its place during the 'up' state.
    However, when the timeline hits the 'over' state, the
    textfield will display nothing, or 'text' if I have that written
    in. I suspect that I am not referencing the'over' state correctly.
    Should I add one line of code sort of referencing the text
    field and not just the button while in the over state?

  • Insert value to BLOB column

    Hi dearest of Friends,
    How how do I insert values to a BLOB column using SQL-DEVELOPER? Say I will save a JPEG file to it. Although I know how to display the contents of it (BLOB) using this tool, which is really a big help.
    Thanks a lot

    When you display the contents, there's a Load button to load your new content into it.
    Regards,
    K.

  • A blob column in xml

    Hi,
    I have a blob column in some table. It is for example an jpg image. The size is more than 32k (for example size:152287 with dbms_lob.getlength)
    How can I get this column in a xml document because I want to use the xml file for importing in a different Oracle schema.
    Thanks in advance,
    Henk

    Extracting the BLOB is not the hardest part, SQL/XML function such as XMLElement() can read the content natively and convert it to a text node in xs:hexBinary format :
    SQL> select xmlelement("Image", image)
      2  from test_jdbc_blob
      3  where img_id = 'Koala.jpg' ;
    XMLELEMENT("IMAGE",IMAGE)
    <Image>FFD8FFE000104A46494600010201006000600000FFEE000E41646F626500640000000001F
    Other option is to convert the BLOB to base64 and feed it to an element similarly, though it requires a little more code.
    DBMS_XMLDOM has some methods to manipulate large binary streams too.

  • Getting errors while writing to a BLOB column using PrepareStatement

    Hello,
    I am getting the following errors when I am trying to insert in a BLOB in the oracle 9i database:
    java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 205 ORA-22297: warning: Open LOBs exist at transaction commit time
    It gets inserted into the BLOB column correctly even after throwing exception.I am using the following code:
    String outputXML = outputXML //Some huge string having a length of 52k
    String pKey = "DATA-WORKATTACH-URL MELLONFINCORP-GSS-CPG E-444!20061130T211932.030 GMT";
    String createDateTime = "20061212T145931.448 GMT";
    String createOpName = "Haque, Nadeem";
    String createOperator = "ADCDTB6";
    String createSystemID = "WFE";
    String insName = "TESt INS";
    String objClass = "Data-WorkAttach-Note";
    String updateDateTime = "20061207T191900.510 GMT";
    String updateOpName = "Haque, Nadeem";
    String updateOperator = "ADCDTB6";
    String updateSystemID = "WFE";
    String label = "This is a test for label";
    String attachDate = "20061207T191900.510 GMT";
    String attachedBy = "Nadeem";
    String attachName = "Nadeem Haque";
    String note = "This is a test note";
    String refObjectKey = "E-438!20061130T211932.030";
    String replicationDate = "20061207T191900.510 GMT";
    try{
    java.sql.PreparedStatement pstmt = null;
    java.sql.Statement stmt = null;
    java.io.OutputStream tempBlobOStream = null;
    oracle.sql.BLOB tempBlob = null;
    javax.naming.Context ctx = new javax.naming.InitialContext();
    tools.findPage("tempWorkPage").putString ("testctx", ctx.toString());     
    javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("jdbc/gswWorkflowReportingData");
    tools.findPage("tempWorkPage").putString ("testds", ds.toString());
    java.sql.Connection conn = ds.getConnection();
    tools.findPage("tempWorkPage").putString ("testconn", conn.toString());
    java.sql.ResultSet lobDetails = null;
         try{
              byte [] ba = outputXML.getBytes();
              String query = "INSERT INTO GSW06U.pc_data_workattach(PZINSKEY,PXCREATEDATETIME,ATTACHDATE,PXUPDATEDATETIME,PXCREATEOPNAME,PXCREATEOPERATOR,PXCREATESYSTEMID,PXINSNAME,PXOBJCLASS,PXUPDATEOPNAME,PXUPDATEOPERATOR,PXUPDATESYSTEMID,PYLABEL,ATTACHEDBY,ATTACHNAME,NOTE,REFOBJECTKEY,ATTACHSTREAM) values(?,to_date(concat(substr(?,1,8),substr(?,10,6)),'YYYYMMDDHH24MISS'),to_date(concat(substr(?,1,8),substr(?,10,6)),'YYYYMMDDHH24MISS'),to_date(concat(substr(?,1,8),substr(?,10,6)),'YYYYMMDDHH24MISS'),?,?,?,?,?,?,?,?,?,?,?,?,?,EMPTY_BLOB())";
              tools.findPage("tempWorkPage").putString ("query", query);
              pstmt = conn.prepareStatement(query);
              pstmt.setString(1, pKey); // Bind PZINSKEY
              pstmt.setString(2, createDateTime); // Bind PZINSKEY
              pstmt.setString(3, createDateTime);
              pstmt.setString(4, attachDate);
              pstmt.setString(5, attachDate);
              pstmt.setString(6, updateDateTime);
              pstmt.setString(7, updateDateTime);
              pstmt.setString(8, createOpName);
              pstmt.setString(9, createOperator);
              pstmt.setString(10, createSystemID);
              pstmt.setString(11, insName);
              pstmt.setString(12, objClass);
              pstmt.setString(13, updateOpName);
              pstmt.setString(14, updateOperator);
              pstmt.setString(15, updateSystemID);
              pstmt.setString(16, label);
              pstmt.setString(17, attachedBy);
              pstmt.setString(18, attachName);
              pstmt.setString(19, note);
              pstmt.setString(20, refObjectKey);
              pstmt.execute(); // Execute SQL statement
              // Retrieve the row just inserted, and lock it for insertion of the LOB columns
              stmt = conn.createStatement();
              lobDetails = stmt.executeQuery("SELECT AttachStream FROM GSW06U.pc_data_workattach WHERE PZINSKEY = '" + pKey + "' FOR UPDATE");
              tools.findPage("tempWorkPage").putString ("idvalue", pKey);
              // Retrieve Blob streams for AttachStream column and load the sample XML
              if( lobDetails.next()) {
              //Get the CLOB from the resultset
              tempBlob = (oracle.sql.BLOB)lobDetails.getBlob(1);
              tools.findPage("tempWorkPage").putString ("pos1", "at pos1");
              // Open the temporary CLOB in readwrite mode, to enable writing
              tempBlob.open(oracle.sql.BLOB.MODE_READWRITE);
              tools.findPage("tempWorkPage").putString ("pos2", "at pos2");
              // Get the output stream to write
              tempBlobOStream = tempBlob.getBinaryOutputStream();
              tools.findPage("tempWorkPage").putString ("pos3", "at pos3");
              // Write the data into the temporary CLOB from the byte array
              tempBlobOStream.write(ba);
              // Flush and close the stream
              tempBlobOStream.flush();
              conn.commit();
              //Close everything
    tempBlobOStream.close();
              tempBlobOStream = null;
              tempBlob.close();
              tempBlob =null;
              lobDetails.close();
              lobDetails = null;
              stmt.close();
              stmt = null;
              pstmt.close();
              pstmt = null;
              conn.close(); // Return to connection pool
              conn = null; // Make sure we don't close it twice
         catch(java.sql.SQLException sqlexp) {
                   tempBlob.freeTemporary();
                   sqlexp.printStackTrace();
                   tools.findPage("tempWorkPage").putString ("SQLException", sqlexp.toString());
         catch(java.lang.Exception exp) {
                   tempBlob.freeTemporary();
                   tools.findPage("tempWorkPage").putString ("InnerException", exp.toString());
                   exp.printStackTrace();
         finally
              if (lobDetails != null) {
              try { lobDetails.close(); } catch (java.sql.SQLException e) { System.out.println(" Error while Freeing Result sets" + e.toString()); }
              lobDetails = null;
              if (stmt != null) {
              try { stmt.close(); } catch (java.sql.SQLException e) {System.out.println(" Error while Freeing java Statement" + e.toString()); }
              stmt = null;
              if (pstmt != null) {
              try { pstmt.close(); } catch (java.sql.SQLException e) {System.out.println(" Error while Freeing java PrepareStatement" + e.toString()); }
              pstmt = null;
              try{
              if (tempBlob != null) {
         // If the BLOB is open, close it
         if (tempBlob.isOpen()) {
         tempBlob.close();
         // Free the memory used by this BLOB
         tempBlob.freeTemporary();
              tempBlob = null;
              catch (Exception ex) { // Trap errors
              System.out.println(" Error while Freeing LOBs : " + ex.toString());
              if (conn != null) {
              try { conn.close(); } catch (java.sql.SQLException e) { System.out.println(" Error while Freeing Connection" + e.toString()); }
              conn = null;
    catch(java.lang.Exception e)
         tools.findPage("tempWorkPage").putString ("LangException", e.toString());
         e.printStackTrace();
    }

    Hello,
    I am getting the following errors when I am trying to
    insert in a BLOB in the oracle 9i database:
    java.sql.SQLException: ORA-00604: error occurred
    at recursive SQL level 1 ORA-06502: PL/SQL: numeric
    or value error ORA-06512: at line 205 ORA-22297:
    warning: Open LOBs exist at transaction commit
    time
    You're doing exactly what the error says, that is committing with an open LOB. Look at the following piece of code: you write in the LOB, you flush it and then commit. There is no closing of the LOB stream before committing.
    Try putting the tempBlobOStream.close() instruction before the commit.
    // Write the data into the temporary CLOB from the
    he byte array
              tempBlobOStream.write(ba);
              // Flush and close the stream
              tempBlobOStream.flush();
    nn.commit();
              //Close everything
    tempBlobOStream.close();

  • BLOB column datatype

    Hi
    I have one column which is of datatype BLOB.File was there in the blob column. File Contains the XML tags.My Requirement is need to extract the tag value.
    EX:in XLM i need to extract <name>Rajesh</name>
    Bottom line is Need to extract one tag value from BLOB dataype column which contains the file in which XML tags were there.
    Plz Help

    user12057782 wrote:
    Hi
    I have one column which is of datatype BLOB.File was there in the blob column. File Contains the XML tags.My Requirement is need to extract the tag value.
    EX:in XLM i need to extract <name>Rajesh</name> That's not good. BLOB should store binary data. CLOB should store character based data. XML is character based, so you could end up corrupting the XML by storing it in a BLOB.
    Oracle also has an XMLTYPE datatype specifically for storing XML data in, so why aren't you using that?
    Bottom line is Need to extract one tag value from BLOB dataype column which contains the file in which XML tags were there.Here's a basic example of extracting XML from an XMLTYPE (you can easily convert CLOB to XMLTYPE using it's constructor method)...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select XMLTYPE('<cube>
      2                                <dimension>
      3                                   <sourcename>A1</sourcename>
      4                                   <targetname>X1</targetname>
      5                                </dimension>
      6                                <dimension>
      7                                   <sourcename>B1</sourcename>
      8                                   <targetname>Y1</targetname>
      9                                </dimension>
    10                                <dimension>
    11                                   <sourcename>C1</sourcename>
    12                                   <targetname>Z1</targetname>
    13                                </dimension>
    14                             </cube>
    15                           ') as xml
    16             from dual
    17            )
    18  -- end of test data
    19  select x.*
    20  from t
    21      ,XMLTABLE('/cube/dimension'
    22                PASSING t.xml
    23                COLUMNS sourcename VARCHAR2(2) PATH '/dimension/sourcename'
    24*                      ,targetname VARCHAR2(2) PATH '/dimension/targetname') x
    SQL> /
    SO TA
    A1 X1
    B1 Y1
    C1 Z1
    SQL>If that isn't quite what you want, provide more information with your database version, example data and expected output, as detailed in the FAQ: {message:id=9360002}
    I'm surprised that as a member who's been here for 3 years+ and asked 32 questions, you still haven't understood how to ask a question so that people can help you. Perhaps that explains why you still have 27 question showing as unanswered.

  • Persist document in BLOB column problem

    Hi all,
    I'm having problem with persisting document in BLOB column.
    Using debuger I checked that document.doc contains correctly uploaded file before persist. There are other attributes of document and they are persisted correctly, but when I check blob size in database it size is 1byte which is incorrect.
    After I persist second file, first one get his correct size value, and size of second one is 1byte.
    If I stop weblogic server, second value will never be populated. If I only restart application without restarting server, and then upload third document, size of second one will be corrected.
    Oracle JDeveloper 11g R1 11.1.1.2.0
    Oracle DataBase 10gR2
    Using ADF 11g RC & EJB
    I set id manually.
    Entity Document.java:...
    @Entity
    @NamedQueries({
      @NamedQuery(name = "Document.findAll", query = "select o from Document o")
    public class Document implements Serializable {
        @Id
        private Long id;
        @Lob
        private byte[] doc;
        private String title;
        private String type;
    }Here is persistence.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                 version="1.0">
      <persistence-unit name="Model">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <jta-data-source>jdbc/FileUDS</jta-data-source>
        <class>fu.model.entity.Document</class>
        <properties>
          <property name="eclipselink.target-server" value="WebLogic_10"/>
          <property name="javax.persistence.jtaDataSource" value="jdbc/FileUDS"/>
        </properties>
      </persistence-unit>
    </persistence>Here is sample project with DDL for document table:[url http://uploading.com/files/52m65757/TestFileUpload.zip]TestFileUpload.zip

    Finest log when it doesn't work:
    [EL Finest]: 2010-09-22 15:01:12.732--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Begin deploying Persistence Unit Model; state Predeployed; factoryCount 1
    [EL Finest]: 2010-09-22 15:01:12.748--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Begin weaver class transformer processing class [fu.model.entity.Dummy].
    [EL Finest]: 2010-09-22 15:01:12.748--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Weaved persistence (PersistenceEntity) [fu.model.entity.Dummy].
    [EL Finest]: 2010-09-22 15:01:12.748--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Weaved change tracking (ChangeTracker) [fu.model.entity.Dummy].
    [EL Finest]: 2010-09-22 15:01:12.748--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Weaved fetch groups (FetchGroupTracker) [fu.model.entity.Dummy].
    [EL Finest]: 2010-09-22 15:01:12.748--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--End weaver class transformer processing class [fu.model.entity.Dummy].
    [EL Finer]: 2010-09-22 15:01:12.794--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Could not initialize Validation Factory. Encountered following exception: java.lang.NoClassDefFoundError: javax/validation/Validation
    [EL Finest]: 2010-09-22 15:01:12.81--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.target-server; value=WebLogic_10; translated value=org.eclipse.persistence.platform.server.wls.WebLogic_10_Platform
    [EL Finest]: 2010-09-22 15:01:12.81--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.logging.level; value=FINEST; translated value=FINEST
    [EL Finest]: 2010-09-22 15:01:12.81--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.logging.level; value=FINEST; translated value=FINEST
    [EL Finest]: 2010-09-22 15:01:12.81--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.target-database; value=Oracle10g; translated value=org.eclipse.persistence.platform.database.oracle.Oracle10Platform
    [EL Finest]: 2010-09-22 15:01:12.826--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=javax.persistence.jtaDataSource; value=jdbc/OracleTextDS
    [EL Finest]: 2010-09-22 15:01:12.841--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.cache.shared.default; value=false; translated value=false
    [EL Finest]: 2010-09-22 15:01:12.841--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.jdbc.native-sql; value=true
    [EL Info]: 2010-09-22 15:01:12.873--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--EclipseLink, version: Eclipse Persistence Services - 1.2.0.v20091016-r5565
    [EL Info]: 2010-09-22 15:01:12.873--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Server: WebLogic Server 10.3.2.0  Tue Oct 20 12:16:15 PDT 2009 1267925
    [EL Config]: 2010-09-22 15:01:12.888--ServerSession(32436700)--Connection(25502890)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/OracleTextDS
    [EL Config]: 2010-09-22 15:01:12.951--ServerSession(32436700)--Connection(31684552)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Connected: jdbc:oracle:thin:@itimserver:1521:omnidb
         User: OTEXT
         Database: Oracle  Version: Oracle Database 10g Release 10.2.0.1.0 - Production
         Driver: Oracle JDBC driver  Version: 11.1.0.7.0-Production
    [EL Config]: 2010-09-22 15:01:12.966--ServerSession(32436700)--Connection(13432760)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/OracleTextDS
    [EL Config]: 2010-09-22 15:01:12.966--ServerSession(32436700)--Connection(10190221)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Connected: jdbc:oracle:thin:@itimserver:1521:omnidb
         User: OTEXT
         Database: Oracle  Version: Oracle Database 10g Release 10.2.0.1.0 - Production
         Driver: Oracle JDBC driver  Version: 11.1.0.7.0-Production
    [EL Info]: 2010-09-22 15:01:13.576--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--file:/C:/oracle/Middleware/jdeveloper/system11.1.1.2.36.55.36/o.j2ee/drs/TestFileUpload/ModelEJB.jar/-Model login successful
    [EL Finest]: 2010-09-22 15:01:13.591--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The applicationName for the MBean attached to session [file:/C:/oracle/Middleware/jdeveloper/system11.1.1.2.36.55.36/o.j2ee/drs/TestFileUpload/ModelEJB.jar/-Model] is [TestFileUpload]
    [EL Finest]: 2010-09-22 15:01:13.591--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The moduleName for the MBean attached to session [file:/C:/oracle/Middleware/jdeveloper/system11.1.1.2.36.55.36/o.j2ee/drs/TestFileUpload/ModelEJB.jar/-Model] is [TestFileUpload-ViewController-context-root]
    [EL Finest]: 2010-09-22 15:01:13.591--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--End deploying Persistence Unit Model; state Deployed; factoryCount 1
    [EL Finer]: 2010-09-22 15:01:13.623--ServerSession(32436700)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client acquired
    [EL Finer]: 2010-09-22 15:01:13.623--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX binding to tx mgr, status=STATUS_ACTIVE
    [EL Finest]: 2010-09-22 15:01:13.623--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--PERSIST operation called on: fu.model.entity.Document@d52347.
    [EL Finer]: 2010-09-22 15:01:13.638--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beforeCompletion callback, status=STATUS_ACTIVE
    [EL Finer]: 2010-09-22 15:01:13.638--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--begin unit of work commit
    [EL Finer]: 2010-09-22 15:01:13.654--ClientSession(22623994)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beginTransaction, status=STATUS_ACTIVE
    [EL Finest]: 2010-09-22 15:01:13.669--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query InsertObjectQuery(fu.model.entity.Document@d52347)
    [EL Finest]: 2010-09-22 15:01:13.685--ClientSession(22623994)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
    [EL Fine]: 2010-09-22 15:01:13.685--ClientSession(22623994)--Connection(6662457)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--INSERT INTO DOCUMENT (ID, TITLE, DOC, TYPE) VALUES (?, ?, ?, ?)
         bind => [106, Oracle Text 106, [B@b48094, DOC]
    [EL Fine]: 2010-09-22 15:01:13.732--ClientSession(22623994)--Connection(6662457)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT DOC FROM DOCUMENT WHERE (ID = ?) FOR UPDATE
         bind => [106]
    [EL Finest]: 2010-09-22 15:01:13.873--ClientSession(22623994)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Writing BLOB value(size = 152,064 bytes) through the locator to the table field: DOC
    [EL Finer]: 2010-09-22 15:01:13.888--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX afterCompletion callback, status=COMMITTED
    [EL Finer]: 2010-09-22 15:01:13.888--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--end unit of work commit
    [EL Finer]: 2010-09-22 15:01:13.888--UnitOfWork(9288343)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--release unit of work
    [EL Finer]: 2010-09-22 15:01:13.888--ClientSession(22623994)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client releasedFinest log when it works:
    [EL Finest]: 2010-09-22 15:09:29.741--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Begin deploying Persistence Unit Model; state Predeployed; factoryCount 1
    [EL Finer]: 2010-09-22 15:09:29.787--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Could not initialize Validation Factory. Encountered following exception: java.lang.NoClassDefFoundError: javax/validation/Validation
    [EL Finest]: 2010-09-22 15:09:29.803--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.target-server; value=WebLogic_10; translated value=org.eclipse.persistence.platform.server.wls.WebLogic_10_Platform
    [EL Finest]: 2010-09-22 15:09:29.803--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.logging.level; value=FINEST; translated value=FINEST
    [EL Finest]: 2010-09-22 15:09:29.803--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.logging.level; value=FINEST; translated value=FINEST
    [EL Finest]: 2010-09-22 15:09:29.803--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.target-database; value=Oracle10g; translated value=org.eclipse.persistence.platform.database.oracle.Oracle10Platform
    [EL Finest]: 2010-09-22 15:09:29.834--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=javax.persistence.jtaDataSource; value=jdbc/OracleTextDS
    [EL Finest]: 2010-09-22 15:09:29.834--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.cache.shared.default; value=false; translated value=false
    [EL Finest]: 2010-09-22 15:09:29.834--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--property=eclipselink.jdbc.native-sql; value=true
    [EL Info]: 2010-09-22 15:09:29.866--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--EclipseLink, version: Eclipse Persistence Services - 1.2.0.v20091016-r5565
    [EL Info]: 2010-09-22 15:09:29.866--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Server: WebLogic Server 10.3.2.0  Tue Oct 20 12:16:15 PDT 2009 1267925
    [EL Config]: 2010-09-22 15:09:29.881--ServerSession(29669964)--Connection(16935504)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/OracleTextDS
    [EL Config]: 2010-09-22 15:09:29.944--ServerSession(29669964)--Connection(32957960)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Connected: jdbc:oracle:thin:@itimserver:1521:omnidb
         User: OTEXT
         Database: Oracle  Version: Oracle Database 10g Release 10.2.0.1.0 - Production
         Driver: Oracle JDBC driver  Version: 11.1.0.7.0-Production
    [EL Config]: 2010-09-22 15:09:29.944--ServerSession(29669964)--Connection(7874461)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/OracleTextDS
    [EL Config]: 2010-09-22 15:09:29.944--ServerSession(29669964)--Connection(7387593)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Connected: jdbc:oracle:thin:@itimserver:1521:omnidb
         User: OTEXT
         Database: Oracle  Version: Oracle Database 10g Release 10.2.0.1.0 - Production
         Driver: Oracle JDBC driver  Version: 11.1.0.7.0-Production
    [EL Info]: 2010-09-22 15:09:30.428--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--file:/C:/oracle/Middleware/jdeveloper/system11.1.1.2.36.55.36/o.j2ee/drs/TestFileUpload/ModelEJB.jar/-Model login successful
    [EL Finest]: 2010-09-22 15:09:30.444--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The applicationName for the MBean attached to session [file:/C:/oracle/Middleware/jdeveloper/system11.1.1.2.36.55.36/o.j2ee/drs/TestFileUpload/ModelEJB.jar/-Model] is [TestFileUpload]
    [EL Finest]: 2010-09-22 15:09:30.444--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The moduleName for the MBean attached to session [file:/C:/oracle/Middleware/jdeveloper/system11.1.1.2.36.55.36/o.j2ee/drs/TestFileUpload/ModelEJB.jar/-Model] is [TestFileUpload-ViewController-context-root]
    [EL Finest]: 2010-09-22 15:09:30.444--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--End deploying Persistence Unit Model; state Deployed; factoryCount 1
    [EL Finer]: 2010-09-22 15:09:30.475--ServerSession(29669964)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client acquired
    [EL Finer]: 2010-09-22 15:09:30.491--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX binding to tx mgr, status=STATUS_ACTIVE
    [EL Finest]: 2010-09-22 15:09:30.491--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--PERSIST operation called on: fu.model.entity.Document@1b12136.
    [EL Finest]: 2010-09-22 15:09:30.491--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--PERSIST operation called on: fu.model.entity.Dummy@1fc0ac1.
    [EL Finer]: 2010-09-22 15:09:30.491--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beforeCompletion callback, status=STATUS_ACTIVE
    [EL Finer]: 2010-09-22 15:09:30.491--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--begin unit of work commit
    [EL Finer]: 2010-09-22 15:09:30.506--ClientSession(3813659)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beginTransaction, status=STATUS_ACTIVE
    [EL Finest]: 2010-09-22 15:09:30.537--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query InsertObjectQuery(fu.model.entity.Document@1b12136)
    [EL Finest]: 2010-09-22 15:09:30.553--ClientSession(3813659)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
    [EL Fine]: 2010-09-22 15:09:30.553--ClientSession(3813659)--Connection(31488401)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--INSERT INTO DOCUMENT (ID, TITLE, DOC, TYPE) VALUES (?, ?, ?, ?)
         bind => [107, Oracle Text 107, [B@88e6ad, DOC]
    [EL Fine]: 2010-09-22 15:09:30.584--ClientSession(3813659)--Connection(31488401)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT DOC FROM DOCUMENT WHERE (ID = ?) FOR UPDATE
         bind => [107]
    [EL Finest]: 2010-09-22 15:09:30.725--ClientSession(3813659)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Writing BLOB value(size = 152,064 bytes) through the locator to the table field: DOC
    [EL Finest]: 2010-09-22 15:09:30.725--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query InsertObjectQuery(fu.model.entity.Dummy@1fc0ac1)
    [EL Fine]: 2010-09-22 15:09:30.725--ClientSession(3813659)--Connection(31488401)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--INSERT INTO DUMMY (ID, DUMMYCOLUMN, DOCUMENT_ID) VALUES (?, ?, ?)
         bind => [107, null, null]
    [EL Finer]: 2010-09-22 15:09:30.772--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX afterCompletion callback, status=COMMITTED
    [EL Finer]: 2010-09-22 15:09:30.772--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--end unit of work commit
    [EL Finer]: 2010-09-22 15:09:30.772--UnitOfWork(5094647)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--release unit of work
    [EL Finer]: 2010-09-22 15:09:30.772--ClientSession(3813659)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client releasedRegards,
    Alexandar

  • How to upload/download file into/from blob column in ADF/JDev 11g.

    Hello to all.
    I found demo from Kuba user on that page: http://kuba.zilp.pl/?id=1
    But that demo is for release 10g and too complicated for me for this time (I'm fish in Jdeveloper).
    I can create some simple table view (of form view) with oracle connection with table with blob data.
    Blob column will content doc/xls/pdf ...etc.
    Now I can add two buttons for download and upload.
    What I have to do in next time?
    Is it possible to use some component or something?
    Thank you
    Ben

    I was able to accomplish downloading from a blob, but I'm trying to dynamically set the ContentType.
    As the table may contain different types of files, I'm setting the ContentType to #{row.Fileext}, where Fileext is set in SQL select as follows:
    pseudocode: get file extension, and set the content type based on file extension.
    sql select :decode(substr(fdv.file_name,instr(fdv.file_name,'.',-1,1)+1),'log','text/plain; charset=utf-8','xml','text/xml','xls','application/vnd.ms-excel','tif','image/tiff','jpg','image/jpeg','unknown')
    I rather use a fuction/method, and tried the following instead:
    ContentType = #{backingBeanScope.backing_processReqs.FileAttachContType}
    where FileAttachContType =
    public class ProcessReqs {
    public String FileAttachContType() {
    // code to substring filename for extension and decode values
    return strContType
    But I get the following error:
    Error 500--Internal Server Error
              javax.el.PropertyNotFoundException: The class 'sunrider.reqpoportal.view.backing.ProcessReqs' does not have the property 'FileAttachContType'.
                   at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
                   at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
                   at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    Ideas?
    PS: Kuba, I've been trying to get to your blog all day, and it would just time out.
    Thanks everyone in advance!
    -R
    Edited by: user6631964 on Jul 24, 2009 5:55 PM

  • Blob Column in Data Template

    Below is simple Example I tried and output doesnot look right.
    Note: My Blob Database Column is "LOGO".
    Sample Data Template:
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <dataTemplate name="Employee_Listing" description="List of
    Employees">
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT EMPNO,ENAME,JOB,LOGO from
    EMP]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_EMP" source="Q1">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="LOGO" value="LOGO" />
    </group>
    </dataStructure>
    </dataTemplate>
    Sample Ouput Created
    <?xml version="1.0" encoding="UTF-8"?>
    <EMPLOYEE_LISTING>
    <LIST_G_EMP>
    <G_EMP>
    <EMPLOYEE_NUMBER>999</EMPLOYEE_NUMBER>
    <NAME>PILLAI</NAME>
    <JOB>MGR</JOB>
    <LOGO/>
    </G_EMP>
    </LIST_G_EMP>
    </EMPLOYEE_LISTING>
    My Question is :
    Does output should have only a TAG for Blob Column or it should have image data
    which can be rendered through Template using fo:instream tags.
    Am I hitting any bug which is preventing retrieving Blob data through XML data template

    I need to get data out of a BLOB column from a table in an Oracle 8i database and into a file that I can put into a MS Word template. The data in the BLOB column came from a MS Word document. What is the best way to proceed? We have a LOB datatype sample which shows how to save a blob from the DB to a local file at http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
    I'd save it to a temp file and then using word add it. You could also spawn wscript.exe to run a Windows VB Script to automate word from the java application.
    Rob

  • Associative array type for each blob column in the table

    i am using the code in given link
    http://www.oracle.com/technology/oramag/oracle/07-jan/o17odp.html
    i chnages that code like this
    CREATE TABLE JOBS
    JOB_ID VARCHAR2(10 BYTE),
    JOB_TITLE VARCHAR2(35 BYTE),
    MIN_SALARY NUMBER(6),
    MAX_SALARY NUMBER(6),
    JOBPIC BLOB
    CREATE OR REPLACE PACKAGE associative_array
    AS
    -- define an associative array type for each column in the jobs table
    TYPE t_job_id IS TABLE OF jobs.job_id%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_job_title IS TABLE OF jobs.job_title%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_min_salary IS TABLE OF jobs.min_salary%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_max_salary IS TABLE OF jobs.max_salary%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_jobpic IS TABLE OF jobs.jobpic%TYPE
    INDEX BY PLS_INTEGER;
    -- define the procedure that will perform the array insert
    PROCEDURE array_insert (
    p_job_id IN t_job_id,
    p_job_title IN t_job_title,
    p_min_salary IN t_min_salary,
    p_max_salary IN t_max_salary,
    p_jobpic IN t_jobpic
    END associative_array;
    CREATE OR REPLACE package body SHC_OLD.associative_array as
    -- implement the procedure that will perform the array insert
    procedure array_insert (p_job_id in t_job_id,
    p_job_title in t_job_title,
    p_min_salary in t_min_salary,
    p_max_salary in t_max_salary,
    P_JOBPIC IN T_JOBPIC
    ) is
    begin
    forall i in p_job_id.first..p_job_id.last
    insert into jobs (job_id,
    job_title,
    min_salary,
    max_salary,
    JOBPIC
    values (p_job_id(i),
    p_job_title(i),
    p_min_salary(i),
    p_max_salary(i),
    P_JOBPIC(i)
    end array_insert;
    end associative_array;
    this procedure is called from .net. from .net sending blob is posiible or not.if yes how

    Ok, that won't work...you need to generate an image tag and provide the contents of the blob column as the src for the image tag.
    If you look at my blog entry -
    http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/
    and download that Whitepaper that I talk about you will find an example of how to do what you want to do. Note the majority of that whitepaper is discussing other (quite advanced) topics, but there is a small part of it that shows how to display an image stored as a blob in a table.

Maybe you are looking for

  • Playlist selected for synching no longer exists - can't synch ipod

    I just installed itune yesterday. Not sure why this error has popped up, but after getting all my music into the itunes folder, there is no longer anything on the ipod itslef, adn I receive this error message. How can I reset the ipod to synch withou

  • PC no longer recognises my iPhone after trying to update to iOS 5...Help!?!?

    When returning from popping out of the house, as the Back UP and Update was taking forever, I came home to find that my iPhone has updated to iOS 5 but failed to Restore itself.  On top of this my PC no longer recognises my iPhone and issues a messag

  • Please help me with the following questions

    Oracle 10g Administration Workshop II Examination 3 Hours 1.     Create a recovery catalog recodb. Register with reodb all available database service on the server machine. 20 marks 2.     Configure RMAN so that backups:           a. run in two chann

  • ADF components do not display Chinese simplified (showing English instead)

    Dear All I am having a problem getting ADF components to display in Chinese simplified language. Buttons display in Chinese correctly however components such as: < af:table > (the previous and next values do not display in Chinese, again in English o

  • Is the Mac Mini right for me?

    I've been fighting with my PC for years, and I am finally giving up. I'm looking forward to joining the Mac community. I want to buy a mac mini with the new Leopard OSX(10.5), however, I have some unique requirements: - I live on a boat in Avalon Har