MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

Thomas Börkel
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/661c1dbf-adb5-42ba-9956-d122903e0cbb%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

Iwao AVE!
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


On Wed, Jun 26, 2019 at 10:53 PM Thomas Börkel <[hidden email]> wrote:
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/661c1dbf-adb5-42ba-9956-d122903e0cbb%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2Buep2SWbOyEydP%2BrYHbHfuhfqHUsx2WP1R-0TcjwgGmWr85gQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

Thomas Börkel
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.0:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ibatis.ognl.OgnlRuntime (file:/C:/Users/thomas.boerkel/.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

Should I open an issue for that?

Thanks,
Thomas

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/a4aab7d1-90ae-4c80-85d5-34b3f3e593ca%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

Thomas Börkel

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/73ea24de-b6c3-4aa1-9bcf-c9ed5549ae53%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

Thomas Börkel
In reply to this post by Iwao AVE!
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

Opened an issue: https://github.com/mybatis/mybatis-3/issues/1586

Thanks,
Thomas

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/8655120d-b3d4-4585-8147-c851d4c8848f%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: MyBatis 3.5.1, LocalDate, Redshift JDBC 4.2: Exception

Thomas Börkel
Resolved by using ".size" instead of ".size()" in the mappers. Same for ".isEmpty".

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/6509c78f-8a97-4445-aad2-2690da8a9d54%40googlegroups.com.