You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Pat Thatte <pa...@hotmail.com> on 2009/07/13 22:37:23 UTC

error fetching BLOB and CLOB data

We have BLOBs and CLOBs in a DB2 v8 database. We use a jdbcType of 'BLOB' or 'CLOB' respectively in our SQL Map file and are getting an error 'CLI0123E SQL data type out of range. SQLSTATE=HY004'.

 

There was an older post about checking the driver type, but we are able to fetch the data with the same DataSource using straight SQL.

 

What else could we look at?

 

Thanks,

Pat.

Re: error fetching BLOB and CLOB data

Posted by Jeff Butler <je...@gmail.com>.
Where in the iBATIS code is this happening?  You haven't given us much to go
on - perhaps an abbreviated stack trace would be in order?
Jeff Butler

On Tue, Jul 14, 2009 at 8:58 AM, Pat Thatte <pa...@hotmail.com> wrote:

>  Thanks Mario. We are using a "CLI-based Type 2 JDBC Driver" which uses
> jdbc 2.0.
>
> We eliminated the driver as an issue, as I mentioned in my question, by
> using the same datasource with straight SQL. We were able to successfully
> fetch BLOB and CLOB with straight SQL instead of iBATIS.
>
> Any other suggestions would be appreciated.
>
>
> > Subject: Re: error fetching BLOB and CLOB data
> >
> > Pat,
> >
> > looks like you are using a very old version of the DB2 JDBC driver
> (atleast
> > in the iBatis use-case u have detailed below)
> > a - which is not a type 4 JDBC driver
> > b - is a JDBC v1 driver.
> >
> > The versions of DB2 i have seen, dont even ship with that JDBC driver
> > anymore. However here is a link that should be describing your env and
> what
> > u need to do - http://www-01.ibm.com/support/docview.wss?uid=swg21081165
> >
> >
> > Mario
> >
> >
> ---------------------------------------------------------------------------
> >
> > Pat Thatte
> >
> > Subject : error fetching BLOB and CLOB data
> >
> >
> > We have BLOBs and CLOBs in a DB2 v8 database. We use a jdbcType of 'BLOB'
> > or 'CLOB' respectively in our SQL Map file and are getting an error
> > 'CLI0123E SQL data type out of range. SQLSTATE=HY004'.
> >
> > There was an older post about checking the driver type, but we are able
> to
> > fetch the data with the same DataSource using straight SQL.
> >
> > What else could we look at?
> >
> > Thanks,
> > Pat.
>

RE: error fetching BLOB and CLOB data

Posted by Mario Ds Briggs <ma...@in.ibm.com>.
Well i could start by asking why u are using a type 2 driver instead of
type 4 , but i guess that doesnt take u any closer to you getting a
solution :-)

So simply turn on the driver tracing/logging ( in your case both the jdbc
driver and the cli driver traces) for the 2 scenarios you have i.e. ibatis
and straight jdbc. Then do a diff to see what is happening different in the
2 scenarios.

Mario



                                                                           
             Pat Thatte                                                    
             <pat4520@hotmail.                                             
             com>                                                       To 
                                       <us...@ibatis.apache.org>       
             14/07/2009 19:28                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         RE: error fetching BLOB and CLOB    
             user-java@ibatis.         data                                
                apache.org                                                 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Thanks Mario. We are using a "CLI-based Type 2 JDBC Driver" which uses jdbc
2.0.

We eliminated the driver as an issue, as I mentioned in my question, by
using the same datasource with straight SQL. We were able to successfully
fetch BLOB and CLOB with straight SQL instead of iBATIS.

Any other suggestions would be appreciated.


> Subject: Re: error fetching BLOB and CLOB data
>
> Pat,
>
> looks like you are using a very old version of the DB2 JDBC driver
(atleast
> in the iBatis use-case u have detailed below)
> a - which is not a type 4 JDBC driver
> b - is a JDBC v1 driver.
>
> The versions of DB2 i have seen, dont even ship with that JDBC driver
> anymore. However here is a link that should be describing your env and
what
> u need to do - http://www-01.ibm.com/support/docview.wss?uid=swg21081165
>
>
> Mario
>
>
---------------------------------------------------------------------------
>
> Pat Thatte
>
> Subject : error fetching BLOB and CLOB data
>
>
> We have BLOBs and CLOBs in a DB2 v8 database. We use a jdbcType of 'BLOB'
> or 'CLOB' respectively in our SQL Map file and are getting an error
> 'CLI0123E SQL data type out of range. SQLSTATE=HY004'.
>
> There was an older post about checking the driver type, but we are able
to
> fetch the data with the same DataSource using straight SQL.
>
> What else could we look at?
>
> Thanks,
> Pat.


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


RE: error fetching BLOB and CLOB data

Posted by Pat Thatte <pa...@hotmail.com>.
Thanks Mario. We are using a "CLI-based Type 2 JDBC Driver" which uses jdbc 2.0. 

We eliminated the driver as an issue, as I mentioned in my question, by using the same datasource with straight SQL. We were able to successfully fetch BLOB and CLOB with straight SQL instead of iBATIS.

Any other suggestions would be appreciated.


> Subject: Re: error fetching BLOB and CLOB data
> 
> Pat,
> 
> looks like you are using a very old version of the DB2 JDBC driver (atleast
> in the iBatis use-case u have detailed below)
>   a - which is not a type 4 JDBC driver
>   b - is a JDBC v1 driver.
> 
> The versions of DB2 i have seen, dont even ship with that JDBC driver
> anymore. However here is a link that should be describing your env and what
> u need to do - http://www-01.ibm.com/support/docview.wss?uid=swg21081165
> 
> 
> Mario
>                                                                            
>                                                                            ---------------------------------------------------------------------------
>                                                                            
>              Pat Thatte                                                    
>                                                                            
>                                                                    Subject :         error fetching BLOB and CLOB data   
>                                                                            
> 
> We have BLOBs and CLOBs in a DB2 v8 database. We use a jdbcType of 'BLOB'
> or 'CLOB' respectively in our SQL Map file and are getting an error
> 'CLI0123E SQL data type out of range. SQLSTATE=HY004'.
> 
> There was an older post about checking the driver type, but we are able to
> fetch the data with the same DataSource using straight SQL.
> 
> What else could we look at?
> 
> Thanks,
> Pat.

Re: error fetching BLOB and CLOB data

Posted by Mario Ds Briggs <ma...@in.ibm.com>.
Pat,

looks like you are using a very old version of the DB2 JDBC driver (atleast
in the iBatis use-case u have detailed below)
  a - which is not a type 4 JDBC driver
  b - is a JDBC v1 driver.

The versions of DB2 i have seen, dont even ship with that JDBC driver
anymore. However here is a link that should be describing your env and what
u need to do - http://www-01.ibm.com/support/docview.wss?uid=swg21081165


Mario




                                                                           
             Pat Thatte                                                    
             <pat4520@hotmail.                                             
             com>                                                       To 
                                       <us...@ibatis.apache.org>       
             14/07/2009 02:07                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         error fetching BLOB and CLOB data   
             user-java@ibatis.                                             
                apache.org                                                 
                                                                           
                                                                           
                                                                           
                                                                           




We have BLOBs and CLOBs in a DB2 v8 database. We use a jdbcType of 'BLOB'
or 'CLOB' respectively in our SQL Map file and are getting an error
'CLI0123E SQL data type out of range. SQLSTATE=HY004'.

There was an older post about checking the driver type, but we are able to
fetch the data with the same DataSource using straight SQL.

What else could we look at?

Thanks,
Pat.


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