This exception is usually a problem with dynamic SQL. Find the corresponding SQL and check the dynamic SQL syntax according to the following prompt information.
Problem description
Exception information:
needed exception is org.apache.ibatis.builder.builderexception: error evaluating expression 'ides'. Return value (806) was not Iterable.
According to the exception prompt information, find the dynamic SQL statement where ides is located.
<foreach collection="ides" index="index" item="ides" open="(" separator="," close=")">
#{ides}
</foreach>
...
<foreach collection="ides" index="index" item="ides" open="(" separator="," close=")">
#{ides}
</foreach>
Finally, it is found that
two <foreach></ foreach> Statement operates on the same item variable, resulting in the failure of dynamic SQL splicing of the latter.
Solution:
Change the item property in any statement to a different value.
<foreach collection="ides" index="index" item="idess" open="(" separator="," close=")">
#{idess}
</foreach>
...
<foreach collection="ides" index="index" item="ides" open="(" separator="," close=")">
#{ides}
</foreach>
Read More:
- Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 281; The content of element type “sqlMapConfig” is incomplete
- [Solved] MySQL Error: “Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”
- [Solved] flicksql cdc mysql to kafka Connect Error: org.apache.flink.table.api.ValidationException…
- [Solved] ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- [Solved] Sequelize DatabaseError: ER_WRONG_FIELD_WITH_GROUP: Expression #2 of SELECT list is not in GROUP
- [Solved] MySQL: Syntax error or access violation: 1055 Expression #1 of SELECT list is not …
- [SQL ERROR] SQL Error: could not execute statement & query did not return a unique result: 2; nested excepti
- MySQL OrderBy Error: Expression #1 of ORDER BY
- [Solved] QuestDB Exception–ERROR: Cannot insert rows out of order.
- [Solved] Critical: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
- The setobject() method reports an error. The parameter index out of range and MySQL syntax error exception report an error
- Error running ‘Application‘: Command line is too long [How to Solve]
- [Solved] EOS7.6 Error: Init DB failed [Specified key was too long; max key length is 767 bytes…
- [Solved] There is a problem with mysql8.0 without password in Navicat connection
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- MYSQL gruop by Error: this is incompatible with sql_mode=only_full_group_by
- [Solved] MYSQL 5.7 gruop by eRROR: this is incompatible with sql_mode=only_full_group_by
- Mybatis Error: The server time zone value ‘����1532a0’ is unrecognized
- [Solved] Python import Error: pip –upgrade Error: ERROR: Cannot uninstall ‘dnspython‘. It is a distutils installed
- MYSQL 5.7 Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it..