Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported SQL Type 1111 when passing String to a VARCHAR field

I have been smashing my head against this for a while now.

I am using iBatis with my JAVA code to run Stored Proc residing in Sybase DB.

Stored procedure is expecting some parameters. few of them are declared as VARCHAR (6)

So in my iBatis mapping i did the following for those parameters.

<parameter property="searchUserId" jdbcType="String" javaType="java.lang.String" mode="IN"/>

However, when I do this I get the following error.

--- Check the statement (update procedure failed).  
--- Cause: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 1111.
Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 1111.

So I changed my mapping to following:

<parameter property="searchUserId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>

which got rid of the error above, however, now the parameter searchUserId is getting value of null passed into the SP. I know for sure that from my java code I am NOT passing null.

Has someone faced this issue? what should I change my mapping to??

like image 335
Omnipresent Avatar asked Dec 10 '25 22:12

Omnipresent


1 Answers

I ran into this problem for a different reason: The table had a geometry (PostGIS extension) column in it that I guess the driver couldn't parse. Dropping that column made it work.

like image 175
sudo Avatar answered Dec 12 '25 13:12

sudo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!