commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Federico Spinazzi <f.spina...@masterhouse.it>
Subject Re: [jakarta-commons] dbcp Oracle CLOB wierdness
Date Fri, 20 Feb 2004 16:52:53 GMT
john tal wrote:

>I am refitting existing production code to use dbcp
>BasicDataSource for connection pooling instead of a
>home grown connection pooler.
>
>A big problem has arisen in that running against
>Oracle the dbcp.DelegatingResultSet is returning a
>clob which getClass().getName() says is an
>oracle.sql.CLOB but instanceof does not recognize as
>such.
>
>java.sql.Clob sqlClob = rs.getClob( i + 1 );
>
>String temp = sqlClob.getClass().getName();  // is
>'oracle.sql.CLOB'
>
>if(sqlClob instanceof java.sql.Clob)  // is TRUE
>
>if(sqlClob instanceof oracle.sql.CLOB)  // is FALSE
>when running with dbcp
>
>This code works without using dbcp.
>
>Any ideas?
>
Well, I'm not sure, but maybe a classloader related problem i.e. the 
classloader used to load sqlClob class is not the same used to load the 
class you listed here.
If it is so, the two classes are not the same class. the test against 
java.sql.Clob gets true because java.* classes are loaded by a 
classloader who is parent of all the other classloader (well, beside the 
bootstrap one).

Hope that helps,
Federico

>
>thx
>
>john
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail SpamGuard - Read only the mail you want.
>http://antispam.yahoo.com/tools
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>
>  
>



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


Mime
View raw message