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 jeremy jardin <je...@newtec.caisse-epargne.fr> on 2006/06/21 14:51:34 UTC

"invalid column type'

Hello,
 
I'm trying to insert user in my oracle database using ibatis framework.
I generated sql-map file using Abator plugin.
 
My table look like that :
 
UID       CHAR(36 Bytes)           
MOBILE           CHAR(12 Bytes)
 ORIGINE_UUID            CHAR(36 Bytes)
 ETAT   CHAR(10 Bytes)
LOGIN  CHAR(20 Bytes)
 ETAT_MODIFIE           CHAR(1 Bytes) 
TSTMPINSR     TIMESTAMP(6)                         
TSTMPUPDT    TIMESTAMP(6) 
 
I can see that Timestamp columns have been set as 'Object' in my
javabean..
It should have been a "Date" type !
 
 
So, when I try to store my user, I have that exception :
 
--- Check the parameter mapping for the 'TSTMPUPDT' property.  
--- Cause: java.sql.SQLException: Type de colonne non valide
Caused by: java.sql.SQLException: Type de colonne non valide
 
What should I do ??
 
 
Thx
      
 
 

Re: "invalid column type'

Posted by Jeff Butler <je...@gmail.com>.
Try this...in your Abator configuration, add a <columnOverride> for the
timestamp fields like this:

<table tableName="myTable">
  <columnOverride column='TSTMPINSR" javaType="java.util.Date"
jdbcType="TIMESTAMP"/>
  <columnOverride column='TSTMPUPDT" javaType="java.util.Date"
jdbcType="TIMESTAMP"/>
</table>

then regenerate.

Strange that it didn't generate that way originally - the Oracle driver must
be returning something wierd as the datatype for the columns.

Jeff Butler



On 6/21/06, jeremy jardin <je...@newtec.caisse-epargne.fr> wrote:
>
>   Hello,
>
>
>
> I'm trying to insert user in my oracle database using ibatis framework.
>
> I generated sql-map file using Abator plugin.
>
>
>
> My table look like that :
>
>
>
> UID       CHAR(36 Bytes)
>
> MOBILE           CHAR(12 Bytes)
>
>  ORIGINE_UUID            CHAR(36 Bytes)
>
>  ETAT   CHAR(10 Bytes)
>
> LOGIN  CHAR(20 Bytes)
>
>  ETAT_MODIFIE           CHAR(1 Bytes)
>
> TSTMPINSR     TIMESTAMP(6)
>
> TSTMPUPDT    TIMESTAMP(6)
>
>
>
> I can see that Timestamp columns have been set as 'Object' in my javabean
> ..
>
> It should have been a "Date" type !
>
>
>
>
>
> So, when I try to store my user, I have that exception :
>
>
>
> --- Check the parameter mapping for the 'TSTMPUPDT' property.
>
> --- Cause: *java.sql.SQLException*: Type de colonne non valide
>
> Caused by: *java.sql.SQLException* : Type de colonne non valide
>
>
>
> What should I do ??
>
>
>
>
>
> Thx
>
>
>
>
>
>
>