Oracle BLOB insert problem

I'm getting a ClassCastException when I try to the blob I get from my CallableStatment. I've seen alot of post about similar issues with oracle 9 and inserting blobs but I havn't found a solution..
Here is the few lines that Im doing..
When I check to see what type of instance this blob is this is what I get in my debugger oracle.sql.BLOB@71d768
so When I ((BLOB)blob).getBinaryOutputStream() I get the ClassCastException..
I've tried to get the innermost delegate and a number of other things.. When I try to cast anything to the Oracle type I get the ClassCastException. When i do an instanceof on the blob it isn't an oracle Blob.. So why does the debugger and getClass().getName() tell me it is.. And is the any work around for this..
Thanks
Dan
cstmt.registerOutParameter(6, OracleTypes.BLOB);
             cstmt.execute();
             Blob blob = cstmt.getBlob(6);
                       if(blob != null) {
                     writer = new ObjectOutputStream( ((BLOB)blob).getBinaryOutputStream());
                    if (writer != null) {
                    writer.writeObject(bean);
                      writer.flush();
                      writer.close();
                 con.commit();

Yes, I modified some code that a collegue used in a standalone application.. His solution was using a CLOB.. I just modified my solution to use a CLOB instead of a BLOB(saving a bean as xml instead of the bean object)..
So i litterally copied his code line for line.. And Im getting the same error. My app is running in tomcat whereas my collegue is using it in a standalon application. I just went thru all lib directories to make sure I only have one copy of the oracle ojdbc14.jar which is in the conf/lib directory of the tomcat server..
I even moved my table from our oracle9 db to our oracle 10 db and still no luck..
String beanToXml = xstream.toXML(bean);          
cstmt.execute();
oracle.sql.CLOB clob = ((OracleCallableStatement) cstmt).getCLOB(6)
             if (clob != null) {
                 writer = ((CLOB) clob).getCharacterOutputStream();
                 if (writer != null) {
                   writer.write(beanToXml.toCharArray());
                   writer.flush();
                   writer.close();
             }

Similar Messages

  • BLOB Insertion Problem

    We are inserting a BLOB in our table. If the size of BLOB is greater than 5KB, it's not being inserted. Smaller BLOBs are being entered successfully. Is ther some default parameter which need to be set.

    AFAIK there is no such initialization parameter.
    How do you insert BLOB ? Which is the host language ?
    Which use case described in http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl10pst.htm#125074 is the closest to the one you are using ?

  • Oracle blob class problem

    Hello again.
    I have the following code:
    java.sql.ResultSet resultSetForUpdate = stat.executeQuery("select picture from some_table where some_id=" + someId + " for update");
    java.sql.Blob blob = resultSetForUpdate.getBlob(1);
    // here is some code that types the class of the blob
    logger.info("blob class is: "+blob.getClass());
    now the problem is that the class returned with blob.getClass is different on 2 portals... on 1 portal I get oracle.sql.BLOB (this is the expected result) but on the other I get com.inqmy.services.dbpool.remote.RemoteBlobImpl
    does anyone have any idea why this is happening and how can I do so that I always get the oracle.sql.BLOB class?
    more information: both portal installations are ep6 sp2 with (I think) identical patch levels (35 if I remember correctly). the database they access is the same one. the dbpool definitions (in visual administrator) look similar.
    thanks in advance.
    silviu.

    Thanks for taking the time to look at this.
    No, it is the same driver on both servers. The driver is the oracle driver oracle.jdbc.OracleDriver provided by Oracle themselves.
    This is not it...
    Could there be some path problem? The server on which it works fine is a windows machine, whereas the server where it doesnt work is a solaris machine, I think (not windows for sure).
    Message was edited by: Silviu Lipovan Oanca

  • Oracle BLOB insertion

    I am getting a runtime NoClassDefFound error while I am trying to get a handle on the BLOB field (after the insertion of an EMPTY_BLOB()).
    The sequence of events (using Java code) are:
    1. Insert data for the table along with Empty_Blob() for the particular Blob field
    2. Select * from table
    3. Assign a (OracleResultSet)ResultSet.getBLOB()
    At step 3 where the casting occurs, the runtime error is ORACLE_HOME/jdbc/driver/OracleResultSet()
    NoClassDefFound
    null

    I tried inserting using the following code and it worked in single stepOnly if your Data is not longer then 4000 Bytes (or 32K if you do the same in PL/SQL). Otherwise you have to use empty_blob.
    Dim

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • BLOB insert behavior with thin driver using standard JDBC2.0 and ORACLE-JDBC2.0API

    We have a problem with a BLOB insert to an oracle 8.1.7 DB using Oracle 8.1.7 JDBC thin driver.We get socket read/write error after inserting 32k of data using the standard JDBC2.0 API but using the Oracle JDBC2.0API (using OracleResultSet) it goes fine. We have a requirement to use the standard JDBC2.0 so that our code works with multiple database vendors. Is there another way to get in the blob data with standard JDBC API & using thin driver...?
    thanks,
    Madhu
    Here is my sample test program that does both standard & oracle specific JDBC Blob test insert.
    import java.sql.*;
    import java.io.*;
    import oracle.sql.BLOB;
    import oracle.jdbc.driver.OracleResultSet;
    public class testBLOB {
    //trying to insert a huge file to a BLOB
    static String fileName = "/kernel/genunix";
    public static void main(String[] args) {
    String driverName = "oracle.jdbc.driver.OracleDriver";
    String dbURL = "jdbc:oracle:thin:@localhost:1521:test"; //thin driver
    String user = "BlobTest";
    String passwd = "BlobTest";
    Connection con=null;
    try {
    Class.forName(driverName);
    con=DriverManager.getConnection(dbURL, user,passwd);
    catch (Exception e) {
    e.printStackTrace();
    close(con);
    int i = 0;
    while (i < args.length) {
    if (args.equals("-f"))
    fileName = args[++i];
    i++;
    System.out.println("The file being Stored is: "+fileName);
    createTable(con);
    insertUsingOracleAPI(con);
    insertUsingJDBC20API(con);
    //readDB(con);
    static String getFileName() {
    return fileName;
    public static void close(Connection con) {
    try {
    if (con != null) {
    con.close();
    catch (Exception e) {
    System.exit(-1);
    public static void createTable(Connection con) {
    Statement stmt ;
    try {
    stmt = con.createStatement();
    stmt.execute("DROP TABLE basic_blob_table");
    stmt.close();
    catch (SQLException sqlEx) {
    System.out.println("Dropped the Table");
    try {
    stmt = con.createStatement();
    stmt.execute("CREATE TABLE basic_blob_table ( x varchar2(30), b blob)");
    stmt.close();
    catch (SQLException sqlEx) {
    sqlEx.printStackTrace();
    close(con);
    System.out.println("Created the Table");
    public static void insertUsingOracleAPI(Connection con) {
    OutputStream os = null;
    Statement stmt = null;
    ResultSet rs = null;
    FileInputStream is = null;
    try {
    con.setAutoCommit(false);
    stmt = con.createStatement();
    stmt.execute("INSERT INTO basic_blob_table VALUES( 'OracleAPI', empty_blob())");
    System.out.println("Inserted the dummy Row");
    rs = stmt.executeQuery("Select * from basic_blob_table where x='OracleAPI'");
    if (rs != null && rs.next()) {
    BLOB blob = ((OracleResultSet)rs).getBLOB(2);
    File file = new File(getFileName());
    is = new FileInputStream(file);
    os = blob.getBinaryOutputStream();
    byte[] chunk = new byte[1024];
    int length = -1;
    while((length = is.read(chunk)) != -1)
    os.write(chunk, 0,length);
    System.out.println("Inserted the File " + getFileName() );
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    if (os != null) {
    os.flush();
    os.close();
    if (is != null)
    is.close();
    stmt.close();
    con.commit();
    con.setAutoCommit(true);
    catch (Exception e) {}
    public static void insertUsingJDBC20API(Connection con) {
    PreparedStatement stmt = null;
    FileInputStream is = null;
    try {
    stmt = con.prepareStatement("INSERT INTO basic_blob_table VALUES(?,?)");
    File file = new File(getFileName());
    is = new FileInputStream(file);
    stmt.setString(1,"JDBC20API");
    stmt.setBinaryStream(2,is,(int)file.length());
    stmt.executeUpdate();
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    if (is != null)
    is.close();
    stmt.close();
    catch (Exception e) {}
    null

    Thanks for the response.
    I understand what you are saying...
    that readers don't block writers in Oracle (the same is true in SQL Server 2000).
    However, I don't see how my test case is working correctly with Oracle (the exact same code acting as I'm thinking it should with SQL Server, but I still think it is acting incorrectly with Oracle).
    I have transaction A do this:
    update <table> set <column2>=<value> where <column1>='1'
    then I use Thread.sleep() to make that program hang around for a few minutes.
    Meanwhile I sneak off and start another program which begins transaction B. I have transaction B do this:
    select * from <table> where <column1>='1'
    and the read works immediately (no blocking... just as you have said) however, transaction A is still sleeping, it has not called commit() or rollback() yet.
    So what if transaction A were to call rollback(), the value read by transaction B would be incorrect wouldn't it ?
    Both A and B use setAutoCommit(false) to start their transactions, and then call setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED).
    Isn't that supposed to guarantee that a reader can only read what is committed ?
    And if a row is in "flux"... in the process of having one or more values changed, then the database cannot say what the value will be ?
    I can almost see what you are saying.
    In letting the reader have what it wants without making it wait, I suppose it could be said that Oracle is holding true to the "only let committed data be read"
    So if that's it, then what if I want the blocking ?
    I want an entire row to be locked until whoever it in the middle of updating, adding, or removing it has finished.
    Do you know if that can be done with Oracle ? And how ?
    Thanks again for helping me.

  • BLOB insertion in Oracle 10g database using ojdbc14 (10g drivers)

    Hello!
    I have a situation where I am trying to insert a blob data into oracle 10g database using oracle thin
    10g drivers, <b>ojdbc14.jar</b> in <b>weblogic 8.1 sp2</b>. I have the following error happening very intermittently.
    <u><b>java.sql.SQLException: OALL8 is in an inconsistent state.</b></u>
    And this is leading to the <u><b>"No more data to read from socket"</b></u> error when I am trying to
    insert the BLOB into the database. I have gone through the bug list of SP2 and have realised there is the
    following issue fixed in SP3.
    <b>CR124933</b>
    <b>An Oracle BLOB sometimes used a pooled connection after the connection pool determined that
    the connection was available for reassignment.
    Code was added to ensure the BLOB is completely processed before closing the pool connection or
    ending the transaction.</b>
    I believe the problem arises when we try to insert BLOB into database using a refreshed connection
    from the pool.We have upgraded weblogic 8.1 from SP2 to SP4 service pack inorder to come over the above problem.
    But this still continues to behave intermittently.
    We put ojdbc14.jar in our classpath and Weblogic startup classpath looks like the following :-
    WLS_CLASSPATH=${WLS_DOMAIN_DIR}/appslib/server.jar:$PRE_CLASSPATH:${WLS_WEBLOGIC_HOME}/server/lib/weblogic.jar:
    ${WLS_WEBLOGIC_HOME}/server/lib/ojdbc14.jar:${WLS_WEBLOGIC_HOME}/server/lib:${WLS_JAVA_HOME}/lib/tools.jar:
    ${WLS_JAVA_HOME}/jre/lib/rt.jar:${WLS_WEBLOGIC_HOME}/server/lib/webservices.jar:${WLS_CONFIG_DIR}:
    ${WLS_CUSTLIB_DIR}:${WLS_BIN_DIR}:$POST_CLASSPATH
    export WLS_CLASSPATH
    CLASSPATH=${WLS_CLASSPATH}:${APP_CLASSPATH}
    export CLASSPATH
    After upgrade to SP4, there are new ojdbc14_g.jar(debug jar) and orai18n.jar jars in the ${WLS_WEBLOGIC_HOME}/server/ext/jdbc/oracle/10g directory added.
    Please let me know if I need to update classpath with the new 10g jars in the ext/lib directory or any suggestions
    to insert BLOB using the ojdbc14 10G drivers, Weblogic 8.1 environment would be appreciated.
    Following is the stack trace of the errors that I recieve:
    <Oct 6, 2005 1:29:36 PM EDT> <Error> <JDBC> <BEA-001112> <Test "select count(*) from DUAL" set up for pool
    "MHUBPoolStage" failed with exception: "java.sql.SQLException: OALL8 is in an inconsistent state".>
    <Oct 6, 2005 1:29:36 PM EDT> <Info> <JDBC> <BEA-001128> <Connection for pool "MHUBPoolStage" closed.>
    <Oct 6, 2005 1:29:36 PM EDT> <Info> <JDBC> <BEA-001067> <Connection for pool "MHUBPoolStage" refreshed.>
    <Oct 6, 2005 1:29:36 PM EDT> <Info> <EJB> <BEA-010051>
    java.rmi.RemoteException: TransactionRequestManager.requestTransaction():
    Caught PersistnceException com.mortgagehub.busobj.PersistenceException: -5258: No more data to read from socket
    Please let me know if there is anything that I am missing.
    Thanks
    Pradeep G

    pradeep g wrote:
    Hello!
    I have a situation where I am trying to insert a blob data into oracle 10g database using oracle thin
    10g drivers, <b>ojdbc14.jar</b> in <b>weblogic 8.1 sp2</b>. I have the following error happening very intermittently.
    > <u><b>java.sql.SQLException: OALL8 is in an inconsistent state.</b></u>
    And this is leading to the <u><b>"No more data to read from socket"</b></u> error when I am trying to
    insert the BLOB into the database. I have gone through the bug list of SP2 and have realised there is the
    following issue fixed in SP3.
    > <b>CR124933</b>
    <b>An Oracle BLOB sometimes used a pooled connection after the connection pool determined that
    the connection was available for reassignment.
    Code was added to ensure the BLOB is completely processed before closing the pool connection or
    ending the transaction.</b>
    > I believe the problem arises when we try to insert BLOB into database using a refreshed connection
    from the pool.We have upgraded weblogic 8.1 from SP2 to SP4 service pack inorder to come over the above problem.
    But this still continues to behave intermittently.
    We put ojdbc14.jar in our classpath and Weblogic startup classpath looks like the following :-
    > WLS_CLASSPATH=${WLS_DOMAIN_DIR}/appslib/server.jar:$PRE_CLASSPATH:${WLS_WEBLOGIC_HOME}/server/lib/weblogic.jar:
    ${WLS_WEBLOGIC_HOME}/server/lib/ojdbc14.jar:${WLS_WEBLOGIC_HOME}/server/lib:${WLS_JAVA_HOME}/lib/tools.jar:
    ${WLS_JAVA_HOME}/jre/lib/rt.jar:${WLS_WEBLOGIC_HOME}/server/lib/webservices.jar:${WLS_CONFIG_DIR}:
    ${WLS_CUSTLIB_DIR}:${WLS_BIN_DIR}:$POST_CLASSPATH
    export WLS_CLASSPATH
    CLASSPATH=${WLS_CLASSPATH}:${APP_CLASSPATH}
    export CLASSPATH
    > After upgrade to SP4, there are new ojdbc14_g.jar(debug jar) and orai18n.jar jars in the ${WLS_WEBLOGIC_HOME}/server/ext/jdbc/oracle/10g directory added.
    > Please let me know if I need to update classpath with the new 10g jars in the ext/lib directory or any suggestions
    to insert BLOB using the ojdbc14 10G drivers, Weblogic 8.1 environment would be appreciated.
    > Following is the stack trace of the errors that I recieve:
    > <Oct 6, 2005 1:29:36 PM EDT> <Error> <JDBC> <BEA-001112> <Test "select count(*) from DUAL" set up for pool
    "MHUBPoolStage" failed with exception: "java.sql.SQLException: OALL8 is in an inconsistent state".>
    <Oct 6, 2005 1:29:36 PM EDT> <Info> <JDBC> <BEA-001128> <Connection for pool "MHUBPoolStage" closed.>
    <Oct 6, 2005 1:29:36 PM EDT> <Info> <JDBC> <BEA-001067> <Connection for pool "MHUBPoolStage" refreshed.>
    <Oct 6, 2005 1:29:36 PM EDT> <Info> <EJB> <BEA-010051>
    java.rmi.RemoteException: TransactionRequestManager.requestTransaction():
    Caught PersistnceException com.mortgagehub.busobj.PersistenceException: -5258: No more data to read from socket
    Please let me know if there is anything that I am missing.
    > Thanks
    > Pradeep GHi. This is something we'd like to diagnose. How is your application
    getting using and closing pool connections? The initial symptom
    seems to be an internal oracle problem... Are you using standard
    JDBC or oracle-specific calls?
    Joe

  • Update/Insert Problem with Oracle Warehouse Builder

    Hello,
    i have update/insert problem with owb.
    Situation: I have a source-table called s_account and a target table called w_account_d. In the target table are already data which was filled trough the source table inserts. Now anyone make changes on data on the target table. This changes should now give further on the source table with an update operation. But exactly here is the problem i can´t map back the data to source because that will create a loop.
    My idea was to set a trigger but i can´t find this component in owb or is anywhere hidden?
    Also i have already seen properties as CDC or conditonal loading in the property inspector of the table, but i have no idea how it works.
    Give it other possibilities to modeling this case? or can anyone me explain how i can implement this eventually with CDC?
    I look forward for your replies :)

    Hi
    thanks for your answer. I follow your suggestion and have set the constraints of both tables into the database directly.Nevertheless it doesn´t work to begin. In the next step i found by right click on a table the listpoint "configure" - I goes to "unique key" --> creation method and set here follow options: Constraint State = ENABLE, Constraint Validation = Validate. That error message that appears before by the deployment disappears yet. Now i start the job to test if the insert/update process works right. Finally it seems to work - but not really.
    My Testscenario
    1. Load the data from source table about the staging area to data warehouse table: Check - it works!
    2. Change one data record in source table
    3. Load the source table with changed data record once again to staging area: Check - it works!
    4. Load new staging area table with the changed data record to data warehouse table: Check it works! BUT, BUT i can not recognize if it is insert or update operation, then under the design window by jobs execution windows is reported "rows selected 98", Rows inserted" is empty and "rows updated" is empty. So i think works not correct, then my opinion if it works correct it should show be "rows updated" 1.
    What can yet now still be wrong or forgotten? Any ideas?
    *By the way think not 98 rows there is not important if you make an update or insert which performance. It is an example table the right tables have million of records.*
    I look forward for your answers :)

  • PDF binary variable won't save in Oracle blob

    I am reading in a small, legitimate PDF as a binary variable and them immediately saving that variable into a blob. But the blob doesn't store the data.
    <cffile action="readbinary" file="C:\Test_Files\test.pdf" variable="testdoc">
    now shows isbinary(testdoc) = YES
    In fact, I can output to the screen using cfcontent, and it displays fine.
    But if I try to save the testdoc variable to an Oracle blob, CF seems to think it is trying to insert an empty variable.
    <cfquery name="ins" datasource="#request.a_datasource#">
    INSERT
    INTO PROD_WCT.T_DOCS (
    PDF_BLOB
    VALUES (
    <cfqueryparam value="#testdoc#" cfsqltype="CF_SQL_BLOB">
    Now if I retrieve that row (query name=”get_pdf”) and check the value, it appears empty:
    now shows isbinary(get_pdf.pdf_blob) = NO
    Nothing is done in betweent the cffile and the insert. Any ideas?

    Just an update here to note that this problem has not yet been resolved.
    This could be in incompatibility between Oracle 10g BLOBs and Coldfusion 8.
    To review, my BLOB setting in CFADMIN is enabled. To make this as simple and possible, I created a PDF from the words "Test text," so the PDF document can't get much smaller. The PDF does save to the BLOB, because in TOAD I can save the BLOB contents to a file and view it as a PDF just fine. It's when I retrieve the record in CF8 where the trouble arises. Coldfusion 8 doesn't get anything from the BLOB. It has a zero length, and isbinary = NO. We are using Oracle 10g. And using CF8. My understanding is that an Oracle blob uses pointers to locate the blob data in an area external to the database. Apparently, Coldfusion cannot retrieve the data. The process worked for the first few records when retrieving a blob and displaying it with cfcontent, but after a few records it can no longer retrieve the subsequent blob records. It just abruptly fails at that point. But again, the PDF binary data is there in TOAD.
    Could this be a bug or incompatibility with Oracle 10g? We are a state government, and it sure would help if the Adobe people could give come help here.
    Thanks in advance for any thoughts.

  • Oracle & BLOB/LONG RAW

    Hi everybody,
    I need to store binary data (> 32K) in an oracle BLOB field, respectivly commit the data to an oracle PL/SQL stored procedure.
    First I tried to use LONG RAW, but failed to commit more than 32K of data. This seems to be a documented problem, you can store 2GBs in an LONG RAW field, but PL/SQL can only store 32K in an LONG RAW variable.
    Then I tried to switch from LONG RAW to BLOB (both the field in the table and the in variable in the stored procedure) but it seems to be very complicated to use BLOB fields with JDBC.
    I've found example for a plain INSERT. First execute an INSERT with an empty BLOB, then make an SELECT FOR UPDATE on the row, obtain the reference to the BLOB-Object, alter the BLOB-Object and create an UPDATE-Statement with it.
    I've not tried this yet, but according to various web sites it should work.
    The problem is, that it does not solves the problem how to commit a BLOB value to a PL/SQL stored procedure.
    Does anyone knows a solution?
    Thx and regards,
    Robert

    Hi,
    thx for your answer.
    That's the solution I described (INSERT, SELECT, UPDATE) and only works with Statements.
    But I think I've already found a mistake of mine, I have to try this today.
    I already succeeded in creating a BLOB-Object without obtaining it from a resultset, the constructor is not documented but it exists, it looks like BLOB( OracleConnection, byte[] ).
    I think I can commit the BLOB to the stored procedure but it won't be a valid BLOB locator.
    What I've not tried yet and what I think migth be the solution is creating the valid BLOB locator inside the stored procedure using the PL/SQL BLOB methods.
    Sounds simple but for some reasons I have not thougth about it yet. :-)
    I'll report the result here if somebody else is interested in the issue. :o)
    Thx and regards,
    Robert

  • JDBC Receiver Adapter and Oracle BLOB

    Hi,
    I would like to put some raw data into an ORACLE BLOB using XI. My idea was to put the data in an xml element, but the JDBC sender adapter doesn't seem to be able to cope with writing. Has anybody gathered experiences regarding this topic?
    Kind regards,
    Heiko

    Hi,
    The error saying it is unable to connect to the Database, so it may be the drivers problem. once check the drivers and its syntaxes.
    Syntax :
    http://www.devx.com/tips/tip/28818
    For Download and configure the drivers :
    http://www.aquafold.com/docs-jdbcdrivers-oracle10g.html
    http://www.oxygenxml.com/database_drivers.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f

  • Can I use oracle blob by CMP bean in weblogic 6?

    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle blob by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain a serialized object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

    Great! So what was the problem?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    >
    Finally got it working with CMP, which is my preferred choice (over BMP).
    I read the Excel Spreadsheet into a "byte []" array, and the Entity Beanmapped
    "byte []" to the Blob column in the Oracle table.
    "Slava Imeshev" <[email protected]> wrote:
    Roger,
    I'm not quite sure I undestand the problem. Could you:
    1. Post deployment descriptors in part related to this
    CMP bean?
    2. Post the piece of code that is failing?
    Please post the information above and we will help
    you to hunt the problem down.
    No, I don't have any problems accessing blobs
    from CMP.
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    Yes. I have added;
    <dbms_column-type>OracleBlob</dbms-column-type>
    It fails because the locater to the blob, obtained by findBYPrimaryKeyis
    null.
    i.e. an empty_blob() is not created.
    Have you got CMP to access Blobs in WLS 6.1?
    "Slava Imeshev" <[email protected]> wrote:
    Hi Roger,
    Have you tried using OracleBlob as dbms-column-type?
    Also, could you post that part of your code that is failing?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    I can access Clobs using CMP. If you are using the Oracle OCI Driveryou
    do not
    need to add this line.
    However if you are using the Oracle Type 4 Thin drivers you need
    to
    add;
    <dbms_column-type>OracleClob</dbms-column-type>
    to the file;
    weblogic-cmp-rdbms-jar-xml
    This DOES NOT work with Blobs.
    I am unable to get WebLogic 6.1 sp4 persist a Blob to an Oracle
    8.1.x
    table and
    retrieve it using either CMP or BMP.
    Unless any one show me a complete working CMP and BMP example?
    Roger Lee
    Deepak Vohra <[email protected]> wrote:
    BLOB and CLOB DBMS Column Support for the Oracle DBMS
    http://edocs.bea.com/wls/docs61/ejb/cmp.html#1061636
    shybird wrote:
    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle
    blob
    by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain
    a
    serialized
    object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

  • Oracle BLOB value to a LC variable

    Hello,
    Is it possible in LC ES2 to coerce oracle blob value to some livecycle variable ?
    When mapping sql query result (column of type BLOB) to a LC variable (of type Document), we receive:
    com.adobe.workflow.datatype.InvalidCoercionException: Cannot coerce object: oracle.sql.BLOB@27e7d6 of type: oracle.sql.BLOB to type: com.adobe.idp.Document
    We have tried mapping to string, binary, Document (, we even desperately hardcoded sql.oracle.BLOB to process XML), but none of this works.
    Is it possible to solve this other way, then following ?
    http://groups.google.com/group/livecycle/browse_thread/thread/6c4b9156b52b71a7
    Thanks.

    My idea is to fetch the BLOB column data as UTF8 (base64) encoded string and then use getDocumentFromBase64 available in ES2.
    I am not sure what syntax is to fetch from ORACLE.
    I have used MySql database and the query is:
    SELECT CONVERT(Blob_Column USING UTF8) as MyBlobDataAsBase64Str FROM myTableName;
    Now using SetValue activity to look like:   myXMLvariable = getDocumentFromBase64(strVariableHoldingBase64Data)
    This case works perfectly without any issues.
    The problems is you should find out the appropriate syntax for ORACLE.
    I was searching about CONVERT() & UNISTR() functions. But i'm unable to evaluate.
    Try by yourself..
    Nith

  • Store pdf in oracle  BLOB  hibernate

    I need to store PDF files in the oracle BLOB using hibernate. I am using the below code and getting a null pointer. Any thoughts?
    Blob blob=null;
    byte [] bFile = (byte[])objVal;
    blob.setBytes(0,bFile); //null pointer here...
    logger.info("EventsDAO- insertDetails- else:--"+((byte[])objVal)+"---blob----"+blob);
    hmForm.put(objKey,blob); Thanks in advance.

    Samples? Are you asking how to make a blob? I have my doubts about the wisdom of using Hibernate if you can't diagnose a NPE unless that was just momentary code snow-blindness, but whatever, it's your problem:
    Either call Hibernate.createBlob(InputStream,long) or just map the field as a byte[] and map it to a Blob type.
    Edited by: dcminter on 09-Jun-2008 22:22

  • Oracle Blob Display Error

    Environment : Using Oracle Forms 6i (Currently on Patch 6.0.8.16) and Oracle
    10g.
    Problem : Error “Ora-00932 Inconsistent Data Types” when displaying a
    blob from a database table using Oracle 10g.
    Problem Description :
    Currently in the existing application we have Oracle Forms 6i with Oracle
    database version 8i.
    There are no errors while displaying a blob (image) from the database table on my Oracle form. Upgraded to Oracle 10g but with the existing version of Oracle Forms we cannot display the blob in the Forms.If I remove the blob display from the form everything else on the form works fine.
    Tried to update the Oracle Forms to version 6.0.8.16 using Patch 7 but it did not resolve the problem.
    Tried to go through the bug fixes in the recent Forms version upgrade released by Oracle but did not see anything related to problem with blob display using Oracle 10g.
    Did anyone else in the group faced the same problem?
    What patch level resolved the problem?
    Any ideas?
    thanks and regards.

    See
    Forms 6i - display into image item picture stored in blob type on database
    problem with images in forms 6i

Maybe you are looking for

  • How do i make a list in ID

    I want to make a list in a document, so that for each new paragraf ther comes a new number 1. Bla bla bla 2. More bla bla bla 3. even more bla bla bla Hwat is the smartes (easy) way to do this ???

  • How to read data from txt file respectively

    Hi, I am triying to form an equation between two known points. I want to do this with the attached VI, the most critical point is that I will read the x1, y1, x2 and y2 coordinates from the same .txt file. They will be written in a .txt file and I wi

  • TS1538 I've gone through all the steps and my iPod still doesn't show up in iTunes

       I've went through all the steps but my iPod still isn't recognized by iTunes. It'll show up on My Computer but that's about it.

  • TV Tuner Card and Signal for AVerMedia A323 Hybrid ATSC

    Community, need a little assist.  Here is my set up TouchSmart 520-1070 w/ Windows 7 - 64 bit Windows Media Center AverMedia A323 MiniCard Hybrid ATSC Cox Communications Cable No cable box (straight out of the wall) This is a replacement of my Slimli

  • No 64 bit version of Photoshop CC

    When I download Photoshop CC (2014) from Creative Clouds it gives me the 32 bit version even though my os is 64 bit. I have used the old Ps CC 64 bit but I uninstalled when I was going to update.