aspose file tools*
The moose likes JDBC and the fly likes com.ibm.db2.jcc.a.SqlException: Jdbc type 2003 not yet supported Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "com.ibm.db2.jcc.a.SqlException: Jdbc type 2003 not yet supported" Watch "com.ibm.db2.jcc.a.SqlException: Jdbc type 2003 not yet supported" New topic
Author

com.ibm.db2.jcc.a.SqlException: Jdbc type 2003 not yet supported

sairam Kukudala
Greenhorn

Joined: Jun 25, 2012
Posts: 15

Hi All,

pardon me if this post is not related to this forum and also suggest where i can post this if its not here.


I need to convert list to sql Array type so i am calling stored procedure. It contains 2 in parameters(varchar, integer) and one out(Array). When i am calling



Exception-----

com.ibm.db2.jcc.a.SqlException: Jdbc type 2003 not yet supported.
at com.ibm.db2.jcc.a.n.a(n.java:1003)
at com.ibm.db2.jcc.a.n.a(n.java:920)
at com.ibm.db2.jcc.a.jd.a(jd.java:290)
at com.ibm.db2.jcc.a.jd.e(jd.java:257)
at com.ibm.db2.jcc.a.jd.registerOutParameter(jd.java:243)
at com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.registerOutParameter(WSJdbcCallableStatement.java:662)

Please advise me how i can resolve this exception. Thanks in advance....![/color]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

Are you using the latest version of the JDBC driver? Because all JDBC drivers should support that method by now.

Edit: actually, not necessarily. From the Javadoc pages:
Throws:
SQLFeatureNotSupportedException - if sqlType is a ARRAY, BLOB, CLOB, DATALINK, JAVA_OBJECT, NCHAR, NCLOB, NVARCHAR, LONGNVARCHAR, REF, ROWID, SQLXML or STRUCT data type and the JDBC driver does not support this data type

Still, the latest version may have added support for the ARRAY type.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
sairam Kukudala
Greenhorn

Joined: Jun 25, 2012
Posts: 15

Hi Rob,

Thanks for reply..!

I am using JDBC driver version : 2.7.58. Doesn't it support for Types.Array? If not which version will support ? How can i upgrade my JDBC driver?
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

i found this page, it lists the database version and which driver version is the latest. 2.7.x looks to be a pretty old driver, but if you are supporting an old DB you may be stuck with it.

db versions
sairam Kukudala
Greenhorn

Joined: Jun 25, 2012
Posts: 15

Can't i upgrade my jdbc driver version? If yes How..?
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

how you do this all depends, do you have live customers? as they will need to be updated as well, do you have systems people who will need to do this for production and everywhere else? or are you still in developement and you are the only user.

I can only explain how you do you it on your local machine, and that is go to the ibm site, download a new version replace the jar in your classpath and you are off.
sairam Kukudala
Greenhorn

Joined: Jun 25, 2012
Posts: 15

Thanks for your reply Wendy...

Actually this exception is getting in my local machine only. But in QA/Prod boxes its working fine.

After your last post i downloaded db2cc.jar, db2jcc_license_cu-9.7.2.jar and add to my lib. Even i am facing the same issue. Please suggest...!
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

And this exact same code is being run by the production system? Or is this ne code you have added?
sairam Kukudala
Greenhorn

Joined: Jun 25, 2012
Posts: 15

I just chekout the same code which is running in production. Exceptions is occuring while converting integer list to sql arry types.
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

something is wrong with your setup compared to production and everybody else in your team, sorry there really isn't much more I can do.
Find somebody else at work for whom it is working and ask them about possible setup issues, which drivers they are using etc.
sairam Kukudala
Greenhorn

Joined: Jun 25, 2012
Posts: 15

Thanks Wendy,

My issue is resolved with db2cc.jar file.
Steps i followed:

Websphere admin consele>Resources>JDBC providers>select all scopes>New> Provide the requied inforamtion and it asked me for db2cc.jar and db2jcc_license_cu.jar location and provided the path of jar files.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: com.ibm.db2.jcc.a.SqlException: Jdbc type 2003 not yet supported