db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject Re: Question about New Oracle Driver and Blobs
Date Wed, 05 Apr 2006 21:55:11 GMT
Did you also try blobs > 32k size ? I recall dimly that lobs < 32k do 
work , but lobs > 32k don't.

    Thomas

On Wed, 5 Apr 2006, Christopher Fitch wrote:

> After some further research, by making one change, all blob operations 
> function properly.
>
> In Value.java, line 236 is this:
>
>            valueObject = blob.getBytes(1, (int) blob.length());
>
> and this is where the NPE comes from since' blob' is null.
>
> If it's changed to this:
>            valueObject = (blob != null) ? blob.getBytes(1, (int) 
> blob.length()) : null;
>
> It functions correctly in all cases.
>
>
> Christopher Fitch wrote:
>> Hello all,
>>     I have been looking at how the newer Oracle 10g JDBC driver interacts 
>> with Torque 3.2 and Village. I'm aware of the past issues with regards to 
>> Oracle and their incomplete Blob support in their older JDBC drivers as 
>> well as the village patch to support it.
>> 
>> First things first...I'm assuming this is the correct place to address 
>> this? It's not clear to me if Village issues can be discussed here and then 
>> we report issues or what? If this is wrong then I apologize in advance and 
>> where do I go or who do I contact about this?
>> 
>> Moving on, in the Oracle 10g driver, they claim to fully support JDBC 3.0 
>> Blob methods. Given this I have been attempting to test if this is true and 
>> apparently it is with one exception.
>> 
>> Please note in advance that this might be a village issue (or maybe not).
>> 
>> So far in my testing I have found that I can use the stock Oracle 
>> 10.2.0.1.0 JDBC driver and the village 2.0 jar included with Torque 3.2 and 
>> successfully insert, select, and update blobs.
>> 
>> However, when executing a simple select on a table where the blob column 
>> might have a null value, I get a NullPointerException in this part of 
>> Value.java:
>>
>>         case Types.BLOB:
>>             Blob blob = rs.getBlob(columnNumber);
>>             valueObject = blob.getBytes(1, (int) blob.length());
>>             break;
>> 
>> The valueObject assignment fails with an NPE since the blob variable is 
>> null. This makes since because in my test, the blob column in the table is 
>> null. Is this behavior correct?
>> 
>> So what am I missing or is this something that could be changed in Village 
>> and thus allow for standard oracle support if using the Oracle 10g driver?
>> 
>> Thanks in advance!
>> 
>
>
> -- 
>
> Christopher Fitch - dominatr@midsouth.rr.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


Mime
View raw message