org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/land/landpermission/organ/sqlmap/LP_ORGAN_SQLMAP.xml.
--- The error occurred while applying a parameter map.
--- Check the ORGAN.insert-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: ORA-00917: missing comma
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/land/landpermission/organ/sqlmap/LP_ORGAN_SQLMAP.xml.
--- The error occurred while applying a parameter map.
--- Check the ORGAN.insert-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: ORA-00917: missing comma
处理:
1.检查sqlmap中的字段名是否与数据库中的字段名一致
(检查发现在数据库中的email这段 在sqlmap中写成了emaill)
2.另外看看是不是建表是使用了oracle的关键字作为表的字段名。
3.有时在写sql语句时会多写或少些了一个","也会出现类似异常。
改完后要注意将bean 和action中的字段改成和数据库中的一致
最新评论