Mybatis cursors and Informix

33 views
Skip to first unread message

Mark Bickford

unread,
Oct 5, 2023, 10:38:02 AM10/5/23
to mybatis-user
Hi,
I'm adapting an application from Oracle to Informix, and hit a stumbling block regarding Cursors. I'm using Interface mappers, and the call in question looks like this:

@SelectProvider(type = InformixMapper.PureSqlProvider.class, method = "sql")
    @Options(timeout = 150,resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 100)
    Cursor<myDTO> getData(String sql, @Param("filterData")Map<String, String> filterData);

I am using a Cursor because this particular call may return a lot of data, and waiting for all of it to make its way from the database to the app server is problematic.

The issue is that the Informix driver is throwing
Method not supported : IfxStatement.closeOnCompletion()

when I call this statement. Has anyone run into this, and are there any known fixes or workarounds beyond just switching the method to return a List instead?

Currently using Mybatis 3.5.11, Informix driver 4.10.J and JDK 11. I tried updating the Informix driver but got the same result.

Thanks in advance for any help anyone can offer.

Iwao AVE!

unread,
Oct 5, 2023, 11:08:04 AM10/5/23
to mybati...@googlegroups.com
Hello Mark,

Upgraded to which version?
It seems that the method was implemented in version 4.10.12.
The latest is 4.50.10.
Regards,
Iwao

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/24d0e23b-c105-485f-812e-9899c16ba71bn%40googlegroups.com.

Mark Bickford

unread,
Oct 5, 2023, 11:51:27 AM10/5/23
to mybati...@googlegroups.com
I had tried going to 4.50.10, but my IDE may have been caching the former classpath or something. Several clean and rebuilds later, it's working on version 4.10.16 (latest of the 4.10 series).  Thanks! (And, if you have a pointer to the release notes showing when that issue was fixed, I'd love to see it.)

You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/0kVKzBHhf6I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2Buep2SSMhsO819jHxt_kwXbBhz4xM1JHBPQBMdk7xByEPK2KQ%40mail.gmail.com.


Iwao AVE!

unread,
Oct 5, 2023, 12:24:18 PM10/5/23
to mybati...@googlegroups.com
Thank you for letting us know the result!

I didn't find the release notes.
I just inspected the content of the JAR while changing the dependency version. 🙃

Regards,
Iwao
Reply all
Reply to author
Forward
0 new messages