I'm using oracle and postgres with ibatis with no problem so my guess is that
1)there is an issue in the sqlmap xml file
2)it's ibatis bug
before we can assert 2) you should post
the log produced by ibatis with the SQL statement failing
the desc of your table
if for some reason you cannot exposte your data strucuture you can build a simple complete test case consisting of a single table a single java class and the corresponding sqlmap so we can reproduce the error and find an appropriate solution.
Giovanni

I am using java String and oracle Varchar2

giuseppe

-----Messaggio originale-----
Da: Giovanni Cuccu - CUP2000 [mailto:[EMAIL PROTECTED] Inviato: lunedì 19 febbraio 2007 17.31
A: user-java@ibatis.apache.org
Oggetto: Re: R: R: handling null values

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

Reply via email to