Does anyone know how to get get BLOBs working in Oracle? I need to store some larger pdfs in the db and some of the bytes in the file are causing a causing a problem when stored as a varchar or CLOBs.
 
I'm using Oracle9i and JBoss3.0.4. I have a CMP field of type Object.
 
I have setup my jbosscmp-jdbc:
 
<jbosscmp-jdbc>
    <defaults>
        <datasource-mapping>Oracle9i</datasource-mapping>
    </defaults>
</jbosscmp-jdbc>
 
And the standardjboscmp-jdbc.xml contains this under Oracle9i:
 
 <mapping>
    <java-type>java.lang.Object</java-type>
    <jdbc-type>BLOB</jdbc-type>
    <sql-type>BLOB</sql-type>
 </mapping>
 
I have deployed the 9i drivers we got from oracle. The exact file name is ojdbc14.jar, which i guess reflects oracles new naming scheme.
 
I call the setMyField(Object field) method and sent it a String. Then I call the getMyField method and it returns null. There is not errors in the log files. I had a dba trace my session and it is in fact getting to the db as "update mytable set myfield=:1 where mykey=:2". Is Jboss generating the correct SQL?
 
Any ideas why this isn't working for me?
 
thanks.
.peter



This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.

Reply via email to