You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Hiller, Frank RD-AS2" <Fr...@heidelberg.com> on 2005/11/04 13:28:38 UTC

AW: How to store images

Hi,

I'm using OJB 1.0.3, Tomcat 5.0.28 and Oracle 10g Rel2.
 
When I try to save images I get 
"org.apache.ojb.broker.PersistenceBrokerSQLException: SQLException during the execution of the update (for a ...): Oracle thin driver cannot update BLOB values with length>2000. (Consider using Oracle9i as OJB platform.)"

The database field is BLOB, the JDBC type in field-descriptor is BLOB the data type in Java class is byte[] as recommended by Bobby.

Is this an OJB or an Oracle related problem?

Frank

-----Ursprüngliche Nachricht-----
Von: Bobby Lawrence [mailto:robertl@jlab.org] 
Gesendet: Donnerstag, 8. September 2005 15:59
An: OJB Users List
Betreff: Re: How to store images

I have successfully used OJB with BLOB database types and a byte[] in the corresponding class.
--Bobby



Hiller, Frank RD-AS2 wrote:

>Hello OJB users,
> 
>I like to store images in Oracle 8i, later 10g.
>What is the recommended way to do that?
>What Java data type should I use (Blob, BufferedImage, ...)?
> 
>I'm sure there is a document availabe that I haven't found yet.
> 
>Thank you,
>Frank
>
>
>Confidentiality note:
>The information in this email and any attachment may contain confidential and proprietary information of Heidelberger Druckmaschinen AG and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, we kindly ask you to notify the sender immediately and to delete this email and any attachment from your system.
>
>  
>

-- 
----------------------------
Bobby Lawrence
MIS Application Developer

Jefferson Lab (www.jlab.org)

 Email: robertl@jlab.org
Office: (757) 269-5818
 Pager: (757) 584-5818
----------------------------





---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org



Confidentiality note:
The information in this email and any attachment may contain confidential and proprietary information of Heidelberger Druckmaschinen AG and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, we kindly ask you to notify the sender immediately and to delete this email and any attachment from your system.

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: AW: How to store images

Posted by Danilo Tommasina <dt...@risksys.com>.
Hi,
as suggested in the error message that is shown, you should use the Oracle9i platform and not the Oracle platform. The old Oracle platform does not support 
BLOBs with length>2000, this was a limitation of the thin driver for Oracle 8.
The platform Oracle9i does not have the above limitation and also includes extra enhancements, fixes and optimisations that apply to the Oracle 9i driver. I do 
not know how and if everything works correctly also with Oracle 10g, but I am confident that it will. ;)
We are using Oracle 9i with the Oracle9i OJB platform and have no problem uploading BLOBs > 5 MB.

bye
danilo

Hiller, Frank RD-AS2 wrote:
> Hi,
> 
> I'm using OJB 1.0.3, Tomcat 5.0.28 and Oracle 10g Rel2.
>  
> When I try to save images I get 
> "org.apache.ojb.broker.PersistenceBrokerSQLException: SQLException during the execution of the update (for a ...): Oracle thin driver cannot update BLOB values with length>2000. (Consider using Oracle9i as OJB platform.)"
> 
> The database field is BLOB, the JDBC type in field-descriptor is BLOB the data type in Java class is byte[] as recommended by Bobby.
> 
> Is this an OJB or an Oracle related problem?
> 
> Frank
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org