ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samuel gallard <Samuel.Gall...@bull.net>
Subject Invalid column type in select request
Date Fri, 25 Jul 2008 13:57:22 GMT


I am facing an issue concerning Ibatis.

I need to make a request on one table. Four of her columns can be nullable.

When i use netBeans and Java, my request woks fine.

But when I use BpmRule ( a tool from Absyss society), i obtained this error

The error occurred in xml/Capacite/maps/Infrastructure.xml. --- The error
occurred while applying a parameter map. --- Check the
DerniereDate3-InlineParameterMap. --- Check the parameter mapping for the
'equipement' property. --- Cause: java.sql.SQLException:  Invalid column

It happens at #equipement#  in the following xml :

		select last as value from
		select dateSav as last ,rownum
			select distinct(to_char(date_ind,'YYYYMMDD')) as dateSav
			from stat.capacitevaleur
			where lower(equipement)=#equipement#  and
			           and  lower(indicateur)=#indicateur#
			order by to_char(date_ind,'YYYYMMDD') desc
		where rownum = 1

equipement is one of the column that could be nullable. I use a Hashtable to
put all my arguments.

It is the same for all my arguments. It doesn't seem to have a correct type
to map with his column type.

Instead of #equipement#, if i use #equipement:VARCHAR# , i don't obtain this
error. The problem is all my arguments are null and so the request failed.

I read everything about this problem on the Ibatis Wiki concerning the
Insert request but i can't do the same with select.

In some way i don't know, my tool BPMRule doesn't permit the column type as
Java does by itself.

Maybe i need to force the type of all arguments to map with the columns type
but i don't know how to make it.

I use Ibatis version

Could you help me for this issue?

I would appreciate it.

Samuel Gallard
View this message in context: http://www.nabble.com/Invalid-column-type-in-select-request-tp18652243p18652243.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message