You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Jim Schneider <js...@kjinteractive.com> on 2003/02/25 01:10:43 UTC
LOBs, Torque, Oracle > 4K data
What is the preferred method (Torque data type) for LOBs that are > 4K?
If I use BLOB with a file that is smaller than 4K, everything is fine.
With > 4K, I get an error indicating that the size is too big.
Thanks in advance.
Jim
--
Jim Schneider
KJ Interactive, Inc.
303-765-1357
www.kjinteractive.com
Re: LOBs, Torque, Oracle > 4K data
Posted by Jim Schneider <js...@kjinteractive.com>.
I set my column type in my torque schema file (*.xml) to
"LONGVARBINARY". Torque converts this type to a LONG RAW column type in
my oracle schema file (*.sql). In the generated om classes, this is
translated to a byte array (byte[]) in my data objects, which all seems
fine to me.
However, when I go to insert my files (image file > 4K), I get the
following exception (my file is 5677 bytes):
"org.apache.torque.TorqueException: Data size bigger than max size for
this type: 5677"
When I insert a file smaller than 4K, I don't get the error.
Do I need to (or can I) specify a max size for the column?
Thanks for the response,
Jim
Bill Schneider wrote:
>"LONGVARBINARY" is the JDBC type. You want to use the "LONG RAW" type in
>Oracle which does not have a 4K limit.
>
>-- Bill
>----- Original Message -----
>From: "Jim Schneider" <js...@kjinteractive.com>
>To: "Turbine Torque Users List" <to...@db.apache.org>
>Sent: Tuesday, February 25, 2003 7:16 AM
>Subject: Re: LOBs, Torque, Oracle > 4K data
>
>
>
>
>>Yes, soryy, that is happening with me too. At the time, I was only
>>concerned with the insert/update. When I changed the "type" to
>>LONGVARBINARY, all is well except for the 4K limit. Any way to get
>>around this with Torque?? How have other people solved this problem?
>>
>>Thx,
>>
>>Jim
>>
>>Geoff Fortytwo wrote:
>>
>>
>>
>>>You can use BLOBs in torque with oracle? AFAIK, everyone else just
>>>gets null returned when they use CLOBs or BLOBs in torque with an
>>>oracle driver.
>>>
>>>At 04:10 PM 2/24/2003, Jim Schneider wrote:
>>>
>>>
>>>
>>>>What is the preferred method (Torque data type) for LOBs that are > 4K?
>>>>
>>>>If I use BLOB with a file that is smaller than 4K, everything is
>>>>fine. With > 4K, I get an error indicating that the size is too big.
>>>>
>>>>Thanks in advance.
>>>>
>>>>Jim
>>>>
>>>>
>>>>--
>>>>Jim Schneider
>>>>KJ Interactive, Inc.
>>>>303-765-1357
>>>>www.kjinteractive.com
>>>>
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>>>>For additional commands, e-mail: torque-user-help@db.apache.org
>>>>
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>>>For additional commands, e-mail: torque-user-help@db.apache.org
>>>
>>>
>>>
>>>
>>--
>>Jim Schneider
>>KJ Interactive, Inc.
>>303-765-1357
>>www.kjinteractive.com
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>>For additional commands, e-mail: torque-user-help@db.apache.org
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
>
--
Jim Schneider
KJ Interactive, Inc.
303-765-1357
www.kjinteractive.com
Re: LOBs, Torque, Oracle > 4K data
Posted by Bill Schneider <bs...@vecna.com>.
"LONGVARBINARY" is the JDBC type. You want to use the "LONG RAW" type in
Oracle which does not have a 4K limit.
-- Bill
----- Original Message -----
From: "Jim Schneider" <js...@kjinteractive.com>
To: "Turbine Torque Users List" <to...@db.apache.org>
Sent: Tuesday, February 25, 2003 7:16 AM
Subject: Re: LOBs, Torque, Oracle > 4K data
> Yes, soryy, that is happening with me too. At the time, I was only
> concerned with the insert/update. When I changed the "type" to
> LONGVARBINARY, all is well except for the 4K limit. Any way to get
> around this with Torque?? How have other people solved this problem?
>
> Thx,
>
> Jim
>
> Geoff Fortytwo wrote:
>
> > You can use BLOBs in torque with oracle? AFAIK, everyone else just
> > gets null returned when they use CLOBs or BLOBs in torque with an
> > oracle driver.
> >
> > At 04:10 PM 2/24/2003, Jim Schneider wrote:
> >
> >> What is the preferred method (Torque data type) for LOBs that are > 4K?
> >>
> >> If I use BLOB with a file that is smaller than 4K, everything is
> >> fine. With > 4K, I get an error indicating that the size is too big.
> >>
> >> Thanks in advance.
> >>
> >> Jim
> >>
> >>
> >> --
> >> Jim Schneider
> >> KJ Interactive, Inc.
> >> 303-765-1357
> >> www.kjinteractive.com
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> >> For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
>
> --
> Jim Schneider
> KJ Interactive, Inc.
> 303-765-1357
> www.kjinteractive.com
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
Re: LOBs, Torque, Oracle > 4K data
Posted by Jim Schneider <js...@kjinteractive.com>.
Yes, soryy, that is happening with me too. At the time, I was only
concerned with the insert/update. When I changed the "type" to
LONGVARBINARY, all is well except for the 4K limit. Any way to get
around this with Torque?? How have other people solved this problem?
Thx,
Jim
Geoff Fortytwo wrote:
> You can use BLOBs in torque with oracle? AFAIK, everyone else just
> gets null returned when they use CLOBs or BLOBs in torque with an
> oracle driver.
>
> At 04:10 PM 2/24/2003, Jim Schneider wrote:
>
>> What is the preferred method (Torque data type) for LOBs that are > 4K?
>>
>> If I use BLOB with a file that is smaller than 4K, everything is
>> fine. With > 4K, I get an error indicating that the size is too big.
>>
>> Thanks in advance.
>>
>> Jim
>>
>>
>> --
>> Jim Schneider
>> KJ Interactive, Inc.
>> 303-765-1357
>> www.kjinteractive.com
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
--
Jim Schneider
KJ Interactive, Inc.
303-765-1357
www.kjinteractive.com
Re: LOBs, Torque, Oracle > 4K data
Posted by Geoff Fortytwo <g4...@ign.com>.
You can use BLOBs in torque with oracle? AFAIK, everyone else just gets
null returned when they use CLOBs or BLOBs in torque with an oracle driver.
At 04:10 PM 2/24/2003, Jim Schneider wrote:
>What is the preferred method (Torque data type) for LOBs that are > 4K?
>
>If I use BLOB with a file that is smaller than 4K, everything is fine.
>With > 4K, I get an error indicating that the size is too big.
>
>Thanks in advance.
>
>Jim
>
>
>--
>Jim Schneider
>KJ Interactive, Inc.
>303-765-1357
>www.kjinteractive.com
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-user-help@db.apache.org