You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Clinton Begin (JIRA)" <ib...@incubator.apache.org> on 2004/11/27 08:20:22 UTC

[jira] Closed: (IBATIS-5) Exception for input 7 or 8 inline parameters

     [ http://nagoya.apache.org/jira/browse/IBATIS-5?page=history ]
     
Clinton Begin closed IBATIS-5:
------------------------------

      Assign To: Clinton Begin
     Resolution: Cannot Reproduce
    Fix Version: 2.0.8

Can't reproduce. I can't see how this would even be possible...there's no special logic for 7, 8 or any other number of parameters.

> Exception for input 7 or 8 inline parameters
> --------------------------------------------
>
>          Key: IBATIS-5
>          URL: http://nagoya.apache.org/jira/browse/IBATIS-5
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Reporter: Clinton Begin
>     Assignee: Clinton Begin
>      Fix For: 2.0.8

>
> The insert xml will throw exception with 7 or 8 inline
> parameters:
> <update id="createUser" parameterClass="user">
> INSERT INTO
> user_table (USERID, USERNAME, PASSWORD,
> SCREENNAME, STATUSID, TYPEID, ZONEID, EMAIL)
> VALUES (#userid#, #username#, #password#,
> #screenname#, #statusid#, #typeid#, #zoneid#, #email#)
> </update>
> it worked fine with other numbers of inline parameters
> like:
> <update id="createUser" parameterClass="user">
> INSERT INTO
> user_table (USERID, USERNAME, PASSWORD)
> VALUES (#userid#, #username#, #password#)
> </update>
> the exception will complain the first column is null
> while it does have assigned value,
> the exception is as follow:
> [junit] xxxxx.model.User@1ce784b[
> [junit] userid=6
> [junit] username=a3
> [junit] password=bHVieDM1
> [junit] screenname=a3
> [junit] statusid=0
> [junit] typeid=0
> [junit] email=a3@yahoo.com
> [junit] createdate=1099629593687
> [junit] zoneid=1
> [junit] ]
> [junit] ------------- ---------------- ---------------
> [junit] Testcase:
> testCreateUser(xxxxx.persistence.UserDAOTest): Cause
> d an ERROR
> [junit] (SqlMapClientTemplate): data integrity
> violated by SQL '(mapped statement
> )'; nested exception is
> com.ibatis.common.jdbc.exception.NestedSQLException:
> [junit] --- The error occurred in
> xxxxxpersistence/ibatis/sql/UserSQL.xml.
> [junit] --- The error occurred while applying a
> parameter map.
> [junit] --- Check the createUser-InlineParameterMap.
> [junit] --- Check the statement (update failed).
> [junit] --- Cause: java.sql.SQLException: Column
> 'USERID' cannot be null
> [junit]
> org.springframework.dao.DataIntegrityViolationException:
> (SqlMapClientTem
> plate): data integrity violated by SQL '(mapped
> statement)'; nested exception is com.
> ibatis.common.jdbc.exception.NestedSQLException:
> [junit] --- The error occurred in
> xxxxxpersistence/ibatis/sql/UserSQL.xml.
> [junit] --- The error occurred while applying a
> parameter map.
> [junit] --- Check the createUser-InlineParameterMap.
> [junit] --- Check the statement (update failed).
> [junit] --- Cause: java.sql.SQLException: Column
> 'USERID' cannot be null
> [junit]
> com.ibatis.common.jdbc.exception.NestedSQLException:
> [junit] --- The error occurred in
> xxxxxpersistence/ibatis/sql/UserSQL.xml.
> [junit] --- The error occurred while applying a
> parameter map.
> [junit] --- Check the createUser-InlineParameterMap.
> [junit] --- Check the statement (update failed).
> [junit] --- Cause: java.sql.SQLException: Column
> 'USERID' cannot be null
> [junit] Caused by: java.sql.SQLException: Column
> 'USERID' cannot be null
> [junit] at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.execut
> eUpdate(GeneralStatement.java:72)
> [junit] at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMap
> ExecutorDelegate.java:279)
> [junit] at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessi
> onImpl.java:61)
> [junit] at
> org.springframework.orm.ibatis.SqlMapClientTemplate$11.doInSqlMapC
> lient(SqlMapClientTemplate.java:282)
> [junit] at
> org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMap
> ClientTemplate.java:140)
> [junit] at
> org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapC
> lientTemplate.java:280)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira