> 1) looks like something went wrong while selecting your data and the
> exception occurred in a fatal way to break the whole transaction;
No, it is not a fatal-exception. It is more like house-keeping notice
from jboss for me. To make my code clean.
I have seen some suggests to ignore this message at all. But I prefer
to eliminate this problem, exceptions logging takes a lot of machine-
time.
> please upgrade the mybatis-spring module dependency to 1.0.0 and give
> once more try. If the problem persists, don't hesitate to post more
> details about your code so we can help you.
I have upgraded to latest version of mybatis and mybatis-spring (3.0.4
and 1.0.0), nothing is changed.
I have reviewed code and here what I see:
public List handleResultSets(Statement stmt) throws SQLException {
final List multipleResults = new ArrayList();
final List<ResultMap> resultMaps =
mappedStatement.getResultMaps();
int resultMapCount = resultMaps.size();
int resultSetCount = 0;
ResultSet rs = stmt.getResultSet(); //at
org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:
94)
validateResultMapsCount(rs,resultMapCount);
while (rs != null && resultMapCount > resultSetCount) {
final ResultMap resultMap = resultMaps.get(resultSetCount);
handleResultSet(rs, resultMap, multipleResults);
rs = getNextResultSet(stmt);
cleanUpAfterHandlingResultSet();
resultSetCount++;
}
return collapseSingleResultList(multipleResults);
}
And this happed even for norml select queries,
like select sum(price) from ...
or select id, name from account where ...
> 2) I don't know if there are issues with your approach, BTW be aware
> that mybatis supports as well the generated keys from server side via
> jdbc when inserting/updating, please take a look at the user manual!
Yes, I know about mybatis support of autogenerated keys.
But some times more complex issues appears, like:
UPDATE notes
SET endpoint=now()
WHERE endpoint='2222-01-01'
RETURNING id, author_id
which returns set of notes-ids and corresponding users. Just as
example.