db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per-Olof Norén <pe...@alma.nu>
Subject Re: Oracle 9i BLOB malfunction / 4k mystery
Date Fri, 09 May 2003 09:35:15 GMT
Thomas Mahler wrote:
> Hi again Per-Olof,
> Per-Olof Norén wrote:
>> Thomas, Comitters,
>> The reason for my modification (as sketched below) of PlatformOracleImpl
>> was to allow for both byte[] and java.lang.String in beans that is 
>> mapped to clob field.
>> This is my last mod that is not handed back into ojb cvs.
>> Is the project interested in me sending a patch for this?
> Yes, that sounds great. I'd really apreciate a simple patch to the 4K 
> problem. So I'm willing to commit your patch to CVS after reviewing it.

Actually, this simple patch just allows one to have a java.lang.String 
or byte[] field in the bean and get it saved into CLOB columns. I just 
tested > 4k Strings with thin driver and it fails just as well.
However without this fix I couldn´t event get clobs < 4k to work.
So i hope this small step in the right direction finds it´s way into cvs 
anyways :-)

> Could you please check if your solution does work for BLOB columns too?
> If so we could put an end to this whole 4K story soon.

Since we´re (as always) in a hurry, running on platforms that´s 
supported by oracle, we switched to the oci driver and it works well.

I´d be happy to test out any attempts on this using thin driver,
Even exploiting our customers extensive Oracle support account, if 
nessecary. I´ll get back to working on this in roughly three weeks.

> Currently Michael Mogley is also working on patch, but from what I saw 
> last time his changes had a lot of impacts to many classes apart from 
> PlatformOracleImpl. So I think the best thing is to compare both 
> approaches and to take the solution with the least impact on the overall 
> codebase.

I know that there is a workaround available for this, but it usually 
involves getting a XLOB object from a resultset, then casting it to a 
OracleXLOB, running OracleBLOB.getOutputStream. This can´t be done in 
setObjectForStatement without actually creating a blob first and so on.

I just can´t believe Oracle actually released 9 without fixing this....


Per-Olof Norén

View raw message