Skip to Content
author's profile photo Former Member
Former Member

oracle blob issue

I am facing a hard time with uploading an image with size > 4k to oracle db ..

The native java.sql.blob object does not support the image files greater that 4000 bytes with preparedStatment.setBinaryStream or .setObject

also the .setBlob throws "not supported feature" exception ..

and when I tried to use the native Oracle BLOB object I get a runtime error saying that oracle/sql/BLOB class not found . for this case I tried to create a child DC of type external Library and I included the ojdbc14.jar but with no luck..

I really appreciate your help to resolve this annoying issue ..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 12:49 PM

    Hi,

    While adding the jar file to the external DC, also please refer to following blog and check if you are not missing anything:

    /people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components

    Hope it helps.

    Regards.

    Rajat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 12:29 PM

    Hi,

    Just try using CLOB instead of BLOB object. It can solve your query.

    OR can you compress the image to tif format then also it can be worked out.

    Regards.

    Rajat

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Rajat ,

      Actually I am using a java.sql.Clob to store large object text and it is working perfectly ..

      the issue is with a binary object (image) which is small in size (like 20 kb only) ..

      I found that there is a limitation in native java.sql.Bob object in saving files >4KB and the solution is to use oracle.sql.BLOB instead. but the problem here that it is not avalible at runtime on the server ..

      any idea ?

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 12:45 PM

    Hi Ibrahim,

    Please go through the following link:

    http://www.codeproject.com/KB/database/Blobfield.aspx

    It also says that "The image size may be anything even in GB as the blob field in oracle can store upto 4GB of size".

    The complete code is also given. Please check it and try to use it.

    Regards.

    Rajat

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.