MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

10 views
Skip to first unread message

Thomas Börkel

unread,
Jun 26, 2019, 9:53:02 AM6/26/19
to mybatis-user
Hi,

there was a change in MyBatis which requires now a JDBC 4.2 compliant JDBC driver, otherwise LocalDate won't work.

I have updated our HSQL driver to the newest version, which fixed that problem with HSQL.

However, Redshift JDBC 4.2 newest version 1.2.27.1051 still errors:

org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='endDate', mode=IN, javaType=class java.lang.Object, jdbcType=DATE, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}.

I have tried with and without HikariCP.

Is the Redshift driver not fully compliant or am I missing something?

MyBatis 3.4.5 worked fine with LocalDate and Redshift.

Thanks!

Regards,
Thomas

Iwao AVE!

unread,
Jun 26, 2019, 12:30:48 PM6/26/19
to mybatis-user
Hi Thomas,

The driver does not support it, probably.
Could you post the full stack trace?

The workaround I mentioned [1] should still work.
Let me know if you have any difficulty with the configuration.

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/661c1dbf-adb5-42ba-9956-d122903e0cbb%40googlegroups.com.
Message has been deleted
Message has been deleted

Thomas Börkel

unread,
Jun 27, 2019, 6:02:58 AM6/27/19
to mybatis-user
Hi Iwao,

sorry, it was not Redshift, it was Oracle. We are using both and I looked at the wrong place. MyBatis 3.5.1 works fine with ojdbc8 12.2.0.1 regarding LocalDate.

I do however still get Java 11 warnings. I thought that was fixed in MyBatis 3.5.1:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ibatis.ognl.OgnlRuntime (file:/C:/Users/username/.m2/repository/org/mybatis/mybatis/3.5.1/mybatis-3.5.1.jar) to method java.util.HashMap$KeySet.size()
WARNING: Please consider reporting this to the maintainers of org.apache.ibatis.ognl.OgnlRuntime
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release


Thanks,
Thomas

Thomas Börkel

unread,
Jun 27, 2019, 10:19:05 AM6/27/19
to mybatis-user
Resolved by using ".size" instead of ".size()" in the mappers. Same for ".isEmpty".
Reply all
Reply to author
Forward
0 new messages