db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OggieOne64 <oggieon...@hotmail.com>
Subject Re: A truncation error was encountered trying to shrink VARCHARTA 'XX-RESOLVE-XX' to length 255.
Date Mon, 26 Apr 2010 15:45:23 GMT

Thanks for responding but the problem is that I am trying to insert an image
(not text). The field is of type Blob.
Any other ideas? BTW: How can I verify what version of derby is running? My
derby.jar is dated 8/10/2009

Thanks,
Doug



Knut Anders Hatlen wrote:
> 
> On 04/24/10 17:18, Doug McGavin wrote:
>> I am using the latest version of Derby with Hibernate and getting the
>> following error when trying to save an image (the exact same code works
>> with MySQL) :
>> 
>> [7613120@qtp0-8] ERROR util.JDBCExceptionReporter  -
>> 
>> A truncation error was encountered trying to shrink VARCHARTA
>> 'XX-RESOLVE-XX' to length 255.
>> 
>> I have read that this is a known bug but I don't seem to be able to find
>> how it was resolved or how to work around it in my code.
> 
> Hi Doug,
> 
> I think this error means you're trying to insert a string that's longer
> than 255 characters into a VARCHAR(255) column. Derby will try to
> truncate the string if it has trailing spaces, but the above exception
> will be thrown if that's not enough to make it fit in the column.
> 
> In Derby 10.5 and later, the error message should show the string you're
> trying to insert instead of the rather cryptic string 'XX-RESOLVE-XX'.
> (The error message was changed in DERBY-961.)
> 
> -- 
> Knut Anders
> 
> 

-- 
View this message in context: http://old.nabble.com/A-truncation-error-was-encountered-trying-to-shrink-VARCHARTA-%27XX-RESOLVE-XX%27-to-length-255.-tp28350914p28366428.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message