aaberg/sql2o

Using sql2o with JAVA 10 (Question)

ahardworker opened this issue · 1 comments

Has anyone used this library with JAVA 9 and later?
I know that its using com.sun.reflect.* which have been deprecated starting from JAVA 9.

I have used both version 1.5.4 and 1.6.0 in a modular project.
Things to keep in mind are:

  • if you have custom converters that you load with the service loader mechanism (file in META-INF/services, as per the documentation, see https://github.com/aaberg/sql2o/wiki/Implementing-and-using-custom-converters), that doesn't work anymore: the org.sql2o.converters.ConvertersProvider is not read. Instead you have to add a line like provides org.sql2o.converters.ConvertersProvider with your.module.YourSql2OConvertersProvider
  • with version 1.6.0 you need to add --add-opens java.base/java.lang=sql2o yo you VM run parameters