ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giovanni Cuccu - CUP2000 <giovanni.cu...@cup2000.it>
Subject Re: R: R: handling null values
Date Mon, 19 Feb 2007 16:31:21 GMT
it seems that the descrizione field has an incorrect type i.e. your sql 
is mapping the column descrizione to the wrong type.
I can guess that descrizione is a varchar2 column, is the corresponding 
java property a String? is there any chance that you are mapping columns 
and java properties in different order?
Giovanni

> com.ibatis.common.jdbc.exception.NestedSQLException:   
> 
> --- The error occurred in Pratica.xml.  
> 
> --- The error occurred while applying a parameter map.  
> 
> --- Check the insertPraticaOracle-InlineParameterMap.  
> 
> --- Check the parameter mapping for the 'descrizione' property.  
> 
> --- Cause: java.sql.SQLException: Tipo di colonna non valido
> 
> Caused by: java.sql.SQLException: Tipo di colonna non valido
> 
>       at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
> 
>       at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:446)
> 
>       at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
> 
>       at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:60)
> 
>       at it.pitagora.pratica.dao.ibatis.IBatisPraticaDAO.insertPratica(IBatisPraticaDAO.java:152)
> 
>       at it.pitagora.test.TestCasePratica.testInsertPratica(TestCasePratica.java:127)
> 
>       at it.pitagora.test.TestCasePratica.main(TestCasePratica.java:161)
> 
> Caused by: java.sql.SQLException: Tipo di colonna non valido
> 
>       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> 
>       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> 
>       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
> 
>       at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:6411)
> 
>       at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:1358)
> 
>       at it.pitagora.util.pool.db.CachedPreparedStatement.setNull(CachedPreparedStatement.java:102)
> 
>       at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:171)
> 
>       at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125)
> 
>       at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:76)
> 
>       at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200)
> 
>       at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
> 
>       ... 6 more
> 
>  
> 
> 



-- 
Giovanni Cuccu
CUP 2000 Spa
Via del Borgo di S. Pietro, 90/c - 40126 Bologna
e-mail: giovanni.cuccu _at_ cup2000.it


Mime
View raw message