Blob is a diablo??

Hello,everyone
I am using EL expression and found big problem which has been troubling since this morning!
I use the sql like:
SELECT path,formats,create_time,name,GROUP_CONCAT(tag_name) FROM...
Take action there is a GROUP_CONCAT( ) function in MySQL, which returns a Blob field in the resultSet, you know.That's the root of this tough problem.
I found EL expression cant display field which is a Blob type. The part of Latina characters (iso8859-1) can be shown prefectly,but the part of Chinese which is not iso8859-1 cant be shown correctly. They will be a square instead.
So could you help me out?Have you any expriences in this problem?
Some workmate advise me to use scriptlet to reslove it... It really works!
But if EL expression can also reslove this problem, I 'd rather to use it firstly...
Thank you reading these above patiently...
And best regards to you!

up!

Similar Messages

  • Need help to open a blob from a report into another tab or browser window.

    Hello everyone.
    I'm looking for a bit of guidance on something I'm trying to do in Apex.
    I have a report that contains a blob. Users can click on the link to open it in same browser. I also know how to make it download if they click the link. But what I really want to do is to click the link and open the blob in another tab or browser window.
    Thank you in advance for your help.
    Dw
    I should have noted I'm using version 3.2
    Edited by: DW Brown on Feb 22, 2012 3:13 PM

    DW Brown wrote:
    It becomes a link from the column format section..
    DOWNLOAD:<tablename>:<column>:ID::MIMETYPE:FILENAME:LAST_UPDATE_DATE::inline:Click Here
    So far I haven't found a way to use something link "target=_blank"One way would be to use a Dynamic Action to apply the <tt>target="_blank"</tt> attribute to each link, or convert them to use APEX pop-ups or a jQuery lightbox like fancyBox.
    Create an example on apex.oracle.com if you need more assistance.

  • Help, how to open and display blobs from tables

    Dear all,
    I am trying to store ms-word files on a table using a blob column.
    Does anyone how to open the files and display them from a form using 9iAS?
    Thank you.
    Carlos.

    And there may be, but you won't likely find that here. Do some time searching Google and maybe you'll find code that someone was nice enough to make freely available, although I wouldn't count on it. Were i a programmer and took the time to read those docs and write the code, I'd want to be paid for my time. But there are a lot of programmers who swear by freeware! You may get lucky.

  • How to retrieve all the data from a BLOB using view-generated accessor

    I am using JDeveveloper 10g v. 10.1.3 and am storing an image in a database as a blob object and need to retrieve all of the data to get the entire image and store it in an ImageIcon. The code I have works partially in that it retrieves the correct data, but only gets a piece of it, leaving me with a partial image.
    AppModuleImpl am;
    ImageVwViewImpl vo;
    am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
    vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
    ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();
    ImageIcon icon = new ImageIcon(ivo.getImage().getBytes(1, (int)ivo.getImage().getBufferSize()));
    jULabel1.setIcon(icon);I either need to know how to use a stream to get the data out (from BlobDomain method getBinaryStream()), or how to get the other chunks of data separately.
    edit: I know the problem is that getBufferSize() returns an int which is too small to hold all the data, but need to know what to use instead. Thanks!

    This is the code I'm using now. Same problem :(
    AppModuleImpl am;
            ImageVwViewImpl vo;
            am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
            vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
            ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();  
            ImageIcon icon = new ImageIcon(ivo.getImage().toByteArray());
            jULabel1.setIcon(icon);

  • Error while importing a table with BLOB column

    Hi,
    I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
    "CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
    "DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
    "ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
    "ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
    "TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
    " 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
    "4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
    "IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
    "OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
    "AULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
    I used the import command as follows :
    imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
    What can I do so that this table gets imported correctly?
    Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
    Thanks in advance.

    Hello,
    U can either
    1) create a tablespace with the same name in destination where you are trying to import.
    2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
    Regards,
    Vinay

  • Error while trying to store PDF in Oracle's BLOB field

    Hi folks!
    I'm having problems while trying to store PDF file in a BLOB field of an Oracle table
    This is the message code:
    Exception in thread "main" java.sql.SQLException: Data size bigger than max size for this type: 169894
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:95)
    at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:2414)
    at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1134)
    at oracle.jdbc.driver.OraclePreparedStatement.setBytes(OraclePreparedStatement.java:2170)
    at vgoactualizacion.Main.main(Main.java:84)     
    This is the piece of code i'm using:
    Assuming conn = conection to Oracle 10g Database ( it's working )
    String miProcedimientoAlmacenado = "{ call package_name.update_client(?,?, ?) }";
    CallableStatement miComando = conn.prepareCall(miProcedimientoAlmacenado);
    miComando.setString(1,miClienteID ); //first parameter : IN
                   //second parameter : IN
    File miPDF = new File(pathPDF + "//" + miClienteID + ".pdf");
    byte[] bodyIn = readFully(miPDF); //readFully procedure is shown below
    miComando.setBytes(2, bodyIn); //THIS IS THE LINE WHERE THE ERROR IS PRODUCED
              //3rd parameter: OUT
    miComando.registerOutParameter(3, java.sql.Types.VARCHAR);
    miComando.execute();
    private static byte[] readFully(File miPDF) throws FileNotFoundException, IOException {
    FileInputStream fis = new FileInputStream(miPDF);
    byte[] tmp = new byte[1024];
    byte[] data = null;
    int sz, len = 0;
    while ((sz = fis.read(tmp)) != -1) {
    if (data == null) {
    len = sz;
    data = tmp;
    } else {
    byte[] narr;
    int nlen;
    nlen = len + sz;
    narr = new byte[nlen];
    System.arraycopy(data, 0, narr, 0, len);
    System.arraycopy(tmp, 0, narr, len, sz);
    data = narr;
    len = nlen;
    if (len != data.length) {
    byte[] narr = new byte[len];
    System.arraycopy(data, 0, narr, 0, len);
    data = narr;
    return data;
    }//fin readFully
    This approach indicates that the PDF file is converted into an array of bytes, then is stored as binary in the BLOB field.
    Thanx in advance, and looking forward for your comments.

    You will probably need to use the setBinaryStream() method instead of setBytes().

  • Oracle Rdb Driver 3.1.0.0 problem with blobs

    I am trying to convert an MsAccess application to use an MsAccess front end and an Oracle Rdb back end.
    I've created the test database under VMS and can successfully link to the Oracle Rdb tables from MSAccess 2000. One of the main reasons for converting to Oracle Rdb is to be able to store large word documents in the database. I was able to do that using Oracle rdb Driver v 3.00.02.06. I recently converted to Oracle Rdb Driver version 3.1.0.0 and can no longer access the Blob field containing the Word document. MsAccess now sees this field as type ‘Binary’ and I keep getting an ‘invalid field type’ error. (with 3.00.02.06 this field was seen by MsAccess as an ‘Ole Object’ and the getchunk and appendchunk functions for getting and saving a blob worked reasonably well).
    Is this a bug in 3.1.0.0 or is there some way to get MsAccess to recognize this Binary field type?

    I suspect you'll need to contact Oracle support on this. There aren't, to my knowledge, any RDB folks around here.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to find out list of clob/blob tables in a schema

    Hi,
    I have tricky situation...i have 119 tables out of which 11 tables are clob/blob tables...is there any view where i can find out list of tables are clob/blob tables? (at schema level view means user_<>)
    -- Raman.

    USER_TAB_COLS includes the data type, column name, and table name for each column in each table in the system. You could query that looking for columns with a DATA_TYPE of CLOB or BLOB. If some tables have multiple LOB columns and you want them to appear only once, you'd have to throw a DISTINCT on the table name.
    Justin

  • Report with a Download link for a Pdf stored in Blob in database FND tables

    We attach a pdf file in the Receivables invoices in Oracle EBS. We use APEX to report from EBS tables. We have a requirement to have a APEX report to display the pdf attached to the invoices with a capability to download the pdf. These pdf are stored in a blob column in fnd_lobs table.
    Any pointers on how to approach is highly appreciated.
    Thanks
    Jo

    check this How to Upload and Download Files in an Application
    let me know if you have any doubts

  • BLOB in DECODE function

    Hi All,
    I am new to sql. I want to use decode for BLOB datatype. For this i written a query like below.
    Here user_data is of type BLOB.
    select DECODE(length(user_data), 0, null, file_data) user_data from user_table;
    I have tried the other way by using case like below. Its worked fine
    select
    CASE
    WHEN LENGTH(user_data )=0
    THEN NULL
    ELSE user_data
    END user_data from user_table;
    What i made wrong in the first query?
    Thanks
    Jimmi

    >
    Its just a wrong typo
    >
    Thanks.
    The problem is that this decode
    select DECODE(length(user_data), 0, null, file_data) user_data from user_table; expects you to return a number and you are returning a BLOB.
    Were you getting 'ORA-00932: inconsistent datatypes: expected BLOB got NUMBER'?
    See the DECODE function in the SQL doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions042.htm

  • How to view PDF files strored in a BLOB column

    Hi all,
    I want to display a PDF file, stored in a BLOB column, in a form or through a JavaBean.
    But the problem is more complicated then that. I do not want to retrieve the PDF file in the application server that show it through a browser.
    Actually, I do not want users to get the entire file, I just want them to see it or print it.
    I want, in fact, to display a "stream" of bytes through Oracle Forms. Not a file.
    This one, sounded to be a good solution, but actually not. When the file was too big (multiple pages), the application was blocked until the entire file was loaded. And when you try to print it, it wasn't printed right. The advantage of this solution is that it is open-source so we can add methods to connect to the DB, retrieve the content of the BLOB column and displays it without downloading the file.
    Here is a good solution. Really good, files are loaded quickly, the rendering is really good and the file is printed perfectly (as it was printed from Adobe Acrobat). The disadvantage of this solution is that it is not open-source and is really expansive.
    As you can see, both solutions uses PJC.
    So any help, any idea to solve my problem will be highly appreciated.
    Thanks to all of you,
    Amine
    PS : I am using F&R 11gR2

    Not entirely. At least we came to the conclusion it doesn't make (much) sense to block the save option of PDFs if you want to allow printing them
    Anyway; there is of course another possibilty: you could always write your own java bean PDF reader; there are plenty of java PDF libraries available:
    Open Source PDF Libraries in Java
    The easiest way would be to choose one which can open a PDF from a URL and render it; I would retrieve the image via mod_plsql using WPG_DOCLOAD and simply use the PDF library to render the PDF. No tempfiles anyway, and if you don't implement it there is also no save button.
    cheers

  • Can not display BLOB in a REPORT Portal 3.0.9

    I had created a table witha blob field.
    I want to display this field in a report to display the documento from the aplicaction.
    What can i do ?

    Hi,
    BLOBs are not supported in reports as of now.
    Thanks,
    Sharmila

  • Not able to Read Blob ( BlobDomain) Xml Data from DB

    I am trying to read a BLOB file from Data base with the below code . However , i am facing 2 challenges - which i need ur help..
    1. the data is not in readable format , may be i am missing some more code or encoding somewhere . ( this is how data is printing-- �B�...........)
    2. Throwing an exception in the end
    The Blob Data types appears as BlobDomain in the entity defination . My jdev is 11.1.1.5
    +{+
    +..............+
    oracle.jbo.domain.BlobDomain  blobDomainXml = (BlobDomain)r.getAttribute("Document");
    System.out.println(" XML Out Put = "blobDomainXml);+
    +}+
    public ViewObject getBlobObject(){
    return (ViewObjectImpl)findViewObject("getBlobObject1");
    below is exception after the call ---
    Caused by: java.lang.NullPointerException
         at oracle.jbo.server.ViewRowSetIteratorImpl.getViewObject(ViewRowSetIteratorImpl.java:238)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getSyncLock(ViewRowSetIteratorImpl.java:178)
         at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:1904)
         at com.stryker.gtc.view.bean.LoginPageName.getBlob(LoginPageName.java:243)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)

    The Blob xml has used some encoding . If i use the below italic code in main class , i can get the proper xml . However , It uses the blob resultset but I get exception if i try with ADF blob domain .
    below is the code in a simple main method class and gives me the desired xml .
    ResultSet rset = statement.executeQuery("Select * from XML_DOCUMENT where DOCUMENT_ID=(Select DOCUMENT_ID from DOCUMENT_DLV_MSG_REF where MESSAGE_GUID = (Select MESSAGE_GUID from DLV_MESSAGE \n" +
    "where CIKEY = (Select CIKEY from CUBE_INSTANCE where CMPST_ID='1931038')))");
    +try {+
    XMLDOMImplementation domimpl = new XMLDOMImplementation();
    +while (rset.next()) {+
    BinXMLProcessor proc =  BinXMLProcessorFactory.createProcessor()  ;
    BinXMLStream inpbin = proc.createBinXMLStream(rset.getBlob("DOCUMENT"));
    BinXMLDecoder dec = inpbin.getDecoder();
    InfosetReader xmlreader = dec.getReader();
    XMLDocument doc = (XMLDocument)domimpl.createDocument(xmlreader);
    doc.print(System.out);
    +}+
    +} catch (Exception e) {+
    System.out.println(" Exception ="e);+
    +}+
    But , In ADF we have Blob Domian in the entity defination , auto generated ...
    Row r = iter.next();
    oracle.jbo.domain.BlobDomain blob = (*BlobDomain*)r.getAttribute("Document");
    try
    XMLDOMImplementation domimpl = new XMLDOMImplementation();
    BinXMLProcessor proc = BinXMLProcessorFactory.createProcessor() ;
    BinXMLStream inpbin = proc.createBinXMLStream(blob.getInputStream());
    BinXMLDecoder dec = inpbin.getDecoder();
    InfosetReader xmlreader = dec.getReader();
    now in the above higlighted code I get java.lang.IllegalArgumentException . I do not find a way to convert BlobDomain to blob . even no decoder in blob Domain .
    May be you can help ..
    Edited by: Amitava Biswas on Sep 12, 2012 11:13 AM

  • Can not retrieve cell data content From BLOB object.

    I have load Image into Georaster with Raster_Table following:
    create table rdt_1 of mdsys.sdo_raster
    (primary key (rasterId, pyramidLevel, bandBlockNumber,
    rowBlockNumber, columnBlockNumber))
    lob(rasterblock) store as (nocache nologging);
    After I load Image successful, I continue load all cell data into BLOB object by:
    DECLARE
    gr sdo_georaster;
    lb blob;
    BEGIN
    SELECT georaster INTO gr FROM georaster_table WHERE georid=2;
    dbms_lob.createTemporary(lb, FALSE);
    sdo_geor.getRasterData(gr, 0, lb);
    dbms_lob.freeTemporary(lb);
    END;
    Please give me simple PL/SQL to retrieval content from BLOB object!
    Thank You very much!
    YuMi

    BLOB stands for Binary Large OBject. However the acronym has a pleasing affinity with the actual nature of the thing. In a database a BLOB is an undiffereniated mass of bytes. We don't know whether it's a spreadsheet or a word document or an image. So there is no out-of-the-box API for treating a BLOB as it's native file type.
    Having said that there may be something in the Spatial API that works with such things - you might be better off asking the question in Spatial. Although I suspect that venue doesn't get as much through traffic as this one.
    Cheers, APC

  • Can i see the column DATA(BLOB type) in PM_OBJECTS of DCM schema

    we installed DCM managed clustering .it is Database repository type.
    i am trying to see the column DATA(BLOB type) in PM_OBJECTS of DCM schema .
    I wrote a program in java to read blob data type and write it into a temporary file.
    when i open temporary files all the data in junk format.
    can i see the real data of thatcolumn.Is it possible?
    first of all for what purpose DCM shema will be used?

    Hi,
    There is no option to show the comments on the diagram.
    We plan to add such feature in the next version.
    Ivan

Maybe you are looking for